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

json2mysql

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json2mysql

A tool for comparing your configure json file with mysql table, then Loaded

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-65.22%
Maintainers
1
Weekly downloads
 
Created
Source

json2mysql

NPM version Build Status Downloads [![Code Style][standard-image][standard-url]]

A tool to remove all records in one Mysql table and load from a JSON/JS object file.

note It will disable foreign key check when remove data, an enable after loading finish.

Install

npm i json2mysql

Usage

import json2mysql from "json2mysql"

json2mysql() // true

Test

  1. docker-compose up -d will create database container
  2. create a test table in your database
CREATE TABLE `user` (
 `id` mediumint(9) NOT NULL AUTO_INCREMENT,
 `name` text,
 `team_id` int(11) DEFAULT NULL,
 PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  1. npm test

License

MIT © [chopperlee]

Keywords

FAQs

Package last updated on 07 Jul 2017

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