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:
- Prepared Statements
- Promise Wrapper
- Authentication Switch
- More Features
- SingleStore Server
- Pooling
- SSL
- Compression
Examples​
Please check these examples for singlestore-nodejs.
Known incompatibilities with Node MySQL​
-
zeroFillflag 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. -
DECIMALandNEWDECIMALtypes always returned asstringunless 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
JSONtype is always returned parsed into an object. However, you can modify this behavior by specifying the following configuration:
{
jsonStrings: true,
}
Other Resources​
- SingleStoreDB Documentation
- MySQL Wire Protocol Documentation
- node-mysql2 - The upstream MySQL client library this driver is based on
Benchmarks​
npm run benchmarks- try to run example benchmarks on your system