This connector differs in a number of key respects from most other MySQL Connectors and APIs. The interface is asynchronous, following the built-in Node.js event model. In addition, it employs a domain object model for data storage. Applications retrieve data in the form of fully-instantiated objects, rather than as rows and columns.
The MySQL Node.js adapter includes 2 drivers. The
ndb driver accesses the
NDB storage engine directly, using
the NDB API (see Chapter 2, The NDB API). No MySQL Server is
required for the ndb driver. The
mysql driver uses a MySQL Server for its data
source, and depends on the node-mysql Node.js
module from https://github.com/felixge/node-mysql/.
Regardless of the driver in use, no SQL statements are required;
when using the Connector for JavaScript, Node.js applications
employ data objects for all requests made to the database.