MySQL Forums
Forum List  »  Connector/Node.js

mysqlx versus xdevapi node module what's the difference?
Posted by: Andy Fusniak
Date: October 20, 2017 04:22AM

I have installed the Node.js connector (@mysql/xdevapi@8.0.8) using

npm install @mysql/xdevapi

The X DevAPI User Guide code examples all appear to use

var mysqlx = require('mysqlx');

See the following link for full example code.
https://dev.mysql.com/doc/x-devapi-userguide/en/using-sql.html

Can I simply replace this with

const xdevapi = require('@mysql/xdevapi');

The xdevapi exposes an API that includes xdevapi.getSession() but the mysqlssh shell has a specific getNodeSession() function- is this correct?

In the Node.js xdevapi, how can I distinguish between XSession and single database specific NodeSessions?

Can someone explain please?

Options: ReplyQuote


Subject
Written By
Posted
mysqlx versus xdevapi node module what's the difference?
October 20, 2017 04:22AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.