-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Report hasn't been filed before.
- I have verified that the bug I'm about to report hasn't been filed before.
What version of drizzle-orm
are you using?
0.44.5
What version of drizzle-kit
are you using?
none
Other packages
No response
Describe the Bug
import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core";
import {drizzle} from "drizzle-orm/sqlite-proxy"
export const usersTable = sqliteTable("users_table", {
id: integer().primaryKey({ autoIncrement: true }),
name: text().notNull(),
createdAt: integer({mode:"timestamp"})
});
const db = drizzle(async (sql, params, method)=>{
console.log({
sql, params, method
});
return {
rows:[]
}
}, {
casing: "snake_case",
schema: {
usersTable
}
})
await db.query.usersTable.findMany()
When executing the code, the expected output case style is snake_case.
The actual output is:
{
sql: "select \"id\", \"name\", \"createdAt\" from \"users_table\" \"usersTable\"",
params: [],
method: "all",
}
where "createdAt" was not converted to "created_at".
hauserkristof
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working