Skip to content

Latest commit

 

History

History
 
 

en

Documentation

Introduction

Node-MySQL2 aims to be a drop in replacement for node-mysql. Please check node-mysql for full documentation.

Note : If you see any API incompatibilities with node-mysql, please report via github issue.

Not only Node-MySQL2 offers better performance over node-mysql, we also support these additional features.

Examples

Please check these examples for node-mysql2.

Known incompatibilities with node-mysql

  • zeroFill flag is ignored in type conversion. You need to check corresponding field's zeroFill flag and convert to string manually if this is of importance to you.

  • DECIMAL and NEWDECIMAL types always returned as string unless you pass this config option:

{
  decimalNumbers: true
}

Note : This option could lose precision on the number as Javascript Number is a Float!

Other Resources

Benchmarks