mozIStorageStatement and mozIStorageValueArray use 0-based indices, when sqlite uses 1-based indices

RESOLVED WONTFIX

Status

()

Toolkit
Storage
--
enhancement
RESOLVED WONTFIX
11 years ago
9 years ago

People

(Reporter: sdwilsh, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

11 years ago
I hope I got all the consumers mailed in the cc list...

I'd like to have mozIStorageStatement and mozIStorageValueArray use 1-based indices instead of 0-based ones we currently use.  This is mostly to provide compatibility with what sqlite uses when binding parameters.

Basically, all calls to Bind*Parameter(#, value) need to go to Bind*Parameter(# + 1, value), and similarly for all GetAs* calls.

Taras, would this be a good use of oink?
I think the right solution is for all callers in the tree to use named parameters, if we support them; if we don't, we should.  They're far, far less fragile, and you don't have the index mismatch between SQL statements and C and JS indexing.
It looks like PHP's PDO and Perl's DBI use 1-based indexes as well, fwiw.
(Reporter)

Comment 3

9 years ago
Can't change this any time soon sadly...
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.