Search Results for

    Show / Hide Table of Contents

    Class Session

    Represents a single server session.

    Inheritance
    System.Object
    BaseSession
    Session
    Implements
    System.IDisposable
    Namespace: MySqlX.XDevAPI
    Assembly: MySql.Data.dll
    Version: 9.3.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
    In This Article
    • Methods
      • GetCurrentSchema()
      • SetCurrentSchema(String)
      • SQL(String)
    • Implements
    Back to top Copyright © 2021, 2025, Oracle and/or its affiliates.