LiquiFruit
DTDrizzle Team
•Created by LiquiFruit on 5/6/2024 in #help
How to type a Table
I would settle for a hack using
associations.$inferSelect
and Associations
where it checks if theyre equal somehow11 replies
DTDrizzle Team
•Created by LiquiFruit on 5/6/2024 in #help
How to type a Table
Im pretty sure this is a typescript skill issue but I think being able to define the type of a table as Im writing it would help.
11 replies
DTDrizzle Team
•Created by LiquiFruit on 5/6/2024 in #help
How to type a Table
Thanks for the help but Im not sure this is what Im looking for.
I typed my data access layer function
getAssociationByIdFromDb
as the Promise<type of associations.$inferSelect | undefined>
but it doesn't solve my issue as seen below.11 replies
DTDrizzle Team
•Created by LiquiFruit on 12/5/2023 in #help
Refactor transaction to batched expression
Yea I think that's gonna be the best solution -- to write raw sql.
Ill keep an eye on the PR and implement a drizzle solution as one becomes available.
Thanks 💪
19 replies
DTDrizzle Team
•Created by LiquiFruit on 12/5/2023 in #help
Refactor transaction to batched expression
I think the query is out of scope, especially because i am selecting only the id from it in the where clause.
Is there a way i can run expiredProductsSq in the batch expression so that its “loaded” by the time i run releaseProducts?
19 replies
DTDrizzle Team
•Created by LiquiFruit on 12/5/2023 in #help
Refactor transaction to batched expression
If I change the line in question to
.set({ stock: sql’${expiredProductsSq.amount}’ })
And the drizzle studio, the stock field for that product is
“amount”
When it should be a number.
19 replies
DTDrizzle Team
•Created by LiquiFruit on 12/5/2023 in #help
Refactor transaction to batched expression
@Angelelz please take a look at my comments. It's nearly working, but I think this is as far as I can get without the forementioned PR.
19 replies
DTDrizzle Team
•Created by LiquiFruit on 12/5/2023 in #help
Refactor transaction to batched expression
Thanks a lot Angelelz, will give this a go in the morning!
19 replies
DTDrizzle Team
•Created by LiquiFruit on 12/5/2023 in #help
Refactor transaction to batched expression
The worst part about the current solution (transaction), other than the round trips, is the looped updates. If someone could provide an improvement I might stick with that implementation.
19 replies
DTDrizzle Team
•Created by LiquiFruit on 12/5/2023 in #help
Refactor transaction to batched expression
This is what I've tried:
19 replies
DTDrizzle Team
•Created by adrtivv on 11/27/2023 in #help
drizzle studio blank screen
Just found out that this happened in Chrome but not Edge. Could be worth testing.
11 replies
DTDrizzle Team
•Created by adrtivv on 11/27/2023 in #help
drizzle studio blank screen
Can confirm this is happening to me using Drizzle + Turso/SQLite.
11 replies