Closed
Bug 692629
Opened 13 years ago
Closed 13 years ago
IndexedDB: Support IDBObjectStore/IDBIndex.count
Categories
(Core :: Storage: IndexedDB, defect)
Core
Storage: IndexedDB
Tracking
()
RESOLVED
FIXED
People
(Reporter: sicking, Assigned: bent.mozilla)
References
Details
(Keywords: dev-doc-complete, Whiteboard: [inbound])
Attachments
(1 file, 1 obsolete file)
27.11 KB,
patch
|
sicking
:
review+
|
Details | Diff | Splinter Review |
Takes a keyrange or a value
Assignee | ||
Comment 1•13 years ago
|
||
Assignee | ||
Comment 2•13 years ago
|
||
Better index query.
Attachment #571025 -
Attachment is obsolete: true
Attachment #571025 -
Flags: review?(jonas)
Attachment #571059 -
Flags: review?(jonas)
Reporter | ||
Comment 3•13 years ago
|
||
Comment on attachment 571059 [details] [diff] [review] Patch, v1.1 Review of attachment 571059 [details] [diff] [review]: ----------------------------------------------------------------- r=me ::: dom/indexedDB/IDBIndex.cpp @@ +1456,5 @@ > + NS_NAMED_LITERAL_CSTRING(id, "id"); > + > + nsCString query = NS_LITERAL_CSTRING("SELECT count(*) FROM ") + table + > + NS_LITERAL_CSTRING(" WHERE index_id = :") + id + > + keyRangeClause; Why not make the middle line: NS_LITERAL_CSTRING(" WHERE index_id = :id") + ::: dom/indexedDB/IDBObjectStore.cpp @@ +2402,5 @@ > + } > + > + nsCString query = NS_LITERAL_CSTRING("SELECT count(*) FROM ") + table + > + NS_LITERAL_CSTRING(" WHERE object_store_id = :") + osid + > + keyRangeClause; Same here
Attachment #571059 -
Flags: review?(jonas) → review+
Comment 4•13 years ago
|
||
Landing on inbound in: https://hg.mozilla.org/integration/mozilla-inbound/rev/b5c0bfd03fcf Backed out for failing to build on any platform: https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=5675bf2c7930 https://hg.mozilla.org/integration/mozilla-inbound/rev/72042cd154b9
OS: Mac OS X → All
Hardware: x86 → All
Assignee | ||
Comment 5•13 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/776dc60cee13
Whiteboard: [inbound]
Assignee | ||
Comment 6•13 years ago
|
||
(In reply to Jonas Sicking (:sicking) from comment #3) > Why not make the middle line: > > NS_LITERAL_CSTRING(" WHERE index_id = :id") + It's to avoid making more string data. We do the same all over indexeddb code.
Comment 7•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/776dc60cee13
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
Updated•13 years ago
|
Keywords: dev-doc-needed
Comment 8•13 years ago
|
||
I'm in the process of documenting this change. If I understand well both the code and the spec (and its history), right now (i.e. in Firefox 10), the two new methods implemented by this bug raise IDBDatabaseException and not yet raw DOMException as in the spec. The change in exception will come in the future in bug 693061. Is this correct?
Reporter | ||
Comment 9•13 years ago
|
||
Yes, that's correct.
Comment 10•13 years ago
|
||
Thank you. Grendel already updated https://developer.mozilla.org/en/IndexedDB/IDBIndex#count I updated: https://developer.mozilla.org/en/IndexedDB/IDBObjectStore#count and of course: https://developer.mozilla.org/en/Firefox_10_for_developers
Keywords: dev-doc-needed → dev-doc-complete
Component: DOM → DOM: IndexedDB
Target Milestone: mozilla10 → ---
Version: Trunk → unspecified
You need to log in
before you can comment on or make changes to this bug.
Description
•