Socket
Socket
Sign inDemoInstall

mysql-import

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

mysql-import - npm Package Compare versions

Comparing version 5.0.21 to 5.0.26

.github/ISSUE_TEMPLATE/bug_report.md

8

mysql-import.js
/**
* mysql-import - v5.0.21
* mysql-import - v5.0.26
* Import .sql into a MySQL database with Node.

@@ -11,3 +11,3 @@ * @author Rob Parham

const mysql = require('mysql');
const mysql = require('mysql2');
const fs = require('fs');

@@ -20,3 +20,3 @@ const path = require("path");

* mysql-import - Importer class
* @version 5.0.21
* @version 5.0.26
* https://github.com/Pamblam/mysql-import

@@ -374,3 +374,3 @@ */

*/
Importer.version = '5.0.21';
Importer.version = '5.0.26';

@@ -377,0 +377,0 @@ module.exports = Importer;

@@ -6,6 +6,2 @@ {

},
"bundleDependencies": false,
"dependencies": {
"mysql": "^2.18.1"
},
"deprecated": false,

@@ -46,3 +42,6 @@ "description": "Import .sql into a MySQL database with Node.",

},
"version": "5.0.21"
}
"version": "5.0.26",
"dependencies": {
"mysql2": "^2.3.3"
}
}

@@ -7,3 +7,3 @@

*Version 5.0.21* ([NPM](https://www.npmjs.com/package/mysql-import)) ([Github](https://github.com/Pamblam/mysql-import/))
*Version 5.0.26* ([NPM](https://www.npmjs.com/package/mysql-import)) ([Github](https://github.com/Pamblam/mysql-import/))

@@ -50,3 +50,2 @@ [![Build Status](https://api.travis-ci.org/Pamblam/mysql-import.svg?branch=master)](https://travis-ci.org/Pamblam/mysql-import/) [![Coverage Status](https://coveralls.io/repos/github/Pamblam/mysql-import/badge.svg?branch=master)](https://coveralls.io/github/Pamblam/mysql-import?branch=master)

// New onProgress method, added in version 5.0!
importer.onProgress(progress=>{

@@ -66,5 +65,5 @@ var percent = Math.floor(progress.bytes_processed / progress.total_bytes * 10000) / 100;

### `new Importer({host, user, password[, database]})`
### `new Importer({host, user, password[, database, port, ssl]})`
The constructor requires an object with a `host`, `user`, and `password` parameter. Passing in a database parameter is optional.
The constructor requires an object with a `host`, `user`, and `password` parameter. Passing in a database parameter is optional. Any of the parameters [listed here](https://github.com/mysqljs/mysql#connection-options) will work as well.

@@ -85,3 +84,3 @@ ### `Importer.prototype.getImported()`

*(New in v. 5.0!) -* Set a callback to be called as the importer processes chunks of the dump file. Callback is provided an object with the following properties:
Set a callback to be called as the importer processes chunks of the dump file. Callback is provided an object with the following properties:

@@ -96,3 +95,3 @@ - `total_files`: The total files in the queue.

*(New in v. 5.0!) -* Set a callback to be called after each dump file has completed processing. Callback is provided an object with the following properties:
Set a callback to be called after each dump file has completed processing. Callback is provided an object with the following properties:

@@ -99,0 +98,0 @@ - `total_files`: The total files in the queue.

'use strict';
const mysql = require('mysql');
const mysql = require('mysql2');
const fs = require('fs');
const path = require("path");
const stream = require('stream');

@@ -1,2 +0,2 @@

const mysql = require('mysql');
const mysql = require('mysql2');

@@ -61,3 +61,3 @@ var con;

async function destroyTestDB(db){
await query("DROP DATABASE `"+db+"`;");
await query("DROP DATABASE IF EXISTS `"+db+"`;");
}

@@ -64,0 +64,0 @@

// SET THESE FOR LOCAL TESTING ONLY!
// RESET THEM TO '' BEFORE COMMITING CHANGES!
const mysql_host = '';
const mysql_user = '';
const mysql_pass = '';
const mysql_host = '127.0.0.1';
const mysql_user = 'root';
const mysql_pass = 'bijoux22';

@@ -7,0 +7,0 @@ const expect = require('chai').expect;

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