Class MySQLX
Main class for session operations related to Connector/NET implementation of the X DevAPI.
Inheritance
Namespace: MySqlX.XDevAPI
Assembly: MySql.Data.dll
Version: 9.1.0
Syntax
public class MySQLX
Methods
GetClient(Object, Object)
Creates a new Client instance.
Declaration
public static Client GetClient(object connectionData, object connectionOptions)
Parameters
Type | Name | Description |
---|---|---|
System.Object | connectionData | The connection data. |
System.Object | connectionOptions | The connection options in object format.
|
Returns
Type | Description |
---|---|
Client | A Client object representing a session pool. |
GetClient(Object, String)
Creates a new Client instance.
Declaration
public static Client GetClient(object connectionData, string connectionOptions)
Parameters
Type | Name | Description |
---|---|---|
System.Object | connectionData | The connection data. |
System.String | connectionOptions | The connection options in JSON string format. |
Returns
Type | Description |
---|---|
Client | A Client object representing a session pool. |
GetClient(String, Object)
Creates a new Client instance.
Declaration
public static Client GetClient(string connectionString, object connectionOptions)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionString | The connection string or URI string format. |
System.Object | connectionOptions | The connection options in object format.
|
Returns
Type | Description |
---|---|
Client | A Client object representing a session pool. |
GetClient(String, String)
Creates a new Client instance.
Declaration
public static Client GetClient(string connectionString, string connectionOptions)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionString | The connection string or URI string format. |
System.String | connectionOptions | The connection options in JSON string format. |
Returns
Type | Description |
---|---|
Client | A Client object representing a session pool. |
GetSession(Object)
Opens a session to the server given.
Declaration
public static Session GetSession(object connectionData)
Parameters
Type | Name | Description |
---|---|---|
System.Object | connectionData | The connection data for the server. |
Returns
Type | Description |
---|---|
Session | A Session object representing the established session. |
GetSession(String)
Opens a session to the server given or to the first available server if multiple servers were specified.
Declaration
public static Session GetSession(string connectionString)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionString | The connection string or URI string format. |
Returns
Type | Description |
---|---|
Session | A Session object representing the established session. |
Remarks
Multiple hosts can be specified as part of the connectionString
which
will enable client side failover when trying to establish a connection. For additional details and syntax
examples refer to the MySqlX.XDevAPI.BaseSession.#ctor(System.String,MySqlX.XDevAPI.Client) remarks section.