0.0.4-11 • Published 6 months ago

cuby-orm v0.0.4-11

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

cuby-orm

Cuby-ORM is an Object Relational Mapping (ORM) library for Node.js applications. It simplifies database interaction by allowing developers to scan existing database models and create new ones. Additionally, Cuby-ORM supports migrations and seeders, making it easy to manage database changes and populate initial data.

Quick start

Install package.

npm i cuby-orm

To show help execute the following command:

npx cuby -h

It will display the following.

Database
    Example command
        cuby <command> --help More information
        cuby <flags> <options> More information

    COMMAND LINE FLAGS
        db:seed Run seed specified by name or list of names.
	db:seed:create Create file seed.
        db:model Create a model with the specified name.   
        db:scan:model Scan models from selected databases.   
	db:scan:model:table Scan models of the selected tables. 
        db:migration Create a model with the specified name. 
        db:config Command to configure some properties, to show more help use npx cuby db:config -h.

        --help, -h Print this message.
        --version, -v Print version with package.

Create a configuration file for the database with the following content:

import { TConfigCuby } from "cuby-orm";

export const configDatabase: TConfigCuby = {
    type: 'mysql',
    connection: {
        connectionLimit: 103,
        host: 'localhost',
        user: 'root',
        password: '',
        database: 'testing',
        charset: 'utf8mb4'
    }
}

Name it cuby.config.ts

0.0.4-0

8 months ago

0.0.1-0

6 months ago

0.0.4-4

7 months ago

0.0.4-3

7 months ago

0.0.4-2

8 months ago

0.0.4-1

8 months ago

0.0.4-11

6 months ago

0.0.4-10

7 months ago

0.0.3

8 months ago

0.0.4-8

7 months ago

0.0.4-7

7 months ago

0.0.4-6

7 months ago

0.0.4-5

7 months ago

0.0.4-9

7 months ago

0.0.2

1 year ago

0.0.1

1 year ago

0.0.0

1 year ago