Interface whose fields are table names defining tables.
Name of the table.
Tuple of the names of the table's key columns.
Defaults to []
, indicating no key columns. Supports up to 4 columns.
Columns to return from selection queries.
Defaults to ['*']
, returning all columns. May specify aliases.
Type of objects returned by select queries.
Type of objects inserted into the table.
Type of objects used to update rows of the table.
Columns to return from the table on insert
queries that return columns. ['*']
returns all columns; []
returns
none. May specify aliases. Defaults to KeyColumns
.
Columns to return from the table on update
queries that return columns. ['*']
returns all columns; []
returns
none and is the default. May specify aliases.
Type returned from inserts. Defaults to an object
whose properties are the columns of InsertReturnColumns
.
Type returned from updates. Defaults to an object
whose properties are the columns of UpdateReturnColumns
.
Optional
countTransformation to apply to bigint count results indicating the number of
rows affected, before returning the count to the client. count
is the
count returned by the query.
Optional
insertTransformation to apply to column values returned from inserts before
returning values to the client. When inferring type parameters, specify
a type for the source
parameter. source
is the object that was provided
for insertion, and returns
are the values returned from the insert.
Optional
insertTransformation to apply to inserted objects before insertion. source
is the object provided for insertion. Only the columns in columns
will
actually be inserted, with [*]
indicating all columns.
Optional
selectTransformation to apply to selected objects after retrieval from the
database and before returning to the client. row
is the selected
row, as returned by the Kysely query.
Optional
updateTransformation to apply to column values returned from updates before
returning values to the client. When inferring type parameters, specify
a type for the source
parameter. source
is the object that contained
the valiues with which the table row was updated, and returns
are the
values returned from the update.
Optional
updateTransformation to apply to objects provided for updating rows. source
is the object containing the values which which to update the table row.
Only the columns in columns
will actually be updated, with [*]
indicating all columns.
Generated using TypeDoc
Transformations to apply to values provided to and received from queries. All transformations are optional. When no transformation is provided, the value is passed through unchanged.
Type Param
of the count of the number of affected rows.