The Builder Pattern
Every query in Kysely starts from theKysely instance and builds up through method chaining:
Immutability and Composability
Each method returns a new query builder instance, leaving the original unchanged:SELECT Queries
Basic Selection
WHERE Clauses
JOINs
Aggregation and Grouping
INSERT Queries
UPDATE Queries
DELETE Queries
Execution Methods
Kysely provides several methods to execute queries:Dynamic Queries
Build queries conditionally:Method Chaining Reference
Common method chains for each query type: SELECT:The type parameter changes as you chain methods, ensuring you can only reference columns and tables that are in scope.