DYELbrah
DYELbrah
Explore posts from servers
DTDrizzle Team
Created by DYELbrah on 10/19/2024 in #help
DrizzleKit check constraint generation missing value
Oh snap, noted. Perhaps the TypeScript types could be improved to force no raw numerics in there? Although that would be quite difficult since gt() is used in regular queries as well. Should we also do this when running regular queries?
6 replies
DTDrizzle Team
Created by zerokelvin on 9/18/2024 in #help
How do I order by average rating?
Would also be nicely testable
10 replies
DTDrizzle Team
Created by zerokelvin on 9/18/2024 in #help
How do I order by average rating?
Probably a switch statement? or just a separate function that returns asc or desc
10 replies
DTDrizzle Team
Created by zerokelvin on 9/18/2024 in #help
How do I order by average rating?
The ternary operators back to back is painful
10 replies
DTDrizzle Team
Created by benjick on 6/1/2024 in #help
Noob question about DROP TABLE ordering
@benjick you figure this out? we can't drop a table either because of this. I'm pretty sure drizzle-kit should've deleted all references to the table first THEN dropped the table...
4 replies
DTDrizzle Team
Created by Stefano Sandes on 5/10/2024 in #help
Supabase is comparing my schema objects against built-in Supabase schemas.
Bump, anyone else seeing this?
4 replies
DTDrizzle Team
Created by DYELbrah on 3/16/2024 in #help
Will Drizzle throw when we attempt to update and zero records where updated?
Sweet, I will have to run .returning() and ensure the right number of records are returned else throw in transaction
3 replies
TTCTheo's Typesafe Cult
Created by DYELbrah on 3/6/2024 in #questions
Inside create t3 app with Drizzle, why do we pass the database through ctx on each procedure?
Sweet, I think I will use imports then. Specifically since this will allow our layered architecture to stay clean. We go from Router Layer > Service Layer > Data Access. At any time we can swap out Drizzle to any ORM in the Data Access layer which is great. Having an orm implementation directly in the ctx of TRPC forces us to commit to Drizzle / sort of hops from Data Access to Router.
11 replies
DTDrizzle Team
Created by DYELbrah on 12/22/2023 in #help
$with using sql operator doesn't return type?
Thank you!
6 replies
DTDrizzle Team
Created by DYELbrah on 12/22/2023 in #help
$with using sql operator doesn't return type?
I figured it out, I was missing the .as('primary_address') after the sql`` operator use
6 replies
DTDrizzle Team
Created by itsyoboieltr on 10/6/2023 in #help
Is it possible to use the "unaccent" extension with drizzle?
Lol pretty genius I like it
18 replies
DTDrizzle Team
Created by DYELbrah on 9/7/2023 in #help
Timestamp from Postgres returns date object despite schema using string mode?
Thanks
15 replies
DTDrizzle Team
Created by DYELbrah on 9/7/2023 in #help
Timestamp from Postgres returns date object despite schema using string mode?
wait nvm that workaround should work sweet, I thought we had to add a transformation to drizzle itself somewhere.
15 replies
DTDrizzle Team
Created by DYELbrah on 9/7/2023 in #help
Timestamp from Postgres returns date object despite schema using string mode?
Damn I can't implement a workaround because my team creates migration files and use the Supabase CLI to handle migrations, then we just use drizzle kit introspect...
15 replies
DTDrizzle Team
Created by DYELbrah on 9/7/2023 in #help
Timestamp from Postgres returns date object despite schema using string mode?
@Gavin are you still having the same issue?
15 replies
DTDrizzle Team
Created by DYELbrah on 9/7/2023 in #help
Timestamp from Postgres returns date object despite schema using string mode?
Yeah this is absolutely terrible, I don't understand how this isn't a bigger deal? How are people not running into this?
15 replies
DTDrizzle Team
Created by DYELbrah on 9/10/2023 in #help
Expected 1 arguments, but got 2.ts(2554)
Nvm was because I accidentally typed this inside an object. Didn't realize.
2 replies
DTDrizzle Team
Created by francis on 9/3/2023 in #help
Is there a recommended way to find or create a record? (postgres)
I'd recommend this over triggers so you keep your logic primarily on the server
12 replies
DTDrizzle Team
Created by francis on 9/3/2023 in #help
Is there a recommended way to find or create a record? (postgres)
Why not just wrap this in a single transaction. Where you initiate transaction, if the record is not found, then continue within the same transaction and create the record?
12 replies
DTDrizzle Team
Created by hacktographer on 8/25/2023 in #help
How are you all seeding your database?
Write some jest scripts that use drizzle to add data to the database
11 replies