New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

data-stub

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

data-stub

generate mysql database stub

  • 1.2.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-84.62%
Maintainers
1
Weekly downloads
 
Created
Source

DATA STUB

NPM version

Build data stub from database for programer

Installation:

yarn add data-stub
npx data-stub -f ls

Configuration:

set config at workdir with name: app.json

{
  "mysql": {
    "host": "127.0.0.1",
    "user": "ketchup",
    "password": "123456",
    "database": "ketchup",
    "port": 3306,
    "charset": "utf8"
  },
  "prefix": "tb"
}

Instructions:

data-stub -f ls list table in the specific database

data-stub -t tableName show result of the tableName

data-stub -f generate -o outputDir generate data stub to outputDir

Target:

// Code generated by data-stub. DO NOT EDIT.
// source: tableName [fileName]

var BaseModel = require('../model')

var model = {
  table: 'tableName',
  fields: {
    'columnName': {
      type: String,
      name: 'columnName',
      comment: 'comment from db',
    }
  }
}
module.exports = new BaseModel(model)

License

MIT

FAQs

Package last updated on 17 Nov 2018

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