A collection of bind parameters suitable for passing to a prepared statement.
This can either be an array of SqlValue
s or an object whose values all
conform to the SqlValue
definition.
If an array is supplied then its elements will be bound to the statement's positional parameters (or to named parameters in the order in which they occur). If an object is supplied then its keys will be bound to the query's named parameters, and an error will be raised if there are any keys that do not correspond to a named parameter in the query.
Please note that the symbol at the start of a bind parameter is considered to be part of the parameter's name.
Bind parameter or result set value for an SQL statement.
SQLite types are mapped to JavaScript types as follows:
SQLite | JavaScript |
---|---|
NULL |
null |
INTEGER |
bigint |
REAL |
number |
TEXT |
string |
BLOB |
ArrayBuffer |
INTEGER
s are 64-bit signed integers. Attempting to bind a BigInt
whose magnitude is too great to store in a 64-bit signed integer
representation will result in an error.number
s are always bound to statement parameters as double-
precision floating point values, irrespective of whether or not they have
a fractional component.Generated using TypeDoc
SQLite NAPI binding. The Database class (referred to as "
default
" on the API documentation page) is the default export for this module.