Example #1
0
 public BaseDomain(IDbConnection connection, ILogWriter log, FbSchema schema)
 {
     _connection = connection;
     _log        = log;
     _schema     = schema;
     Load();
 }
    private static Task <DataTable> PrepareCollectionAsync(FbConnection connection, string collectionName, string[] restrictions, CancellationToken cancellationToken = default)
    {
        FbSchema returnSchema = collectionName.ToUpperInvariant() switch
        {
            "CHARACTERSETS" => new FbCharacterSets(),
            "CHECKCONSTRAINTS" => new FbCheckConstraints(),
            "CHECKCONSTRAINTSBYTABLE" => new FbChecksByTable(),
            "COLLATIONS" => new FbCollations(),
            "COLUMNS" => new FbColumns(),
            "COLUMNPRIVILEGES" => new FbColumnPrivileges(),
            "DOMAINS" => new FbDomains(),
            "FOREIGNKEYCOLUMNS" => new FbForeignKeyColumns(),
            "FOREIGNKEYS" => new FbForeignKeys(),
            "FUNCTIONS" => new FbFunctions(),
            "FUNCTIONARGUMENTS" => new FbFunctionArguments(),
            "FUNCTIONPRIVILEGES" => new FbFunctionPrivileges(),
            "GENERATORS" => new FbGenerators(),
            "INDEXCOLUMNS" => new FbIndexColumns(),
            "INDEXES" => new FbIndexes(),
            "PRIMARYKEYS" => new FbPrimaryKeys(),
            "PROCEDURES" => new FbProcedures(),
            "PROCEDUREPARAMETERS" => new FbProcedureParameters(),
            "PROCEDUREPRIVILEGES" => new FbProcedurePrivileges(),
            "ROLES" => new FbRoles(),
            "TABLES" => new FbTables(),
            "TABLECONSTRAINTS" => new FbTableConstraints(),
            "TABLEPRIVILEGES" => new FbTablePrivileges(),
            "TRIGGERS" => new FbTriggers(),
            "UNIQUEKEYS" => new FbUniqueKeys(),
            "VIEWCOLUMNS" => new FbViewColumns(),
            "VIEWS" => new FbViews(),
            "VIEWPRIVILEGES" => new FbViewPrivileges(),
            _ => throw new NotSupportedException("The specified metadata collection is not supported."),
        };

        return(returnSchema.GetSchemaAsync(connection, collectionName, restrictions, cancellationToken));
    }
 public Indexes(IDbConnection connection, ILogWriter log, FbSchema schema) : base(connection, log, schema)
 {
 }
 private void InitSchemas()
 {
     fbSchema = new FbSchema((FbConnection)dataBase, _log);
     fbSchema.Initialize();
 }
 public Triggers(IDbConnection connection, ILogWriter log, FbSchema schema) : base(connection, log, schema)
 {
 }
Example #6
0
 public Procedures(IDbConnection connection, ILogWriter log, FbSchema schema) : base(connection, log, schema)
 {
 }
Example #7
0
 public UniquesAndChecks(IDbConnection connection, ILogWriter log, FbSchema schema) : base(connection, log, schema)
 {
 }