Method LoadDatabase
- Namespace
- YndigoBlue.Velocity.Engine
- Assembly
- YndigoBlue.Velocity.dll
LoadDatabase()
Loads all schemas from the connected database into a Database object.
public Database LoadDatabase()
Returns
- Database
A Database object containing all schemas with their tables, views, constraints, and indexes.
Examples
using (var m = new Manager(conn))
{
var database = m.LoadDatabase();
Console.WriteLine($"Loaded {database.Schemas.Count} schemas");
foreach (var schema in database.Schemas)
{
Console.WriteLine($"Schema: {schema.Name} - {schema.Tables.Count} tables");
}
}
Remarks
WARNING: Multi-schema database operations are not available in the Community Edition of Velocity. They require the Full Edition.
Exceptions
- DbException
Thrown when a database error occurs.
LoadDatabase(IEnumerable<string>)
Loads specific schemas from the connected database into a Database object.
public Database LoadDatabase(IEnumerable<string> schemas)
Parameters
schemasIEnumerable<string>A collection of schema names to load.
Returns
Examples
using (var m = new Manager(conn))
{
// Load only specific schemas
var schemaNames = new[] { "app", "reporting", "audit" };
var database = m.LoadDatabase(schemaNames);
Console.WriteLine($"Loaded {database.Schemas.Count} specific schemas");
}
Remarks
WARNING: Multi-schema database operations are not available in the Community Edition of Velocity. They require the Full Edition.
Exceptions
- DbException
Thrown when a database error occurs.