import { Statement } from "https://deno.land/x/sqlite3@0.7.2/mod.ts";
Represents a prepared statement.
See Database#prepare
for more information.
Constructors
new
Statement(db: Database, sql: string)Properties
Methods
all<T extends Record<string, unknown> = Record<string, any>>(...args: RestBindParameters): T[]
Run the query and return the resulting rows where rows are objects mapping column name to their corresponding values.
bind(...params: RestBindParameters): this
Bind parameters to the statement. This method can only be called once to set the parameters to be same throughout the statement. You cannot change the parameters after this method is called.
This method is merely just for optimization to avoid binding parameters each time in prepared statement.
columnNames(): string[]
get<T extends Record<string, unknown>>(...params: RestBindParameters): T | undefined
Fetch only first row as an object, if any.
getRowObject(): () => any
run(...args: RestBindParameters): number
Simply run the query without retrieving any output there may be.
value<T extends Array<unknown>>(...params: RestBindParameters): T | undefined
Fetch only first row as an array, if any.
values<T extends unknown[] = any[]>(...args: RestBindParameters): T[]
Run the query and return the resulting rows where rows are array of columns.