Example #1
0
        /// <summary>
        /// Executes a query in the database to get the current schema.
        /// </summary>
        /// <returns>Current database <see cref="Schema"/> object or null if no schema is selected.</returns>
        public Schema GetCurrentSchema()
        {
            string schemaName = (string)InternalSession.ExecuteQueryAsScalar("SELECT DATABASE()");

            return(schemaName == null ? null : GetSchema(schemaName));
        }