effect icon indicating copy to clipboard operation
effect copied to clipboard

sql-kysely: kysely plugins not honored when using effect/sql client backend

Open jvliwanag opened this issue 7 months ago • 0 comments

What version of Effect is running?

@effect/sql-kysely 0.33.1

What steps can reproduce the bug?

Create a kysely using @effect/sql-kysely/Pg.

import * as PgKysely from "@effect/sql-kysely/Pg"
import { CamelCasePlugin } from "kysely"

PgKysely.make<Schema.DB>({
  plugins: [new CamelCasePlugin()],
})

What is the expected behavior?

Query variables and results are transformed to camel case.

What do you see instead?

No transformation happens.

Additional information

Workaround is to use native kysely instead:

import * as SqlKysely from "@effect/sql-kysely/Kysely";

SqlKysely.make<Schema.DB>({
      dialect: new PostgresDialect({
        pool: new Pool(),
      }),
      plugins: [new CamelCasePlugin()],
    })

If it seems plugins can't be supported, should we just blacklist plugins as well from the make options as we do so for dialect?

jvliwanag avatar May 29 '25 09:05 jvliwanag