Usage

Describe a parameterized statement for a SQL integration.

tsx
// 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().

Type declaration

ts
export type SqlStatement = { sql: string; params: SqlValue[] };

Members 2

NameTypeRequiredDescription
sqlstringYes—
paramsSqlValue[]Yes—
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.