mozIStorageStatementParams doesn't let you bind an array

NEW
Unassigned

Status

()

Toolkit
Storage
P3
normal
9 years ago
a year ago

People

(Reporter: sdwilsh, Unassigned)

Tracking

(Blocks: 2 bugs)

Trunk
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

9 years ago
And we really should be able to bind an array of ints, which is how we return binary blobs anyway.
Flags: in-testsuite?

Comment 1

8 years ago
bindBlobParameter() works fine, but i notice it's deprecated..
(Reporter)

Comment 2

8 years ago
(In reply to comment #1)
> bindBlobParameter() works fine, but i notice it's deprecated..
bindBlobByName or bindBlobByIndex have replaced it.

Updated

2 years ago
Priority: -- → P3
Depends on: 1336944
We could use https://www.sqlite.org/carray.html but we should be careful, the provided query should never allow an user provided argument, we should only support it through Storage API. Note: I'm not sure which part of the carray syntax, if any, can be bound, I'm assuming its arguments can, so the idea currently is:
parse queries for "carray" and throw  if the any of its 2 arguments is not bound.
Sqlite.jsm may also allow something like "IN :myarray" or "IN ?" and just do a string replacement internally, while cpp API may only support a straight carray(?,?) or carray(:myarray, :mylen).
Blocks: 1336943
Blocks: 1047818
You need to log in before you can comment on or make changes to this bug.