Documentation Home
X DevAPI User Guide
Download this Manual

X DevAPI User Guide  /  Connection and Session Concepts

Pre-General Availability Draft: 2018-02-17

Chapter 2 Connection and Session Concepts

This section explains the concepts of connections and sessions as used by the X DevAPI. Code examples for connecting to a MySQL Document Store and using sessions are provided.

An X DevAPI session is a high-level database session concept that is different from working with traditional low-level MySQL connections. Sessions can encapsulate one or more actual MySQL connections and can use either the classic MySQL protocol or the X Protocol. Use of this higher abstraction level decouples the physical MySQL setup from the application code. An application using the X DevAPI NodeSession class can be run against a single MySQL server or a group of MySQL servers with no code changes. NodeSessions provide full support of X DevAPI and limited support of SQL. When a low-level MySQL connection to a single MySQL instance is needed this is still supported by using a ClassicSession, which provides full support of SQL.

Before looking at the concepts in more detail, the following examples show how to connect using a session.


User Comments
Sign Up Login You must be logged in to post a comment.