Ejemplo n.º 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));
    }
Ejemplo n.º 3
0
 public Indexes(IDbConnection connection, ILogWriter log, FbSchema schema) : base(connection, log, schema)
 {
 }
Ejemplo n.º 4
0
 private void InitSchemas()
 {
     fbSchema = new FbSchema((FbConnection)dataBase, _log);
     fbSchema.Initialize();
 }
Ejemplo n.º 5
0
 public Triggers(IDbConnection connection, ILogWriter log, FbSchema schema) : base(connection, log, schema)
 {
 }
Ejemplo n.º 6
0
 public Procedures(IDbConnection connection, ILogWriter log, FbSchema schema) : base(connection, log, schema)
 {
 }
Ejemplo n.º 7
0
 public UniquesAndChecks(IDbConnection connection, ILogWriter log, FbSchema schema) : base(connection, log, schema)
 {
 }