Pre-General Availability Draft: 2017-09-18
Table of Contents [+/-]
This section explains the concepts of connections and sessions as used by the X DevAPI. Code examples for connecting and using sessions are provided.
This section provides an overview of the connection and session concepts used by the X DevAPI. An X Session is a high-level database session concept that is different from working with traditional low-level MySQL connections. X Sessions can encapsulate one or more actual MySQL connections. Use of this higher abstraction level decouples the physical MySQL setup from the application code. An application using the X DevAPI XSession class can be run against a single MySQL server or a group of MySQL servers with no code changes. When a low-level MySQL connection to a single MySQL instance is needed this is still supported by using a low-level NodeSession.
Before looking at the XSession and NodeSession concepts in more detail, the following examples show that working with a database remains easy.