Bug 127868 - IDB: Index reading
Summary: IDB: Index reading
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Brady Eidson
Keywords: InRadar
: 116223 (view as bug list)
Depends on:
Blocks: 124521
  Show dependency treegraph
Reported: 2014-01-29 16:29 PST by Jon Lee
Modified: 2022-03-14 16:36 PDT (History)
7 users (show)

See Also:

Index *writing* patch, v1 (20.59 KB, patch)
2014-01-31 00:01 PST, Brady Eidson
no flags Details | Formatted Diff | Diff
Writing v2 - Fix style nit. (20.59 KB, patch)
2014-01-31 00:02 PST, Brady Eidson
andersca: review+
andersca: commit-queue-
Details | Formatted Diff | Diff
Reading patch v1 - Implement with a cursor! (7.21 KB, patch)
2014-02-01 00:15 PST, Brady Eidson
jer.noble: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Lee 2014-01-29 16:29:53 PST
IDB: Index reading/writing

Comment 1 Brady Eidson 2014-01-30 23:48:37 PST
This will be done in two separate patches.

Index writing is first.  It's straightforward and easy to verify by manual debugging and manual inspection on disk that it is working as expected.

Index reading will actually be implemented in terms of index cursors later.
Comment 2 Brady Eidson 2014-01-31 00:01:14 PST
Created attachment 222799 [details]
Index *writing* patch, v1
Comment 3 WebKit Commit Bot 2014-01-31 00:02:39 PST
Attachment 222799 [details] did not pass style-queue:

ERROR: Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:71:  The parameter name "key" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 7 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Brady Eidson 2014-01-31 00:02:49 PST
Created attachment 222800 [details]
Writing v2 - Fix style nit.
Comment 5 Anders Carlsson 2014-01-31 07:47:51 PST
Comment on attachment 222800 [details]
Writing v2 - Fix style nit.

View in context: https://bugs.webkit.org/attachment.cgi?id=222800&action=review

> Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:239
> +            IDBIndexMetadata idxMetadata;

No need to abbreviate index here.

> Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:256
> +            auto objectStoreMetadata = metadata->objectStores.find(objectStoreID);

I'd call this objectStoreMetadataIt to indicate that it's an iterator (especially since you're using auto).
Comment 6 Brady Eidson 2014-01-31 07:51:08 PST
Comment 7 Brady Eidson 2014-01-31 07:51:26 PST
Retitling to reflect that only reading remains.
Comment 8 Brady Eidson 2014-02-01 00:15:00 PST
Created attachment 222877 [details]
Reading patch v1 - Implement with a cursor!
Comment 9 Jer Noble 2014-02-01 10:48:33 PST
Comment on attachment 222877 [details]
Reading patch v1 - Implement with a cursor!

View in context: https://bugs.webkit.org/attachment.cgi?id=222877&action=review

r=me with obligatory nit.

> Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:837
> +

Ob-nit: Unnecessary whitespace.
Comment 10 Brady Eidson 2014-02-01 11:07:13 PST
Comment 11 Tim Nguyen (:ntim) 2022-03-14 16:36:02 PDT
*** Bug 116223 has been marked as a duplicate of this bug. ***