diff options
Diffstat (limited to 'WebCore/storage/IDBObjectStoreBackendImpl.h')
-rw-r--r-- | WebCore/storage/IDBObjectStoreBackendImpl.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/WebCore/storage/IDBObjectStoreBackendImpl.h b/WebCore/storage/IDBObjectStoreBackendImpl.h index 4b909af..e1058c8 100644 --- a/WebCore/storage/IDBObjectStoreBackendImpl.h +++ b/WebCore/storage/IDBObjectStoreBackendImpl.h @@ -34,16 +34,18 @@ namespace WebCore { -template <typename ValueType> class IDBKeyTree; +class IDBDatabaseBackendImpl; +class SQLiteDatabase; class IDBObjectStoreBackendImpl : public IDBObjectStoreBackendInterface { public: - static PassRefPtr<IDBObjectStoreBackendInterface> create(const String& name, const String& keyPath, bool autoIncrement) + static PassRefPtr<IDBObjectStoreBackendImpl> create(IDBDatabaseBackendImpl* database, int64_t id, const String& name, const String& keyPath, bool autoIncrement) { - return adoptRef(new IDBObjectStoreBackendImpl(name, keyPath, autoIncrement)); + return adoptRef(new IDBObjectStoreBackendImpl(database, id, name, keyPath, autoIncrement)); } ~IDBObjectStoreBackendImpl(); + int64_t id() const { return m_id; } String name() const { return m_name; } String keyPath() const { return m_keyPath; } PassRefPtr<DOMStringList> indexNames() const; @@ -58,18 +60,23 @@ public: void openCursor(PassRefPtr<IDBKeyRange> range, unsigned short direction, PassRefPtr<IDBCallbacks>); + IDBDatabaseBackendImpl* database() const { return m_database.get(); } + private: - IDBObjectStoreBackendImpl(const String& name, const String& keyPath, bool autoIncrement); + IDBObjectStoreBackendImpl(IDBDatabaseBackendImpl*, int64_t id, const String& name, const String& keyPath, bool autoIncrement); + + void loadIndexes(); + SQLiteDatabase& sqliteDatabase() const; + RefPtr<IDBDatabaseBackendImpl> m_database; + + int64_t m_id; String m_name; String m_keyPath; bool m_autoIncrement; typedef HashMap<String, RefPtr<IDBIndexBackendInterface> > IndexMap; IndexMap m_indexes; - - typedef IDBKeyTree<SerializedScriptValue> Tree; - RefPtr<Tree> m_tree; }; } // namespace WebCore |