What structure is expected when using the http-proxy?

When I run this code i get a object with a empty id and name.
const db = drizzle(async (sql, params, method) => {
const result = await database.select(sql, params);

return {
rows: [
{
id: "1231",
name: "1231",
},
],
};
});

const results = await db
.select({
id: this.getDrizzleSchema().id,
name: this.getDrizzleSchema().name,
})
.from(this.getDrizzleSchema())
.execute();
const db = drizzle(async (sql, params, method) => {
const result = await database.select(sql, params);

return {
rows: [
{
id: "1231",
name: "1231",
},
],
};
});

const results = await db
.select({
id: this.getDrizzleSchema().id,
name: this.getDrizzleSchema().name,
})
.from(this.getDrizzleSchema())
.execute();
What is the expected return value?
3 Replies
Angelelz
Angelelz10mo ago
GitHub
drizzle-orm/examples/sqlite-proxy at main · drizzle-team/drizzle-orm
Headless TypeScript ORM with a head. Runs on Node, Bun and Deno. Lives on the Edge and yes, it's a JavaScript ORM too 😅 - drizzle-team/drizzle-orm
Thomas van der Westen
No, I am using a proxy in a different way. I am using this example:https://orm.drizzle.team/docs/get-started-sqlite#http-proxy
Drizzle ORM - next gen TypeScript ORM
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
Thomas van der Westen
Ok, the expected return is not a object but a array... For example:
rows = [['1', 'name']];
rows = [['1', 'name']];
Want results from more Discord servers?
Add your server