effect
effect copied to clipboard
sql-kysely: kysely plugins not honored when using effect/sql client backend
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?