1.0.27 • Published 1 month ago

w-auto-sequelize v1.0.27

Weekly downloads
18
License
MIT
Repository
github
Last release
1 month ago

w-auto-sequelize

A wrapper for sequelize-auto.

Fork from: sequelize-auto

language npm version license gzip file size npm download npm download jsdelivr download

Documentation

To view documentation or get support, visit docs.

Installation

Using npm(ES6 module):

Note: w-auto-sequelize is mainly dependent on sequelize, async, eslint, fs and path

npm i w-auto-sequelize

Example for generate:

Link: [dev source code]

import was from 'w-auto-sequelize'

//opt let opt = { database: 'worm', username: 'username', password: 'password', dialect: 'mssql', directory: './models', host: 'localhost', port: 1433, }

was(opt) .then((res) => { console.log(JSON.stringify(res, null, 4)) }) .catch((err) => { console.log(err) })

// then => { // "tables": { // "users": { // "id": { // "type": "VARCHAR(50)", // "allowNull": false, // "defaultValue": null, // "primaryKey": true, // "autoIncrement": false, // "comment": null, // "foreignKey": { // "source_table": "users", // "constraint_name": "PK_users", // "source_column": "id", // "target_table": null, // "target_column": null, // "constraint_type": "PRIMARY KEY", // "is_identity": false, // "isPrimaryKey": true // } // }, // "name": { // "type": "NVARCHAR(50)", // "allowNull": true, // "defaultValue": null, // "primaryKey": false, // "autoIncrement": false, // "comment": null // }, // "value": { // "type": "FLOAT", // "allowNull": true, // "defaultValue": null, // "primaryKey": false, // "autoIncrement": false, // "comment": null // } // } // }, // "foreignKeys": { // "users": { // "id": { // "source_table": "users", // "constraint_name": "PK_users", // "source_column": "id", // "target_table": null, // "target_column": null, // "constraint_type": "PRIMARY KEY", // "is_identity": false, // "isPrimaryKey": true // } // } // } // }

1.0.26

1 month ago

1.0.27

1 month ago

1.0.25

2 months ago

1.0.24

2 months ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.23

1 year ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.20

2 years ago

1.0.17

2 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago