summaryrefslogtreecommitdiffstats
path: root/WebCore/storage/IDBKeyRange.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/storage/IDBKeyRange.h')
-rw-r--r--WebCore/storage/IDBKeyRange.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/WebCore/storage/IDBKeyRange.h b/WebCore/storage/IDBKeyRange.h
index 52239e4..9ce07af 100644
--- a/WebCore/storage/IDBKeyRange.h
+++ b/WebCore/storage/IDBKeyRange.h
@@ -28,8 +28,7 @@
#if ENABLE(INDEXED_DATABASE)
-#include "IDBAny.h"
-#include "SerializedScriptValue.h"
+#include "IDBKey.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
@@ -46,22 +45,26 @@ public:
RIGHT_BOUND = 8,
};
- static PassRefPtr<IDBKeyRange> create(PassRefPtr<SerializedScriptValue> left, PassRefPtr<SerializedScriptValue> right, unsigned short flags)
+ static PassRefPtr<IDBKeyRange> create(PassRefPtr<IDBKey> left, PassRefPtr<IDBKey> right, unsigned short flags)
{
return adoptRef(new IDBKeyRange(left, right, flags));
}
~IDBKeyRange() { }
- PassRefPtr<IDBAny> left() const { return IDBAny::create(m_left.get()); }
- PassRefPtr<IDBAny> right() const { return IDBAny::create(m_right.get()); }
+ PassRefPtr<IDBKey> left() const { return m_left; }
+ PassRefPtr<IDBKey> right() const { return m_right; }
unsigned short flags() const { return m_flags; }
+ static PassRefPtr<IDBKeyRange> only(PassRefPtr<IDBKey> value);
+ static PassRefPtr<IDBKeyRange> leftBound(PassRefPtr<IDBKey> bound, bool open = false);
+ static PassRefPtr<IDBKeyRange> rightBound(PassRefPtr<IDBKey> bound, bool open = false);
+ static PassRefPtr<IDBKeyRange> bound(PassRefPtr<IDBKey> left, PassRefPtr<IDBKey> right, bool openLeft = false, bool openRight = false);
private:
- IDBKeyRange(PassRefPtr<SerializedScriptValue> left, PassRefPtr<SerializedScriptValue> right, unsigned short flags);
+ IDBKeyRange(PassRefPtr<IDBKey> left, PassRefPtr<IDBKey> right, unsigned short flags);
- RefPtr<SerializedScriptValue> m_left;
- RefPtr<SerializedScriptValue> m_right;
+ RefPtr<IDBKey> m_left;
+ RefPtr<IDBKey> m_right;
unsigned short m_flags;
};