Closed
Bug 272974
Opened 20 years ago
Closed 20 years ago
nice scriptable wrappers for storage
Categories
(Core :: SQLite and Embedded Database Bindings, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: vlad, Assigned: vlad)
Details
Attachments
(1 file)
|
64.91 KB,
patch
|
Details | Diff | Splinter Review |
Attached patch implements some nice scriptable wrappers for storage, allowing
for stuff like:
var stmt = dbconn.createStatement(sql);
var wrapper =
Components.classes["@mozilla.org/storage/statement-wrapper;1"].createInstance(Components.interfaces.mozIStorageStatementWrapper);
wrapper.initialize(stmt)
wrapper(1, 2, 3); // call wrapper function with 1,2,3 args
while (wrapper.step()) {
dump(wrapper.row.columnA);
dump(wrapper.row.columnB);
}
wrapper.params[0] = 1;
wrapper.params[1] = 2;
while (wrapper.step()) {
...
}| Assignee | ||
Comment 1•20 years ago
|
||
Note that this patch will allow us to split out this wrapper from the rest of storage, ensuring that the core storage interface has no dependency on js/xpconnect. Some file reorg will need to happen for that, so punting on that until later.
| Assignee | ||
Updated•20 years ago
|
Attachment #167740 -
Flags: first-review?(shaver)
Comment 2•20 years ago
|
||
Comment on attachment 167740 [details] [diff] [review] 272974-scriptable-storage-0.patch r=shaver with fixes to f2f-review comments.
Attachment #167740 -
Flags: first-review?(shaver) → first-review+
| Assignee | ||
Updated•20 years ago
|
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment 3•20 years ago
|
||
quick comment: snprintf should be PR_snprintf for portability.
Comment 4•20 years ago
|
||
(In reply to comment #3) > quick comment: snprintf should be PR_snprintf for portability. or PR_smprintf, then you don't need to do that length calculation yourself
Updated•18 years ago
|
Flags: in-testsuite?
Updated•1 day ago
|
Product: Toolkit → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•