Registry / jcc-eloquent

jcc-eloquent

JSON →
library1.0.13jsnpmunverified

jcc-eloquent is an Express.js ORM inspired by Laravel's Eloquent, providing an ActiveRecord-style interface for database interactions. Current stable version 1.0.13, with infrequent updates. Key differentiators: integrates directly with Express.js and offers a familiar Eloquent-like API. Designed for Node.js with TypeScript support.

npm install jcc-eloquent
INSTALL
IMPORT
SIG · JCC-ELOQUENT
J
jcc-eloquent
javascriptv1.0.13
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DB
import { DB } from 'jcc-eloquent'
const DB = require('jcc-eloquent').DB
ESM-only; commonjs require will not work and may throw error.
Model
import { Model } from 'jcc-eloquent'
import { DefaultModel } from 'jcc-eloquent'
Model is the base class for defining models.
Relationships
import { Relationships } from 'jcc-eloquent'
import { Relation } from 'jcc-eloquent'
Use Relations for defining eager loading.

Demonstrates initializing the database connection and creating a simple model to fetch all rows from a table.

import { DB, Model } from 'jcc-eloquent'; // Configure database connection DB.init({ host: process.env.DB_HOST || 'localhost', port: Number(process.env.DB_PORT) || 3306, user: process.env.DB_USER || 'root', password: process.env.DB_PASS || '', database: process.env.DB_NAME || 'test' }); // Define a model class User extends Model { static table = 'users'; } // Example: fetch all users async function getUsers() { const users = await User.all(); console.log(users); } getUsers();
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.13latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
jcc-eloquent — npm install jcc-eloquent · libregistry