Skip to main content
DatabaseSync.prototype.prepare - node__sqlite.d.ts - Node documentation
method DatabaseSync.prototype.prepare

Usage in Deno

```typescript import { DatabaseSync } from "node:node__sqlite.d.ts"; ```
DatabaseSync.prototype.prepare(sql: string): StatementSync
Compiles a SQL statement into a [prepared statement](https://www.sqlite.org/c3ref/stmt.html). This method is a wrapper around [`sqlite3_prepare_v2()`](https://www.sqlite.org/c3ref/prepare.html).

Parameters

sql: string
A SQL string to compile to a prepared statement.

Return Type

The prepared statement.