Database.createTable() method
Home > @direct-sqlite/core > Database > createTable
Database.createTable() method
Section titled “Database.createTable() method”Creates a table based on the provided configuration and returns a TableRunner for that table.
Signature:
createTable<T extends { $name: string; $createSql: string; $infer: any; }>(tableConfig: T): TableRunner<T["$infer"]>;Parameters
Section titled “Parameters”|
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 created table.