Remix.run Logo
qianli_cs a day ago

In addition to TypeORM, DBOS supports several popular ORMs:

- Drizzle (we're also a sponsor to Drizzle): https://docs.dbos.dev/typescript/tutorials/orms/using-drizzl...

- Knex: https://docs.dbos.dev/typescript/tutorials/orms/using-knex

- Prisma: https://docs.dbos.dev/typescript/tutorials/orms/using-prisma

More ORM support is on the way.

latchkey a day ago | parent [-]

Why not always default to using transactions?

qianli_cs a day ago | parent [-]

DBOS always uses transactions to perform database operations. If you're writing a function that performs database operations, you can use the @DBOS.transaction() decorator to wrap the function so that DBOS's bookkeeping records commit in the same transaction as your operation.

However, if you're interfacing with a third-party API, then that wouldn't be part of a database transaction (you'll use @DBOS.step instead). The reason is that you don't want to hold database locks when you're not performing database operations.