Automatically convert binary to string

export const table = mysqlTable(
'table',
{
id: binary('id', { length: 16 }).notNull().primaryKey(),
}
)
export const table = mysqlTable(
'table',
{
id: binary('id', { length: 16 }).notNull().primaryKey(),
}
)
Is there a way to have drizzle always convert the binary "id" to a string when querying? Could a custom type handle the conversion bi-directionally(string to buffer and buffer to string)?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server