summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/storage/IDBIndexBackendImpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/storage/IDBIndexBackendImpl.h')
-rw-r--r--Source/WebCore/storage/IDBIndexBackendImpl.h27
1 files changed, 13 insertions, 14 deletions
diff --git a/Source/WebCore/storage/IDBIndexBackendImpl.h b/Source/WebCore/storage/IDBIndexBackendImpl.h
index e640b5a..e2a06b8 100644
--- a/Source/WebCore/storage/IDBIndexBackendImpl.h
+++ b/Source/WebCore/storage/IDBIndexBackendImpl.h
@@ -26,27 +26,27 @@
#ifndef IDBIndexBackendImpl_h
#define IDBIndexBackendImpl_h
-#include "IDBIndexBackendInterface.h"
-
#if ENABLE(INDEXED_DATABASE)
+#include "IDBCursorBackendInterface.h"
+#include "IDBIndexBackendInterface.h"
+
namespace WebCore {
+class IDBBackingStore;
class IDBKey;
class IDBObjectStoreBackendImpl;
-class IDBSQLiteDatabase;
-class SQLiteDatabase;
class ScriptExecutionContext;
class IDBIndexBackendImpl : public IDBIndexBackendInterface {
public:
- static PassRefPtr<IDBIndexBackendImpl> create(IDBSQLiteDatabase* database, int64_t id, const String& name, const String& storeName, const String& keyPath, bool unique)
+ static PassRefPtr<IDBIndexBackendImpl> create(IDBBackingStore* backingStore, int64_t id, const String& name, const String& storeName, const String& keyPath, bool unique)
{
- return adoptRef(new IDBIndexBackendImpl(database, id, name, storeName, keyPath, unique));
+ return adoptRef(new IDBIndexBackendImpl(backingStore, id, name, storeName, keyPath, unique));
}
- static PassRefPtr<IDBIndexBackendImpl> create(IDBSQLiteDatabase* database, const String& name, const String& storeName, const String& keyPath, bool unique)
+ static PassRefPtr<IDBIndexBackendImpl> create(IDBBackingStore* backingStore, const String& name, const String& storeName, const String& keyPath, bool unique)
{
- return adoptRef(new IDBIndexBackendImpl(database, name, storeName, keyPath, unique));
+ return adoptRef(new IDBIndexBackendImpl(backingStore, name, storeName, keyPath, unique));
}
virtual ~IDBIndexBackendImpl();
@@ -56,6 +56,7 @@ public:
return m_id;
}
void setId(int64_t id) { m_id = id; }
+ bool hasValidId() const { return m_id != InvalidId; };
bool addingKeyAllowed(IDBKey*);
@@ -71,17 +72,15 @@ public:
virtual void getKey(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
private:
- IDBIndexBackendImpl(IDBSQLiteDatabase*, int64_t id, const String& name, const String& storeName, const String& keyPath, bool unique);
- IDBIndexBackendImpl(IDBSQLiteDatabase*, const String& name, const String& storeName, const String& keyPath, bool unique);
-
- SQLiteDatabase& sqliteDatabase() const;
+ IDBIndexBackendImpl(IDBBackingStore*, int64_t id, const String& name, const String& storeName, const String& keyPath, bool unique);
+ IDBIndexBackendImpl(IDBBackingStore*, const String& name, const String& storeName, const String& keyPath, bool unique);
- static void openCursorInternal(ScriptExecutionContext*, PassRefPtr<IDBIndexBackendImpl>, PassRefPtr<IDBKeyRange>, unsigned short direction, bool objectCursor, PassRefPtr<IDBCallbacks>, PassRefPtr<IDBTransactionBackendInterface>);
+ static void openCursorInternal(ScriptExecutionContext*, PassRefPtr<IDBIndexBackendImpl>, PassRefPtr<IDBKeyRange>, unsigned short direction, IDBCursorBackendInterface::CursorType, PassRefPtr<IDBCallbacks>, PassRefPtr<IDBTransactionBackendInterface>);
static void getInternal(ScriptExecutionContext*, PassRefPtr<IDBIndexBackendImpl>, PassRefPtr<IDBKey>, bool getObject, PassRefPtr<IDBCallbacks>);
static const int64_t InvalidId = 0;
- RefPtr<IDBSQLiteDatabase> m_database;
+ RefPtr<IDBBackingStore> m_backingStore;
int64_t m_id;
String m_name;