MBrimmer
MBrimmer
Explore posts from servers
DTDrizzle Team
Created by MBrimmer on 11/7/2024 in #help
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)?
1 replies