Why Upgrade?
Raw Knex is great for flexibility, but as your app grows you end up writing the same boilerplate everywhere: mapping rows to objects, managing relationships, handling timestamps, and duplicating query logic. IlanaORM is built on top of Knex — so it keeps all the power while eliminating the repetition.IlanaORM is 100% compatible with raw Knex. You can migrate incrementally — one model at a time.
Basic Queries
Creating Records
Updating Records
Soft Deletes
Relationships
Transactions
Pagination
Accessing Raw Knex When You Need It
IlanaORM doesn’t lock you out of Knex. Escape hatch when you need it:Migration Path
- Create a
Modelclass for each table you want to migrate - Replace
knex('table').select(...)calls withModel.query()... - Replace manual timestamp management with
static timestamps = true(default) - Replace manual soft-delete filters with
static softDeletes = true - Replace manual relation joining with
with(...)eager loading - Keep raw Knex for complex reporting queries — use
Model.query().toKnex()to mix
