PizzaConsole
PizzaConsole
Explore posts from servers
DTDrizzle Team
Created by jakeleventhal on 12/22/2023 in #help
Is it advised to always specify columns
https://orm.drizzle.team/docs/select#basic-and-partial-select
Drizzle always explicitly lists columns in the select clause instead of using select *. This is required internally to guarantee the fields order in the query result, and is also generally considered a good practice.
2 replies
DTDrizzle Team
Created by PizzaConsole on 10/10/2023 in #help
Cannot join tables where the columns name are the same.
that did not work for me
27 replies
DTDrizzle Team
Created by PizzaConsole on 10/10/2023 in #help
Cannot join tables where the columns name are the same.
Based on the PR, it could be D1 specific. Rather it appears that they intentionally let it overwrite https://github.com/cloudflare/workerd/pull/911/files
27 replies
DTDrizzle Team
Created by PizzaConsole on 10/10/2023 in #help
Cannot join tables where the columns name are the same.
Curious on the boolean type thing.
27 replies
DTDrizzle Team
Created by PizzaConsole on 10/10/2023 in #help
Cannot join tables where the columns name are the same.
Would it be a libsql thing then? Like does Turso have the same behavior?
27 replies
DTDrizzle Team
Created by PizzaConsole on 10/10/2023 in #help
Cannot join tables where the columns name are the same.
Bingo, thanks for detailing it out 🎉
27 replies
DTDrizzle Team
Created by PizzaConsole on 10/10/2023 in #help
Cannot join tables where the columns name are the same.
If the column names are the same then it has a fit
27 replies
DTDrizzle Team
Created by PizzaConsole on 10/10/2023 in #help
Cannot join tables where the columns name are the same.
There is a work around use the sql`` raw where you need to name your columns differently
27 replies
DTDrizzle Team
Created by francis on 9/4/2023 in #help
Drizzle join in a subquery results in ambiguous columns
26 replies
DTDrizzle Team
Created by PizzaConsole on 8/6/2023 in #help
Error introspecting Supabase auth schema
I hoenstly, Do not remember. I think I ended up not introspecting the auth schema, but I have since stopped using Supabase and moved to Cloudflare D1
3 replies
DTDrizzle Team
Created by Hegar on 7/2/2023 in #help
Typescript path alias not working properly
No description
13 replies
DTDrizzle Team
Created by PizzaConsole on 8/22/2023 in #help
Write
I can see some use cases for it. Though I personally do not probably need it at this moment
19 replies
DTDrizzle Team
Created by PizzaConsole on 8/22/2023 in #help
Write
Neither. Changing the toSql() to include the column renames
19 replies
DTDrizzle Team
Created by PizzaConsole on 8/22/2023 in #help
Write
Gotcha, I noticed that mapping happened on the Drizzle side. Is this something that the team would consider changing in the future?
19 replies
DTDrizzle Team
Created by PizzaConsole on 8/22/2023 in #help
Write
select "users"."id" as "field1", "users"."name" as "field2" from "users";
select "users"."id" as "field1", "users"."name" as "field2" from "users";
19 replies
DTDrizzle Team
Created by PizzaConsole on 8/22/2023 in #help
Write
Have you noticed that the toSQL() does not generated the column renames like it shows in the docs
const result = await db.select({
field1: users.id,
field2: users.name,
}).from(users);

const { field1, field2 } = result[0];
const result = await db.select({
field1: users.id,
field2: users.name,
}).from(users);

const { field1, field2 } = result[0];
19 replies
DTDrizzle Team
Created by PizzaConsole on 8/22/2023 in #help
Write
Hmmm, anyway to mock the connection to the database?
19 replies