Skip to main content
Go to Latest
method PreparedQuery.prototype.one
import { PreparedQuery } from "https://deno.land/x/sqlite@v3.4.1/mod.ts";

Binds the given parameters to the query and returns exactly one row.

If the query does not return exactly one row, this throws an error.

Calling one invalidates any iterators previously returned by calls to iter. Using an invalidated iterator is a bug.

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.

Parameters

optional
params: P