Bug 127868

Summary: IDB: Index reading
Product: WebKit Reporter: Jon Lee <jonlee>
Component: WebCore Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: alecflett, commit-queue, jsbell, mitz, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 124521    
Attachments:
Description Flags
Index *writing* patch, v1
none
Writing v2 - Fix style nit.
andersca: review+, andersca: commit-queue-
Reading patch v1 - Implement with a cursor! jer.noble: review+

Description Jon Lee 2014-01-29 16:29:53 PST
IDB: Index reading/writing

<rdar://problem/15899973>
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
http://trac.webkit.org/changeset/163170
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
http://trac.webkit.org/changeset/163246