Skip to main content

Documentation

singlestore-nodejs is a Node.js driver for SingleStoreDB, forked from node-mysql2. It maintains compatibility with Node MySQL while providing optimized support for SingleStoreDB features.

note

This driver is based on node-mysql2 and maintains API compatibility. If you encounter any problems, please report via GitHub issues.

singlestore-nodejs offers:


Examples​

Please check these examples for singlestore-nodejs.


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!

  • By default, the JSON type is always returned parsed into an object. However, you can modify this behavior by specifying the following configuration:
{
jsonStrings: true,
}

Other Resources​


Benchmarks​

  • npm run benchmarks
  • try to run example benchmarks on your system