Class Session
Represents a single server session.
Implements
System.IDisposable
Namespace: MySqlX.XDevAPI
Assembly: MySql.Data.dll
Version: 9.1.0
Syntax
public class Session : BaseSession, IDisposable
Methods
GetCurrentSchema()
Executes a query in the database to get the current schema.
Declaration
public Schema GetCurrentSchema()
Returns
Type | Description |
---|---|
Schema | Current database Schema object or null if no schema is selected. |
SetCurrentSchema(String)
Sets the schema in the database.
Declaration
public void SetCurrentSchema(string schema)
Parameters
Type | Name | Description |
---|---|---|
System.String | schema | The schema name to be set. |
SQL(String)
Returns a SqlStatement object that can be used to execute the given SQL.
Declaration
public SqlStatement SQL(string sql)
Parameters
Type | Name | Description |
---|---|---|
System.String | sql | The SQL to execute. |
Returns
Type | Description |
---|---|
SqlStatement | A SqlStatement object set with the provided SQL. |
Implements
System.IDisposable