Skip to main content
Go to Latest
type alias QueryParameter
import { type QueryParameter } from "https://deno.land/x/sqlite@v3.7.2/mod.ts";

Possible parameter values to be bound to a query.

When values are bound to a query, they are converted between JavaScript and SQLite types in the following way:

JS type in SQL type JS type out
number INTEGER or REAL number
bigint INTEGER number or bigint
boolean INTEGER number
string TEXT string
Date TEXT string
Uint8Array BLOB Uint8Array
null NULL null
undefined NULL null

If no value is provided for a given parameter, SQLite will default to NULL.

If a bigint is bound, it is converted to a signed 64 bit integer, which may overflow.

If an integer value is read from the database, which is too big to safely be contained in a number, it is automatically returned as a bigint.

If a Date is bound, it will be converted to an ISO 8601 string: YYYY-MM-DDTHH:MM:SS.SSSZ. This format is understood by built-in SQLite date-time functions. Also see https://sqlite.org/lang_datefunc.html.

definition:
| boolean
| number
| bigint
| string
| null
| undefined
| Date
| Uint8Array