MariaDB java connector
MariaDB node.js connector is 100% javascript and mysql compatible driver, used to connect applications developed in Java to MariaDB and MySQL databases. MariaDB Connector/J is LGPL licensed.
Driver implementation completely differ from mysql/mysql2 connectors to permit :
- streaming
var postFile = function (req, res) => {
connection.query('insert into Streaming(b) values(?), [req], (err, res) => {
//id will be res.insertId
});
};
- pipelining : commands will be send without waiting for server results
connection.query("INSERT INTO myTable VALUES (1)");
connection.query("INSERT INTO myTable VALUES (2)");
queries are not send one by one, waiting for result before sending next one. queries are send one after another, avoiding a lot of network latency (detail information).
Extended documentation of API : Complete documentation
Status
Benchmarks
Goal is to best the actual most performant driver mariasql that is a C driver, and not maintained. But a C driver with a javascript wrapper has some inherent issues : must be compiled and mostly, this wrapping of all data result in loss of performance for big resultset.
//TODO make benchmark when version is out, with
- mysql and mysql2 (because the most popular)
- mariasql (because the best in term of performance, even if not maintained)
explain why good perfs compared to existing drivers (avoiding string concatenation, buffer are send are binary, not hexa string, ...)
Obtaining the driver
Driver is compatible with node 4+.
The driver can be install using npm :
npm install mariadb-connector --save
Documentation
For a Getting started guide, API docs, recipes, etc. see the
Contributing
To get started with a development installation and learn more about contributing, please follow the instructions at our Developers Guide.
Tracker link https://jira.mariadb.org/projects/CONJS/issues/