summaryrefslogtreecommitdiffstats
path: root/WebCore/storage/IDBIndexBackendImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/storage/IDBIndexBackendImpl.cpp')
-rw-r--r--WebCore/storage/IDBIndexBackendImpl.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/WebCore/storage/IDBIndexBackendImpl.cpp b/WebCore/storage/IDBIndexBackendImpl.cpp
index 2a991fa..84af234 100644
--- a/WebCore/storage/IDBIndexBackendImpl.cpp
+++ b/WebCore/storage/IDBIndexBackendImpl.cpp
@@ -36,24 +36,27 @@
#include "IDBKey.h"
#include "IDBKeyRange.h"
#include "IDBObjectStoreBackendImpl.h"
+#include "IDBSQLiteDatabase.h"
#include "SQLiteDatabase.h"
#include "SQLiteStatement.h"
namespace WebCore {
-IDBIndexBackendImpl::IDBIndexBackendImpl(IDBObjectStoreBackendImpl* objectStore, int64_t id, const String& name, const String& keyPath, bool unique)
- : m_objectStore(objectStore)
+IDBIndexBackendImpl::IDBIndexBackendImpl(IDBSQLiteDatabase* database, int64_t id, const String& name, const String& storeName, const String& keyPath, bool unique)
+ : m_database(database)
, m_id(id)
, m_name(name)
+ , m_storeName(storeName)
, m_keyPath(keyPath)
, m_unique(unique)
{
}
-IDBIndexBackendImpl::IDBIndexBackendImpl(IDBObjectStoreBackendImpl* objectStore, const String& name, const String& keyPath, bool unique)
- : m_objectStore(objectStore)
+IDBIndexBackendImpl::IDBIndexBackendImpl(IDBSQLiteDatabase* database, const String& name, const String& storeName, const String& keyPath, bool unique)
+ : m_database(database)
, m_id(InvalidId)
, m_name(name)
+ , m_storeName(storeName)
, m_keyPath(keyPath)
, m_unique(unique)
{
@@ -63,11 +66,6 @@ IDBIndexBackendImpl::~IDBIndexBackendImpl()
{
}
-String IDBIndexBackendImpl::storeName()
-{
- return m_objectStore->name();
-}
-
void IDBIndexBackendImpl::openCursorInternal(ScriptExecutionContext*, PassRefPtr<IDBIndexBackendImpl> index, PassRefPtr<IDBKeyRange> range, unsigned short untypedDirection, bool objectCursor, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<IDBTransactionBackendInterface> transaction)
{
// Several files depend on this order of selects.
@@ -106,7 +104,7 @@ void IDBIndexBackendImpl::openCursorInternal(ScriptExecutionContext*, PassRefPtr
return;
}
- RefPtr<IDBCursorBackendInterface> cursor = IDBCursorBackendImpl::create(index, range, direction, query.release(), objectCursor, transaction.get());
+ RefPtr<IDBCursorBackendInterface> cursor = IDBCursorBackendImpl::create(index->m_database.get(), range, direction, query.release(), objectCursor, transaction.get());
callbacks->onSuccess(cursor.release());
}
@@ -200,7 +198,7 @@ bool IDBIndexBackendImpl::addingKeyAllowed(IDBKey* key)
SQLiteDatabase& IDBIndexBackendImpl::sqliteDatabase() const
{
- return m_objectStore->database()->sqliteDatabase();
+ return m_database->db();
}
} // namespace WebCore