ActiveRecord models
Extend Model, set fillable and hidden fields, and use create, find, update, and delete with TypeScript-friendly return types.
A small, focused ORM built on Knex. Define models, query with a fluent API, and ship Express or Nuxt apps without the bulk of larger ORMs.
Extend Model, set fillable and hidden fields, and use create, find, update, and delete with TypeScript-friendly return types.
Chain where, orderBy, limit, and offset, then finish with first, all, count, or paginate. Scopes reset after each terminal call.
hasOne, hasMany, and belongsTo return lazy Promise-like relations you can await directly or chain with where before loading.
Use MySQL, Postgres, SQLite, MSSQL, or Oracle. Drop down to the raw Knex instance whenever you need full SQL control.
Programmatic makeMigration, migrateLatest, and migrateRollback helpers, plus npm scripts for day-to-day schema work.
toArray on models and collections strips hidden attributes and ORM internals so responses stay clean.