oke
DTDrizzle Team
•Created by oke on 2/18/2024 in #help
Update with join with Drizzle
I am using
Postgres
. Table Author has a 1 to 1 relations with table User. Author table has field userId
that links to the primary key in the User table.
Is there a way to write ONE update query to set the penName
field in the Author table, but return all fields from both the Author and the User tables. Right now I need to write two queries
Or is two queries the standard way?1 replies
DTDrizzle Team
•Created by oke on 12/20/2023 in #help
How do detect if a Transaction failure occurs?
What is the return value of a transaction when it fails mid way, or does it throw an error?
Example:
How will I know when a transaction failure or a rollback has occurred, for example in case of random I/O failure, or resource exhaustion, or when the database connection is down half-way through the transaction
1 replies
DTDrizzle Team
•Created by oke on 12/18/2023 in #help
Drizzle JOIN vs relations
Seems like both Join and relations are equally capable when query data that have relationships. I'd assume that if one is already using Drizzle relations (with
with
field), then one wouldn't need to use .join()
, and vice versa.
Is there a reason one should use JOIN vs. relations, or is it personal preference?3 replies
DTDrizzle Team
•Created by oke on 12/17/2023 in #help
How do I infer type of pgEnum
How can I infer the type of a pgEnum?
2 replies