2011-03-03 Hans Wennborg <hans@chromium.org>
authorhans@chromium.org <hans@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Mar 2011 10:37:41 +0000 (10:37 +0000)
committerhans@chromium.org <hans@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Mar 2011 10:37:41 +0000 (10:37 +0000)
commitff4c37cc490c2c13b36e359d211a6e9aa351399f
treec7047ca75a2dd37ed8914a7c073876a073a0a1d4
parent34020f7edb8288a3bd17e01128fa075792f81506
2011-03-03  Hans Wennborg  <hans@chromium.org>

        Reviewed by Jeremy Orlow.

        IndexedDB: Move SQL code, especially for cursors, to IDBBackingStore
        https://bugs.webkit.org/show_bug.cgi?id=55376

        Move SQL code from IDBKey, IDBKeyRange, IDBIndexBackendImpl,
        IDBObjectStoreBackendImpl, and especially IDBCursorBackendImpl.

        No new functionality, so no new tests.

        * storage/IDBBackingStore.cpp:
        (WebCore::lowerCursorWhereFragment):
        (WebCore::upperCursorWhereFragment):
        (WebCore::IDBBackingStore::deleteObjectStoreRecord):
        (WebCore::IDBBackingStore::keyExistsInObjectStore):
        (WebCore::IDBBackingStore::getObjectViaIndex):
        (WebCore::keyFromQuery):
        (WebCore::IDBBackingStore::getPrimaryKeyViaIndex):
        (WebCore::IDBBackingStore::keyExistsInIndex):
        (WebCore::CursorImplCommon::CursorImplCommon::continueInternal):
        (WebCore::CursorImplCommon::ObjectStoreCursorImpl::ObjectStoreCursorImpl):
        (WebCore::CursorImplCommon::ObjectStoreCursorImpl::objectStoreDataId):
        (WebCore::CursorImplCommon::ObjectStoreCursorImpl::key):
        (WebCore::CursorImplCommon::ObjectStoreCursorImpl::value):
        (WebCore::CursorImplCommon::ObjectStoreCursorImpl::continueFunction):
        (WebCore::IDBBackingStore::openObjectStoreCursor):
        (WebCore::ObjectStoreCursorImpl::loadCurrentRow):
        (WebCore::ObjectStoreCursorImpl::currentRowExists):
        (WebCore::IndexKeyCursorImpl::IndexKeyCursorImpl):
        (WebCore::IndexKeyCursorImpl::indexDataId):
        (WebCore::IndexKeyCursorImpl::key):
        (WebCore::IndexKeyCursorImpl::primaryKey):
        (WebCore::IndexKeyCursorImpl::continueFunction):
        (WebCore::IDBBackingStore::openIndexKeyCursor):
        (WebCore::IndexKeyCursorImpl::loadCurrentRow):
        (WebCore::IndexKeyCursorImpl::currentRowExists):
        (WebCore::IndexCursorImpl::IndexCursorImpl):
        (WebCore::IndexCursorImpl::indexDataId):
        (WebCore::IndexCursorImpl::key):
        (WebCore::IndexCursorImpl::primaryKey):
        (WebCore::IndexCursorImpl::value):
        (WebCore::IndexCursorImpl::continueFunction):
        (WebCore::IDBBackingStore::openIndexCursor):
        (WebCore::IndexCursorImpl::loadCurrentRow):
        (WebCore::IndexCursorImpl::currentRowExists):
        * storage/IDBBackingStore.h:
        (WebCore::IDBBackingStore::Cursor::~Cursor):
        * storage/IDBCursorBackendImpl.cpp:
        (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
        (WebCore::IDBCursorBackendImpl::key):
        (WebCore::IDBCursorBackendImpl::value):
        (WebCore::IDBCursorBackendImpl::update):
        (WebCore::IDBCursorBackendImpl::continueFunctionInternal):
        (WebCore::IDBCursorBackendImpl::deleteFunction):
        * storage/IDBCursorBackendImpl.h:
        (WebCore::IDBCursorBackendImpl::create):
        * storage/IDBIndexBackendImpl.cpp:
        (WebCore::IDBIndexBackendImpl::openCursorInternal):
        (WebCore::IDBIndexBackendImpl::getInternal):
        (WebCore::IDBIndexBackendImpl::addingKeyAllowed):
        * storage/IDBIndexBackendImpl.h:
        * storage/IDBKey.cpp:
        (WebCore::IDBKey::isEqual):
        * storage/IDBKey.h:
        * storage/IDBKeyRange.cpp:
        * storage/IDBKeyRange.h:
        * storage/IDBObjectStoreBackendImpl.cpp:
        (WebCore::IDBObjectStoreBackendImpl::putInternal):
        (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
        (WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
        * storage/IDBObjectStoreBackendImpl.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@80220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/storage/IDBBackingStore.cpp
Source/WebCore/storage/IDBBackingStore.h
Source/WebCore/storage/IDBCursorBackendImpl.cpp
Source/WebCore/storage/IDBCursorBackendImpl.h
Source/WebCore/storage/IDBIndexBackendImpl.cpp
Source/WebCore/storage/IDBIndexBackendImpl.h
Source/WebCore/storage/IDBKey.cpp
Source/WebCore/storage/IDBKey.h
Source/WebCore/storage/IDBKeyRange.cpp
Source/WebCore/storage/IDBKeyRange.h
Source/WebCore/storage/IDBObjectStoreBackendImpl.cpp
Source/WebCore/storage/IDBObjectStoreBackendImpl.h