Staticly typed MySQL Connector for NodeJS using the X Protocol.

  • mysqlx

Downloads in past


1.1.810 months ago4 years agoMinified + gzip package size for mysqlx in KB


:warning: DEPRECATED :warning:
The official MySQL Connector for NodeJS has already been written in TypeScript for a while now, so this wrapper is not required anymore.
Typed MySQL X Dev API (mysqlx)
GitHub Release Dependencies Status DevDependencies Status NPM Version License Monthly Downloads Typed MySQL X Dev API (mysqlx) is a staticly typed wrapper for the official MySQL Connector for NodeJS using the X Protocol.

List of Contents

- List of Contents - Getting Started - Documentation - Built With - Contribution - Version Management - Authors - License - Acknowledgments

Getting Started

This library is available through package manager (npm and yarn). Use package manager to add this library to your project. ```bash
If you're using NPM
npm install --save mysqlx
If you're using Yarn
yarn add mysqlx ``` Then, imports mysqlx in your project. ```javascript var mysqlx = require("mysqlx"); // Or using ES6 imports import mysqlx from "mysqlx"; ```


Because mysqlx is static type wrapper over the official MySQL Connector/Node.js library, the documentation follows the official documentation of MySQL NodeJS Connector, with some exception listed below. DataCursor is removed, replaced by getDocuments() function in the returned response object. RowCursor is removed, replaced by getRows() and getObjects() function in the returned response object. MetadataCursor is removed, replaced by getMetadata() function in the returned response object. These changes implements new way to expose execution results. As for example how the new way works, see this example. ```javascript const docs = ; await collection.find() .execute(doc => docs.push(doc)); console.log(docs); ``` Code above is using data cursors to collect execution results, as stated in the official documentation. With this library, you should instead using this code below. ```javascript const result = await collection.find() .execute(); const docs = result.getDocuments(); console.log(docs); ```

Built With

Written in TypeScript, built into ECMAScript 3 using the TypeScript compiler.


To contribute, fork this project, and issue a pull request. Always follows the documentation for implementation guidelines.

Version Management

We use SemVer for version management. For the versions available, see the tags on this repository.


  • Danang Galuh Tegar Prasetyo - Initial work - danang-id
See also the list of contributors who participated in this project.


This project is licensed under the Apache 2.0 License - see the LICENSE file for details.