import { Statement } from "https://deno.land/x/sqlite3@0.5.1/mod.ts";
Represents a prepared statement.
See Database#prepare
for more information.
Constructors
new
Statement(db: Database, sql: string)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.
run(...args: RestBindParameters): number
Simply run the query without retrieving any output there may be.
values<T extends unknown[] = any[]>(...args: RestBindParameters): T[]
Run the query and return the resulting rows where rows are array of columns.