Noticeably Playful Monkeys

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

    0.19.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.

    Install

    npm i cormo

    DownloadsWeekly Downloads

    493

    Version

    0.19.1

    License

    MIT

    Unpacked Size

    366 kB

    Total Files

    58

    Last publish

    Collaborators

    • olive-sally
    • ho12345c
    • youngsoohan
    • pepper.ha
    • hazel.moon
    • croquiscom-admin
    • sixmen
    • zao1214
    • nabigraphics
    • chiabi
    • colin.kwon