Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

w-auto-sequelize

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

w-auto-sequelize

A wrapper for sequelize-auto.

  • 1.0.27
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
increased by80%
Maintainers
1
Weekly downloads
 
Created
Source

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
//             }
//         }
//     }
// }

Keywords

FAQs

Package last updated on 24 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc