4 ms·
Why typeorm over something like https://mikro-orm.io/ https://mikro-orm.io/?
by latchkey 2y ago
Why typeorm over something like https://mikro-orm.io/ https://mikro-orm.io/?
- qianli_cs 2y agoIn addition to TypeORM, DBOS supports several popular ORMs: - Drizzle (we're also a sponsor to Drizzle): https://docs.dbos.dev/typescript/tutorials/orms/using-drizzle https://docs.dbos.dev/typescript/tutorials/orms/using-drizzl... - Knex: https://docs.dbos.dev/typescript/tutorials/orms/using-knex https://docs.dbos.dev/typescript/tutorials/orms/using-knex - Prisma: https://docs.dbos.dev/typescript/tutorials/orms/using-prisma https://docs.dbos.dev/typescript/tutorials/orms/using-prisma More ORM support is on the way.
- latchkey 2y agoWhy not always default to using transactions?
- qianli_cs 2y agoDBOS 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.