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 for Knex or db0. Define models, query with a fluent API, and ship Express or Nuxt apps.
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. Each query keeps its own scope.
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.
Configure Nitro's database as usual, then pass useDatabase() to Mevn ORM. Knex builds queries and db0 executes them.
Run Knex migrations from a CLI in development or CI, or on boot in a persistent Nuxt server.
toArray on models and collections strips hidden attributes and ORM internals so responses stay clean.