where clauses, the expression builder’s and and or, ordering and limits each become a bullet, and the like patterns read as “ends with” or “contains”. Inserts and updates list the columns they set, and upserts say what happens on a conflict.
library: { name: "kysely", versions: ">=0.27 <1" }. It only narrates files that import kysely or belong to a package that depends on it (see Dependency detection), and Drizzle and other query builders are left alone. Kysely’s sql template tag is read by the SQL plugin.
Examples
A select with a join
English
Writes and an upsert
English
A transaction
English
What it covers
selectFromwithselect, joins (including callback and left joins),where,having,groupBy,orderBy,limit,offsetanddistinct.- The expression builder:
eb(...)comparisons,and,or,not,existssubqueries, aggregates, JSON helpers, and destructured or typed builder parameters. executeTakeFirst,executeTakeFirstOrThrow,executeandcompile.- Writes:
insertIntowith one or many rows,onConflict,returning,updateTableanddeleteFrom. - Transactions with an isolation level,
$if, and clauses added to a builder held in a variable.
Translating
The English phrasebook is exported asen and typed as KyselyPhrases.