Skip to main content
Module

x/denodb/deps.ts>SQLiteClient#query

MySQL, SQLite, MariaDB, PostgreSQL and MongoDB ORM for Deno
Go to Latest
method SQLiteClient.prototype.query
import { SQLiteClient } from "https://deno.land/x/denodb@v1.0.40/deps.ts";

Query the database and return all matching rows.

This is equivalent to calling all on a prepared query which is then immediately finalized.

The type parameter R may be supplied by the user to indicated the type for the rows returned by the query. Notice that the user is responsible for ensuring the correctness of the supplied type.

To avoid SQL injection, user-provided values should always be passed to the database through a query parameter.

See QueryParameterSet for documentation on how values can be bound to SQL statements.

See QueryParameter for documentation on how values are returned from the database.

Type Parameters

optional
R extends Row = Row

Parameters

sql: string
optional
params: QueryParameterSet

Returns

Array<R>