Vinny
Vinny
DTDrizzle Team
Created by Vinny on 4/21/2024 in #help
How can I get rid of the buffer object returned when using Magical sql operator?
This is and example of how I execute the query:
const id = 69;
await db.execute(sql`select * from ${usersTable} where ${usersTable.id} = ${id}`)
`)

return NextResponse.json({ menu });
const id = 69;
await db.execute(sql`select * from ${usersTable} where ${usersTable.id} = ${id}`)
`)

return NextResponse.json({ menu });
Which returns the data with a _bug object that I don't need.
{
"menu": [
[
{
"id": 1,
"title": "Steak & Frites",
"description": "Delicious steak rib with french fries",
"price": "35.00",
"status": "available",
"name": "Main Course"
}
],
[
{
"_buf": {
"type": "Buffer",
"data": [
....
]
{
"menu": [
[
{
"id": 1,
"title": "Steak & Frites",
"description": "Delicious steak rib with french fries",
"price": "35.00",
"status": "available",
"name": "Main Course"
}
],
[
{
"_buf": {
"type": "Buffer",
"data": [
....
]
1 replies
DTDrizzle Team
Created by Vinny on 3/10/2024 in #help
Error Too many connections with Drizzle + MySQL2
No description
13 replies
DTDrizzle Team
Created by Vinny on 2/18/2024 in #help
How can I make my Postgres schema automatically insert `UTC` time when using `defaultNow()`?
The example below is inserting the time using the timezone of my computer instead of UTC.
createdAt: timestamp('created_at').defaultNow(),
createdAt: timestamp('created_at').defaultNow(),
4 replies