cormo
TypeScript icon, indicating that this package has built-in type declarations

1.3.1 • Public • Published

npm version test

About

CORMO is an ORM framework for Node.js.

Currently supports:

  • multi-DB: MySQL, MongoDB, SQLite3, PostgreSQL
  • constraints
  • validations
  • associations
  • geospatial query
  • callbacks
  • aggregation
  • nested column
  • transactions
  • schema migration

See https://github.com/croquiscom/cormo/wiki/Future-Plans for future plans.

Overview

The following is a basic usage. You can see detail guides on http://croquiscom.github.io/cormo/.

import * as cormo from 'cormo';

const connection = new cormo.MySQLConnection({ database: 'test' });

@cormo.Model()
class User extends cormo.BaseModel {
  @cormo.Column({ type: String, required: true, unique: true })
  name!: string;

  @cormo.Column({ type: cormo.types.Integer })
  age?: number;
}

await User.create({ name: 'John Doe', age: 27 });

const users = await User.where({ age: 27 }).select(['name']).order('name').limit(5).skip(100);

License

MIT licenses. See LICENSE for more details.

/cormo/

    Package Sidebar

    Install

    npm i cormo

    Weekly Downloads

    305

    Version

    1.3.1

    License

    MIT

    Unpacked Size

    388 kB

    Total Files

    58

    Last publish

    Collaborators

    • dobby.free
    • junolee7803
    • joointhezoo
    • yoo2001818
    • olive-sally
    • ho12345c
    • youngsoohan
    • pepper.ha
    • hazel.moon
    • croquiscom-admin
    • sixmen
    • zao1214
    • nabigraphics
    • chiabi
    • colin.kwon