0.0.4-11 • Published 2 years ago

cuby-orm v0.0.4-11

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years 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

2 years ago

0.0.1-0

2 years ago

0.0.4-4

2 years ago

0.0.4-3

2 years ago

0.0.4-2

2 years ago

0.0.4-1

2 years ago

0.0.4-11

2 years ago

0.0.4-10

2 years ago

0.0.3

2 years ago

0.0.4-8

2 years ago

0.0.4-7

2 years ago

0.0.4-6

2 years ago

0.0.4-5

2 years ago

0.0.4-9

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago