Closed
Bug 692630
Opened 13 years ago
Closed 13 years ago
IndexedDB: multiEntry indexes
Categories
(Core :: Storage: IndexedDB, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: sicking, Assigned: sicking)
References
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
(deleted),
patch
|
bent.mozilla
:
review+
|
Details | Diff | Splinter Review |
Search spec for "multientry"
Depends on: 692614
Jonas says he's going to do this.
Assignee: nobody → jonas
No longer depends on: 692614
Assignee | ||
Comment 2•13 years ago
|
||
Attachment #578075 -
Flags: review?(bent.mozilla)
Comment on attachment 578075 [details] [diff] [review]
Patch to fix
Review of attachment 578075 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/base/nsDOMClassInfo.cpp
@@ +1892,5 @@
> SET_JSID_TO_STRING(sURL_id, cx, "URL");
> SET_JSID_TO_STRING(sKeyPath_id, cx, "keyPath");
> SET_JSID_TO_STRING(sAutoIncrement_id, cx, "autoIncrement");
> SET_JSID_TO_STRING(sUnique_id, cx, "unique");
> + SET_JSID_TO_STRING(sMultientry_id, cx,"multientry");
Nit, indent is off
::: dom/indexedDB/DatabaseInfo.h
@@ +151,5 @@
> ~IndexUpdateInfo();
> #endif
>
> + PRInt64 index_id;
> + bool index_unique;
Nit: underscores are for sql, lose them and go for interCaps here.
::: dom/indexedDB/IDBObjectStore.cpp
@@ +584,5 @@
>
> return true;
> }
>
> +/* static */
Nit: //
@@ +655,5 @@
> +
> + for (PRUint32 indexesIndex = 0; indexesIndex < count; indexesIndex++) {
> + const IndexInfo& indexInfo = aObjectStoreInfo->indexes[indexesIndex];
> +
> + nsresult rv = AddIndexUpdateInfo(indexInfo.id,
Nit: "AppendIndexUpdateInfo"
@@ +661,5 @@
> + indexInfo.unique,
> + indexInfo.multientry,
> + aCx,
> + aObject,
> + aUpdateInfoArray);
Nit: see if you can fit more than one arg on a line :)
@@ +774,5 @@
> rv = updateInfo.value.BindToStatement(stmt, value);
> NS_ENSURE_SUCCESS(rv, rv);
>
> rv = stmt->Execute();
> + if (rv == NS_ERROR_STORAGE_CONSTRAINT && updateInfo.index_unique &&
Let's not do another db query here, just walk backwards in aUpdateInfoArray to see if it's in the list for the same index id.
@@ +2314,1 @@
> NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
Blegh. Just do NS_ENSURE_SUCCESS followed by |if (!hasResult)|.
@@ +2357,3 @@
> Key key;
> + if (!mIndex->IsAutoIncrement()) {
> + NS_NAMED_LITERAL_CSTRING(objectDataKey, "object_data_key");
Why is this here?
@@ +2370,5 @@
> + key,
> + mIndex->IsAutoIncrement(),
> + false,
> + objectDataID,
> + updateInfo);
Nit: More than one arg on a line!
::: dom/indexedDB/IDBTransaction.cpp
@@ +425,5 @@
> );
> }
>
> already_AddRefed<mozIStorageStatement>
> +IDBTransaction::UniqueDataObjectKey(bool aAutoIncrement)
I think you can get rid of this now.
Attachment #578075 -
Flags: review?(bent.mozilla) → review+
Comment 4•13 years ago
|
||
This landed on inbound:
https://hg.mozilla.org/integration/mozilla-inbound/rev/513428a93700
But was backed out again:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8a2106940402
Comment 5•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Updated•13 years ago
|
Summary: IndexedDB: multientry indexes → IndexedDB: multiEntry indexes
Updated•13 years ago
|
Keywords: dev-doc-needed
Component: DOM → DOM: IndexedDB
Target Milestone: mozilla11 → ---
Version: Trunk → unspecified
Comment 6•9 years ago
|
||
multiEntry already documented at
https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/createIndex#Parameters
Added a note to
https://developer.mozilla.org/en-US/Firefox/Releases/11#IndexedDB
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•