| name | orm-infra |
| description | ORM client for the infra API — provides typed CRUD operations for 10 tables and 4 custom operations |
orm-infra
ORM client for the infra API — provides typed CRUD operations for 10 tables and 4 custom operations
Usage
import { db } from './orm';
db.<model>.findMany({ select: { id: true } }).execute()
db.<model>.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.<model>.create({ data: { ... }, select: { id: true } }).execute()
db.<model>.update({ where: { id: '<UUID>' }, data: { ... }, select: { id: true } }).execute()
db.<model>.delete({ where: { id: '<UUID>' } }).execute()
Examples
Query records
const items = await db.dbPreset.findMany({
select: { id: true }
}).execute();
References
See the references/ directory for detailed per-entity API documentation: