$with is not taking an Insert with a return
example
const chatId = db.$with("chatIdQ").as(
db.insert(chats).values({
receiverId: 21,
userId: 20,
}),
);
// using the with clause
this errors out like this
i tried writing raw sql but got the same error but i dont know if i did this correct.
would appreciate the help
const chatId = db.$with("chatIdQ").as(
db.insert(chats).values({
receiverId: 21,
userId: 20,
}),
);
// using the with clause
this errors out like this
getTableData was not found is there a way to get around this? i tried writing raw sql but got the same error but i dont know if i did this correct.
would appreciate the help