MCPcopy Index your code
hub / github.com/adonisjs/lucid

github.com/adonisjs/lucid @v22.4.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v22.4.2 ↗ · + Follow
2,212 symbols 6,044 edges 198 files 1,337 documented · 60%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

@adonisjs/lucid

gh-workflow-image npm-image [license-image]license-url

Introduction

SQL ORM for AdonisJS built on top of Knex. Comes with a db query builder, Active record ORM, migrations, seeders and model factories.

Official Documentation

The documentation is available on the Lucid website

Contributing

One of the primary goals of AdonisJS is to have a vibrant community of users and contributors who believes in the principles of the framework.

We encourage you to read the contribution guide before contributing to the framework.

Run tests locally

Easiest way to run tests is to launch the redis cluster using docker-compose and docker-compose.yml file.

docker-compose up -d
npm run test

Code of Conduct

In order to ensure that the AdonisJS community is welcoming to all, please review and abide by the Code of Conduct.

License

AdonisJS Lucid is open-sourced software licensed under the MIT license.

Extension points exported contracts — how you extend this code

RelationQueryClientContract (Interface)
(no doc) [12 implementers]
src/types/relations.ts
VineLucidBindings (Interface)
* Shared database-backed validation rules mixed into both * VineNumber and VineString schema types.
providers/database_provider.ts
Point (Interface)
(no doc)
test/orm/adapter.spec.ts
TestContext (Interface)
(no doc)
src/plugins/japa/db.ts
SchemaStateContract (Interface)
(no doc)
src/migration/schema_dump/base_schema_state.ts
HasManyThroughClientContract (Interface)
(no doc) [12 implementers]
src/types/relations.ts
VineNumber (Interface)
* Extends the VineJS `number` schema type with the database-backed * `unique` and `exists` validation rules from {@li
providers/database_provider.ts
LazyLoadAggregatesContract (Interface)
(no doc) [6 implementers]
src/types/model.ts

Core symbols most depended-on inside this repo

column
called by 2706
src/orm/decorators/index.ts
from
called by 2029
src/query_client/index.ts
toSQL
called by 1409
src/types/querybuilder.ts
create
called by 1224
src/types/model.ts
getDb
called by 929
test-helpers/index.ts
getBaseModel
called by 863
test-helpers/index.ts
getQueryClient
called by 808
test-helpers/index.ts
table
called by 776
src/types/querybuilder.ts

Shape

Method 1,411
Function 363
Class 333
Interface 104
Enum 1

Languages

TypeScript100%

Modules by API surface

src/database/query_builder/chainable.ts163 symbols
src/types/model.ts119 symbols
src/types/relations.ts100 symbols
src/types/querybuilder.ts99 symbols
src/orm/base_model/index.ts99 symbols
src/types/database.ts64 symbols
src/orm/query_builder/index.ts57 symbols
test/orm/base_model.spec.ts49 symbols
test-helpers/index.ts42 symbols
src/migration/runner.ts37 symbols
src/transaction_client/index.ts36 symbols
src/types/factory.ts35 symbols

Datastores touched

(mysql)Database · 1 repos

For agents

$ claude mcp add lucid \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact