Open
Bug 1326565
Opened 8 years ago
Updated 2 months ago
Add a way to get the name of a column in a row
Categories
(Core :: SQLite and Embedded Database Bindings, defect, P3)
Core
SQLite and Embedded Database Bindings
Tracking
()
NEW
People
(Reporter: lina, Unassigned)
References
(Depends on 1 open bug)
Details
Attachments
(1 file)
59 bytes,
text/x-review-board-request
|
Details |
Earlier, I wanted to dump a table's contents for debugging, similar to http://searchfox.org/mozilla-central/rev/51aa673e28802fe6ea89f4793721fc55334a6ac8/toolkit/components/places/tests/head_common.js#243-289.
It looks like I can get the column names using `mozIStorageStatement.getColumnName`, but, AFAICT, that's only implemented for synchronous statements. I'm also using Sqlite.jsm, which only exposes `mozIStorageRow` objects.
I could open a synchronous DB connection and dump the table that way. Since rows already store the column names, though, I thought it would make sense to add a `getColumnName` method to `mozIStorageRow`. It's only really useful for debugging, but I'm submitting a patch with a basic test in case it's useful.
Comment hidden (mozreview-request) |
Comment 2•8 years ago
|
||
off-hand, it would be much better if we'd have bug 512761, then you could probably just use common javascript syntax to get the keys, rather than adding further API complication to mozIStorageRow. So, if you'd have any time and ideas to complete that patch instead, that'd be very welcome.
In the lack of that, your request is understandable and we can probably take this.
Reporter | ||
Comment 3•8 years ago
|
||
Comment on attachment 8822911 [details]
Bug 1326565 - Add `mozIStorageRow.getColumnName`.
(In reply to Marco Bonardo [::mak] from comment #2)
> off-hand, it would be much better if we'd have bug 512761, then you could
> probably just use common javascript syntax to get the keys, rather than
> adding further API complication to mozIStorageRow.
Interesting, thanks for the pointer! I'm on PTO this week, but I'll have a look at Shawn's patch on bug 512761 when I get back. Clearing review in the meantime.
Attachment #8822911 -
Flags: review?(mak77)
Updated•8 years ago
|
Priority: -- → P3
Reporter | ||
Comment 4•7 years ago
|
||
I'm not likely to get back to untangling the XPConnect magic in bug 512761 soon, so unassigning myself for now, sorry.
Assignee: kit → nobody
Status: ASSIGNED → NEW
Updated•2 years ago
|
Severity: normal → S3
Updated•2 months ago
|
Product: Toolkit → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•