IDB: Implement SQLite backing store 'get' support
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Jan 2014 03:52:30 +0000 (03:52 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Jan 2014 03:52:30 +0000 (03:52 +0000)
commitba5dc67447f5632daa4cd5a3909f22fcdc404d0d
treed2005c786b067683b701b5009ccfe7b49ed1b981
parent245921e5d03a3d08547ea5b895b08815fa48dc3e
IDB: Implement SQLite backing store 'get' support
https://bugs.webkit.org/show_bug.cgi?id=127502

Reviewed by Tim Horton.

Source/WebCore:

Get a KeyRange from a KeyRangeData:
* Modules/indexeddb/IDBKeyRangeData.cpp:
(WebCore::IDBKeyRangeData::maybeCreateIDBKeyRange):
* Modules/indexeddb/IDBKeyRangeData.h:

Add collation function support to SQLiteDatabase:
* platform/sql/SQLiteDatabase.cpp:
(WebCore::destroyCollationFunction):
(WebCore::callCollationFunction):
(WebCore::SQLiteDatabase::setCollationFunction):
(WebCore::SQLiteDatabase::removeCollationFunction):
* platform/sql/SQLiteDatabase.h:

* WebCore.exp.in:

Source/WebKit2:

This makes get of a single IDBKey work, and lays the groundwork for getting an IDBKeyRange.

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:

* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata): Add custom collation
  to the Records table.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata): Install the custom collator.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRecordFromObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRangeRecordFromObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::collate): Collation function to be filled in later.
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBKeyRangeData.cpp
Source/WebCore/Modules/indexeddb/IDBKeyRangeData.h
Source/WebCore/WebCore.exp.in
Source/WebCore/platform/sql/SQLiteDatabase.cpp
Source/WebCore/platform/sql/SQLiteDatabase.h
Source/WebKit2/ChangeLog
Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp
Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h
Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp
Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h