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

mysql-faker

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mysql-faker

A simple use of faker.js to populate MySQL database tables

  • 0.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

MySQL Faker

This module uses the excellent faker.js to easily generate data to populate MySQL database with fake data. For now, the module assumes that all tables already exist. To start, create an instance of the Table class giving a name and the number of entities to generate. Faker types can then be chained on this class to add columns to the database. All types are functions on the Table class with an underscore character between the type category and name. For example, faker.name.firstName() is equivalent to table.name_firstName. The first parameter to the type is the name of the column and any additional parameters are passed on to faker.

Example

var mysql_faker = require('mysql-faker');

var users = (new mysql_faker.Table('users', 1000000));
users.name_firstName('firstname')
     .name_lastName('lastname')

mysql_faker.insert([users]);

FAQs

Package last updated on 26 Aug 2016

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