Socket
Socket
Sign inDemoInstall

mysqlx

Package Overview
Dependencies
8
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mysqlx

Staticly typed MySQL Connector for NodeJS using the X Protocol.


Version published
Weekly downloads
44
decreased by-50%
Maintainers
1
Install size
69.4 MB
Created
Weekly downloads
 

Readme

Source

: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

Getting Started

This library is available through package manager (npm and yarn). Use package manager to add this library to your project.

# If you're using NPM
npm install --save mysqlx

# If you're using Yarn
yarn add mysqlx

Then, imports mysqlx in your project.

var mysqlx = require("mysqlx");

// Or using ES6 imports
import mysqlx from "mysqlx";

Documentation

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.

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.

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.

Contribution

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.

Authors

  • Danang Galuh Tegar Prasetyo - Initial work - danang-id

See also the list of contributors who participated in this project.

License

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

Acknowledgments

FAQs

Last updated on 09 Feb 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc