storage.SqlStatement
One SQL statement and the values bound to its placeholders, for running raw SQL.
Utilização
Describe a parameterized statement for a SQL integration.
// Describe a parameterized statement for a SQL integration.
import type { storage } from 'kuito';
export function noteInsert(id: string, body: string): storage.SqlStatement {
const params: storage.SqlValue[] = [id, body];
return { sql: 'INSERT INTO notes (id, body) VALUES (?, ?)', params };
}
// These are data types, not a public raw-SQL executor. App writes use db.table().Declaração do tipo
export type SqlStatement = { sql: string; params: SqlValue[] };Membros 2
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
sql | string | Sim | — |
params | SqlValue[] | Sim | — |
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.