Closed Bug 692630 Opened 13 years ago Closed 13 years ago

IndexedDB: multiEntry indexes

Categories

(Core :: Storage: IndexedDB, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sicking, Assigned: sicking)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

Search spec for "multientry"
Jonas says he's going to do this.
Assignee: nobody → jonas
No longer depends on: 692614
Attached patch Patch to fix (deleted) — Splinter Review
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+
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Summary: IndexedDB: multientry indexes → IndexedDB: multiEntry indexes
Component: DOM → DOM: IndexedDB
Target Milestone: mozilla11 → ---
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: