This document tracks all implemented and upcoming features for Arkormˣ.
Model.setClient(...)and direct delegate-map bootstrapping are deprecated in the currentnextline.Model.setAdapter(...)withcreatePrismaDatabaseAdapter(...)orcreateKyselyAdapter(...)is the primary documented runtime path.- Prisma compatibility remains supported and covered by CI through the Arkorm 2.x compatibility window.
- Prisma compatibility boundaries are now explicit: raw SQL predicates and adapter-owned relation batch loading stay compatibility-only gaps, while direct select/include translation remains supported.
- SQL-backed relation filters and aggregates now fail fast when a callback shape cannot be compiled into adapter specs instead of silently dropping to the generic in-memory path.
- Eager loading, relation filters, and relation aggregates now compile through Arkorm-owned relation specs end to end on the adapter-first path; the Kysely adapter consumes those specs for both unconstrained and constrained eager loading while Prisma compatibility keeps the generic eager-loader path.
- Earliest removal target for delegate-first runtime APIs is Arkorm 3.0 after migration docs, parity coverage, and adapter-first examples remain in place.
- Model base class with attribute casting, mutators, and serialization
- Attribute casting system with built-in and custom casts via
Attribute({ get, set })objects - Query builder with fluent API
- Query ergonomics helpers (
latest,oldest,limit,offset,forPage) - Existence helpers (
exists,doesntExist) - Typed collection-based query results (
get()returnsArkormCollection) -
LengthAwarePaginatorsupport viapaginate(perPage, page) -
Paginatorsupport viasimplePaginate(perPage, page) - Pagination URL options (
path,query,fragment,pageName) viaURLDriver - Framework-specific URL driver override via
arkormx.config.* - Collection integration (collect.js)
- Attribute visibility (
hidden/visible/appends) - Local scopes
- Soft deletes (
withTrashed,onlyTrashed,restore,forceDelete) - Global scopes
- Model lifecycle events (
retrieved,creating,created,updating,updated,deleting,deleted, etc.)
- Familiar relationships (
hasOne,hasMany,belongsTo,belongsToMany,hasOneThrough,hasManyThrough,morphOne,morphMany,morphToMany) - Eager loading with constraints
- Fluent relationship query chaining (
relation.where(...).orderBy(...).getResults()) - Relationship execution helpers (
relation.get()andrelation.first())
- Prisma delegate adapter/helper
- Database adapter layer (
Model.setAdapter+ PrismaAdapter) - Prisma schema + migration workflow
- Comprehensive test suite
- Dedicated relationship coverage in both core and PostgreSQL test suites
- PostgreSQL integration test suite (real DB)
- CI PostgreSQL service integration tests
- Publish pipeline PostgreSQL integration gate
- TypeScript strict mode compatibility
- Global scopes
- Transaction support
- Event hooks (
retrieved,creating,updating,deleting, etc.) - CLI tooling for model/resource generation/runnging migrations and seeders
- Improved error handling and messages
- Documentation site
- More advanced relationship constraints
- Performance optimizations
- Class based event listeners via
dispatchesEventsModel property - Callback-based event listeners via
bootedandbootModel methods andModel.event()method - Quiet mode for suppressing events and global scopes via
Model.withoutEvents()andsaveQuietly(),deleteQuietly(),restoreQuietly(), etc. methods. - Model comparison operators (
is,isNot) and identity checks (isSame,isNotSame)
Eloquent features a broad list of methods that make it a powerful ORM. For Arkormˣ, the most relevant methods are those that map cleanly to our current Model -> QueryBuilder -> delegate architecture and keep adapter portability, we have prioritized these for implementation.
-
latest(column = 'createdAt')(alias fororderBy({ column: 'desc' })) -
oldest(column = 'createdAt')(alias fororderBy({ column: 'asc' })) -
limit(value)(alias fortake(value)) -
offset(value)(alias forskip(value)) -
forPage(page, perPage)(page helper overskip/take) -
exists()(fast existence check via constrainedfindFirst) -
doesntExist()(negation ofexists())
-
orWhere(...) -
whereNot(...)/orWhereNot(...) -
whereNull(column)/whereNotNull(column) -
whereBetween(column, [min, max]) -
whereDate/whereMonth/whereYear(initial date helpers) -
whereKeyNot(key, value) -
firstWhere(column, operator?, value?) -
orWhereIn(...)/whereNotIn(...)/orWhereNotIn(...)
-
findOr(id, callback) -
value(column)(first row column value) -
valueOrFail(column) -
pluck(column, key?) -
inRandomOrder() -
reorder(column?, direction?) -
when(value, callback, default?)/unless(value, callback, default?) -
tap(callback)/pipe(callback)
-
min(column) -
max(column) -
sum(column) -
avg(column) -
whereRaw(...)/orWhereRaw(...)(adapter-gated) -
existsOr(callback)/doesntExistOr(callback)
-
insert(values) -
insertOrIgnore(values) -
insertGetId(values, sequence?) -
insertUsing(columns, query) -
insertOrIgnoreUsing(columns, query) -
updateFrom(values) -
updateOrInsert(attributes, values) -
upsert(values, uniqueBy, update?)
-
has(...)/orHas(...) -
doesntHave(...)/orDoesntHave(...) -
whereHas(...)/orWhereHas(...) -
whereDoesntHave(...)/orWhereDoesntHave(...) -
withCount(...) -
withExists(...) -
withSum(...)/withAvg(...)/withMin(...)/withMax(...)
- Factory definitions and helpers
- Seeder classes and execution helpers
- Migration file generation and schema builder
- Remove delegate-first runtime APIs from the primary
Modelsurface - Remove
Model.setClient(...)and direct delegate-map bootstrapping from the supported runtime path - Replace
Model.getDelegate()usage in runtime code with adapter-owned execution paths only - Remove Prisma-shaped generic constraints from core model and query types
- Replace
PrismaDelegateLike-anchoredModelStatic,QueryBuilder, and helper typing with adapter-native types - Move transaction APIs to adapter-first contracts without requiring Prisma client callback types in core runtime APIs
- Eliminate remaining runtime fallbacks that still depend on delegate-shaped behavior for relation execution
- Complete adapter-level relation load execution for the Kysely path
- Close the remaining Prisma compatibility adapter feature gaps or explicitly isolate them to compatibility-only behavior
- Ensure eager loading, relation aggregates, and relation filters run through Arkorm-owned specs end to end
- Remove or rename delegate-oriented metadata and internals where
tableor adapter terminology is now the real runtime contract - Update docs, examples, and upgrade guides to mark the adapter-first migration as complete rather than transitional
- Add parity and regression coverage proving adapter-first behavior without delegate-only runtime APIs
- Define and execute the final removal checklist for merging
nextintomainas the completed adapter-first baseline
Success criteria:
- Arkorm no longer depends on Prisma delegate semantics in its core runtime or public typing model
- adapter-first execution is the only primary runtime path for new code, including relation execution fallback paths
- Prisma support remains only as a compatibility adapter, not as a shaping abstraction for core internals
nextcan merge intomainas the fully completed adapter-first architecture
Final merge checklist status:
- docs and examples teach adapter-first as the default 2.x runtime path
- delegate-first runtime APIs are isolated to compatibility-only surfaces with explicit deprecation/removal guidance
- neutral query-schema typing is the primary core type surface
- relation execution and eager loading no longer depend on delegate-only runtime APIs
- parity/regression coverage exists for both Prisma compatibility and Kysely adapter-backed execution
- repo state is currently clean and the latest
pnpm test:allrun passed
Lower priority until global scopes, events, and transactions are stable:
- Chunking/lazy/cursor APIs (
chunk,lazy,cursorPaginate, etc.) - SQL-specific join family (
join*,crossJoin*, lateral joins) - Macro system parity (
macro,mixin,flushMacros)
- Implemented
- Planned / Not yet implemented
This document will be updated as features are implemented.