DT
Drizzle TeamDellgenius
db.select returning [], but a directly executed neon sql statement returns data.
Hi, here is my code.
export const getData = async () => {
console.log("neon", await sql_neon
SELECT * FROM todo WHERE id = ${1});
console.log("drizzle", await db.select().from(todo));
};
Here is the console output on the server:
neon [ { id: 1, text: 'asdf', done: true } ]
Query: select "id", "text", "done" from "todo"
drizzle []
The second line is from the drizzle debugger. I'm really confused about what's going on. I am using the default code from the nextjs neon todo from the docs. I can successfully insert, but can't select anything. I've been left scratching my head and have no clue why this is happening. Thanks for any help.The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
7.3KMembers
View on DiscordWant results from more Discord servers?
More PostsHow to add multiple tables in a single export objectSo for example I have these tables
```
export const orderssection = mysqlTable('orderssection', {
Error: No database connection string was provided to `neon()`.Hi.
Here is my code:
`import { neon } from "@neondatabase/serverless";
import "dotenv/config";
im