Skip to content

Database.table() method

Home > @direct-sqlite/core > Database > table

Initializes a TableRunner for an existing table in the database, allowing for fluent query building and execution.

Signature:

table<T extends {
$name: string;
$infer: any;
}>(tableConfig: T): TableRunner<T["$infer"]>;

Parameter

Type

Description

tableConfig

T

An object containing the table name, SQL creation statement, and an inference type for the table’s rows.

Returns:

TableRunner<T[“$infer”]>

A TableRunner instance for the specified table.