Does database casing work at all?

In database you can provide object with db or dialect and there is also casing, but does it work?
import { betterAuth } from "better-auth"
import Database from "better-sqlite3"
import { Kysely, SqliteDialect } from "kysely"

export const auth = betterAuth({
database: {
// This
dialect: new SqliteDialect({
database: new Database(":memory:"),
}),

// Or this
// db: new Kysely({
// dialect: new SqliteDialect({
// database: new Database(":memory:"),
// }),
// }),

type: "sqlite",
casing: "snake", // <=== DOESN'T WORK
},
})
import { betterAuth } from "better-auth"
import Database from "better-sqlite3"
import { Kysely, SqliteDialect } from "kysely"

export const auth = betterAuth({
database: {
// This
dialect: new SqliteDialect({
database: new Database(":memory:"),
}),

// Or this
// db: new Kysely({
// dialect: new SqliteDialect({
// database: new Database(":memory:"),
// }),
// }),

type: "sqlite",
casing: "snake", // <=== DOESN'T WORK
},
})
When I do npx @better-auth/cli generate it generates SQL with camelCase, not snake_case, is this broken or I am doing something wrong?
2 Replies
Ping
Ping2mo ago
Yeah you can ignore the casing, it's useless.
mymmrac
mymmracOP2mo ago
Ok, got it, thanks

Did you find this page helpful?