pato
Explore posts from serversDTDrizzle Team
•Created by pato on 10/14/2024 in #help
Natively write SQL functions/triggers with Drizzle?
Is it possible to, for example, write this kind of logic directly in Drizzle's schema?
9 replies
DTDrizzle Team
•Created by pato on 6/21/2024 in #help
When and how to perform transactions
I’m new to the concept of transactions on SQL, and was interested in understanding if there is a way to apply every change I make to my schema as a transaction in case anything goes wrong, so it can be rolled back. Or am I thinking this wrong? When should transactions be used?
4 replies
DTDrizzle Team
•Created by pato on 6/4/2024 in #help
Queries require "await"?
I just tried to do a simple
without an await and the query wasn't sent. When I added the await, it updated the database.
Is this normal behavior? If so, why?
3 replies
DTDrizzle Team
•Created by pato on 5/17/2024 in #help
How to register triggers, events and functions
Since Drizzle doesn't offer support for defining triggers, events or functions, what is the best way to register these? For example, a developer is setting up locally the project's database. Drizzle can handle tables and other things thanks to the schema, but if the database needs to have certain triggers and events registered beforehand, what would be the best way to set it up?
2 replies
DTDrizzle Team
•Created by pato on 5/17/2024 in #help
findMany
If no rows are found, does it return undefined or an empty array?
3 replies
DTDrizzle Team
•Created by pato on 5/12/2024 in #help
help with count()
How can I count the amount of rows where
userId
column has a given value?9 replies
DTDrizzle Team
•Created by pato on 5/10/2024 in #help
pushing not allowed
I tried pushing my schema, but because there are tables in the database which I don’t own, since it’s a dev database hosted on a provider, drizzle doesn’t allow me to complete the operation, since it says it would affect them. There should be some way to select only certain options to push.
1 replies
DTDrizzle Team
•Created by pato on 5/10/2024 in #help
drizzle-kit unknown command migrate
When I try running
npx drizzle-kit migrate
, it says error: unknown command 'migrate'
3 replies