📄️ A single column
Select a single column:
📄️ Column with a table
Select a single column and specify a table:
📄️ Multiple columns
Select multiple columns:
📄️ Aliases
You can provide an alias for the selections by appending as the_alias to the selection.
📄️ Complex selections
You can select arbitrary expression including subqueries and raw sql snippets.
📄️ Function calls
This example uses the fn module to select some aggregates:
📄️ Distinct
Examples
📄️ Distinct on
The API documentation is packed with examples. The API docs are hosted here
📄️ All columns
The selectAll method generates SELECT *:
📄️ All columns of a table
Select all columns of a table:
📄️ Nested array
While kysely is not an ORM and it doesn't have the concept of relations, we do provide
📄️ Nested object
While kysely is not an ORM and it doesn't have the concept of relations, we do provide