Table of Contents

Method LoadSchema

Namespace
YndigoBlue.Velocity.Engine
Assembly
YndigoBlue.Velocity.dll

LoadSchema(string)

Loads a specific schema from the connected database into a Schema object.

public Schema LoadSchema(string name)

Parameters

name string

The name of the schema to load.

Returns

Schema

A Schema object containing all tables, views, constraints, and indexes from the specified schema.

Examples

using (var m = new Manager(conn))
{
    // Load a schema from the database
    var schema = m.LoadSchema("app");

    Console.WriteLine($"Schema '{schema.Name}' loaded");
    Console.WriteLine($"  Tables: {schema.Tables.Count}");
    Console.WriteLine($"  Views: {schema.Views.Count}");

    // Access tables
    var usersTable = schema["users"];
    Console.WriteLine($"Users table has {usersTable.Columns.Count} columns");
}

Exceptions

DbException

Thrown when a database error occurs or if the schema doesn't exist.