MemoryObjectStoreCursor::MemoryObjectStoreCursor(MemoryObjectStore& objectStore, const IDBCursorInfo& info)
    : MemoryCursor(info)
    , m_objectStore(objectStore)
    , m_remainingRange(info.range())
{
    LOG(IndexedDB, "MemoryObjectStoreCursor::MemoryObjectStoreCursor %s", info.range().loggingString().utf8().data());

    auto* orderedKeys = objectStore.orderedKeys();
    if (!orderedKeys)
        return;

    setFirstInRemainingRange(*orderedKeys);
}
SQLiteIDBCursor::SQLiteIDBCursor(SQLiteIDBTransaction& transaction, const IDBCursorInfo& info)
    : m_transaction(&transaction)
    , m_cursorIdentifier(info.identifier())
    , m_objectStoreID(info.objectStoreIdentifier())
    , m_indexID(info.cursorSource() == IndexedDB::CursorSource::Index ? info.sourceIdentifier() : IDBIndexMetadata::InvalidId)
    , m_cursorDirection(info.cursorDirection())
    , m_keyRange(info.range())
{
    ASSERT(m_objectStoreID);
}