insert row, got values back, but there's not data stored on the db

No description
4 Replies
Angelelz
Angelelz12mo ago
Two questions, what driver are you using and are you running in a transaction? Are you using pool or single connection?
Thogn
ThognOP12mo ago
I'm using pg driver, im not running in a transaction?. im using single connection
const messagess = await db.query.messages.findMany({
where: (message, { eq }) => eq(message.conversationId, conversationId),
});
const mess = await db.select().from(messages).where(eq(messages.conversationId,conversationId))
const messagess = await db.query.messages.findMany({
where: (message, { eq }) => eq(message.conversationId, conversationId),
});
const mess = await db.select().from(messages).where(eq(messages.conversationId,conversationId))
for these queris, they achieve the samething. But the first one I got nothing back,
Angelelz
Angelelz12mo ago
You have to remember that uuids are not text columns
Angelelz
Angelelz12mo ago
Database Administrators Stack Exchange
In Postgres, how to select by a column of type UUID
I have a DB table that someone else created, its PK is a single column of type 'uuid'. I'm struggling to perform a simple select by that column. Examples I have tried with no success: select from ...
Want results from more Discord servers?
Add your server