0.0.10 • Published 10 years ago

node-mysql-importer v0.0.10

Weekly downloads
89
License
MIT
Repository
github
Last release
10 years ago

Install

$ npm install --save node-mysql-importer

Introduction

This is a node module that allows you to load sql queries from a text file and run them against your MySQL database. It supports ECMA6 promises and requires a recent version of NodeJS 5+ to work.

Here is an example of usage. Note that each query in the text file must terminate with a semicolon (;).

'use strict'

const importer = require('node-mysql-importer')

importer.config({
	'host': 'localhost',
	'user': 'testuser',
	'password': 'testpwd',
	'database': 'mydb'
})

importer.importSQL('mydb.sql').then( () => {
	console.log('all statements have been executed')
}).catch( err => {
	console.log(`error: ${err}`)
})
0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago