SKUZZIE
DTDrizzle Team
•Created by gwilliamnn on 11/11/2024 in #help
With Query mode, is possible filter by a related table?
Not currently, you can follow the discussion around this here: https://github.com/drizzle-team/drizzle-orm/discussions/1152
Basically, wait for the V2 release or just stick to manually building the queries with aggregations.
3 replies
DTDrizzle Team
•Created by SKUZZIE on 11/6/2024 in #help
Do prepared statement names matter?
Interesting. If Drizzle prepared statements are separate I don't see the need for the name other than for identifying it in logging. I'm curious if someone who knows more about it can chime in.
7 replies
DTDrizzle Team
•Created by SKUZZIE on 11/6/2024 in #help
Do prepared statement names matter?
I guess the Postgres docs clarifies a bit:
An arbitrary name given to this particular prepared statement. It must be unique within a single session and is subsequently used to execute or deallocate a previously prepared statement.But the wording on the Drizzle docs makes it sound like the statement is prepared within Drizzle, not the database:
With prepared statements you do SQL concatenation once on the Drizzle ORM side and then database driver is able to reuse precompiled binary SQL instead of parsing query all the time.
7 replies
DTDrizzle Team
•Created by SKUZZIE on 12/14/2023 in #help
Upsert with multi-column unique index?
Oh my gosh I think I figured it out. It's because I had
ad_id
set as the primary key, but I really want both ad_id
and date
to be the primary key. The upsert was working, it was erroring when I was creating another record with the same primary key (as it's supposed to).
Thank you for your help @solo @Angelelz !!!28 replies
DTDrizzle Team
•Created by SKUZZIE on 12/14/2023 in #help
Upsert with multi-column unique index?
I was going to try the last two ideas you had, but doing either throws type errors. Are you sure doing that is supported in Drizzle?
28 replies
DTDrizzle Team
•Created by SKUZZIE on 12/14/2023 in #help
Upsert with multi-column unique index?
This is the error again:
28 replies
DTDrizzle Team
•Created by SKUZZIE on 12/14/2023 in #help
Upsert with multi-column unique index?
@solo Unfortunately I'm still getting the same error. This is what I changed my code to:
28 replies
DTDrizzle Team
•Created by SKUZZIE on 12/14/2023 in #help
Upsert with multi-column unique index?
Yeah here's the full error:
Let me test without the
ISOString
, thank you!!28 replies