Skip to main content

Plugin system

Plugins are classes that implement KyselyPlugin. Plugins are then added to the Kysely instance as follows:

const db = new Kysely<Database>({
dialect: new PostgresDialect({
database: 'kysely_test',
host: 'localhost',
}),
plugins: [new CamelCasePlugin()],
})

Built-in plugins

Camel case plugin

A plugin that converts snake_case identifiers in the database into camelCase in the JavaScript side. Learn more.

Deduplicate joins plugin

Plugin that removes duplicate joins from queries. You can read more about it in the examples section or check the API docs.