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

mysql2

Package Overview
Dependencies
Maintainers
1
Versions
186
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mysql2 - npm Package Compare versions

Comparing version 0.0.3 to 0.1.0

benchmarks/bench-insert-select.js

10

lib/connection.js

@@ -108,2 +108,12 @@ var _ = require('underscore');

Connection.prototype.escape = function(str) {
// copy-paste from mysql-native. Currenty only used by benchmark
str = str.replace(/\0/g, "\\0");
str = str.replace(/\n/g, "\\n");
str = str.replace(/\r/g, "\\r");
str = str.replace(/\032/g, "\\Z");
str = str.replace(/([\'\"]+)/g, "\\$1");
return str;
};
module.exports = Connection;

@@ -110,0 +120,0 @@

2

package.json
{
"name": "mysql2",
"version": "0.0.3",
"version": "0.1.0",
"description": "fast mysql driver",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -11,3 +11,8 @@ module.exports.createConnection = function() {

return require('../index.js').createConnection({
var driver = require('../index.js');
// uncomment to benchmark against mysql:
//var driver = require('mysql');
return driver.createConnection({
host: process.env.MYSQL_HOST || '127.0.0.1',

@@ -21,1 +26,4 @@ user: process.env.MYSQL_USER || 'root',

module.exports.hrdiff = function(t1, t2) {
return t2[1] - t1[1] + (t2[0] - t1[0])*1e9;
};

@@ -9,2 +9,4 @@ #!/usr/bin/env node

require('urun')(__dirname, options);
require('../benchmarks/bench-insert-select.js')(function() {
require('urun')(__dirname, options);
});
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