Official SQL ORM for the AdonisJS framework, providing a query builder, Active Record style ORM, migrations, seeds, and factories. Current version 3.0.16 supports multiple databases including PostgreSQL, MySQL, SQLite, and Oracle. Designed exclusively for AdonisJS, it requires manual provider and alias registration in app/bootstrap. This version is a work-in-progress for AdonisJS v2. Breaking changes expected from earlier betas. Differentiators: deep integration with AdonisJS IoC, schema builder, and factory support.
npm install adonis-lucidNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows provider registration, alias setup, and basic usage with Database and Lucid model.
Use '@ioc:Adonis/Src/...' imports in AdonisJS v5+.
Switch to mysql2 (mysql) or pg (postgres).
Use within an AdonisJS app, not as a standalone package.
Register all providers in app/bootstrap.js as shown in README.
Include FactoryProvider and SeederProvider.
Ensure you've installed the package: npm i adonis-lucid --save, and use exact provider names from README.
Only use use() inside AdonisJS controllers, models, or lifecycle hooks; for standalone scripts, require AdonisJS environment.
Switch to mysql2 client in config/database.js and remove mariasql dependency.
Use 'use('Database')' in v2 or update to v5 with proper provider registration.