Skip to content

ISchemaManager Interface ​

Definition ​

Interface representing a Schema Management methods for a database session

  • Namespace: JASE.Database
  • Assembly: JASE.Database.dll

Methods ​

NameDescription
bool CheckSchemaExist(string name)Checks if the specified Schema exist in the database
Task<bool> CheckSchemaExistAsync(string name)Checks if the specified Schema exist in the database
bool CheckTableExist(ISelectable tableInfo)Checks if the specified Table exist in the database
bool CheckTableExist(string table, string schema = null)Checks if the specified Table exist in the database
Task<bool> CheckTableExistAsync(ISelectable tableInfo)Checks if the specified Table exist in the database
Task<bool> CheckTableExistAsync(string table, string schema = null)Checks if the specified Table exist in the database
bool CreateSchema(string name, string authorization = null, string comment = null)Create a schema in the database
Task<bool> CreateSchemaAsync(string name, string authorization = null, string comment = null)Create a schema in the database
Task CreateViewAsync(string name, QueryBuilder query, string schema = null)Creates or replaces a database view from a parameter-free QueryBuilder SELECT.
Task CreateViewAsync(string name, SelectStatement select, string schema = null)Creates or replaces a database view from a parameter-free SelectStatement. Prefer overloads that accept a QueryBuilder when composing from the fluent API.
Task<bool> DropConstraintAsync(Constraint constraint)Drop the requested Constraint from the table
Task<bool> DropConstraintAsync(ISelectable selectable, string constraint)Drop the requested Constraint from the table
Task<bool> DropConstraintAsync(string table, string constraint)Drop the requested Constraint from the table
bool DropSchema(string schema)Execute a DROP command for the specified schema
Task<bool> DropSchemaAsync(string schema)Execute a DROP command for the specified schema
bool DropTable(TableInfo tableInfo)Execute a DROP command for the named table
bool DropTable(string table)Execute a DROP command for the named table
Task<bool> DropTableAsync(TableInfo tableInfo)Execute a DROP command for the named table
Task<bool> DropTableAsync(string table)Execute a DROP command for the named table
bool DropTables(IEnumerable<string> tables)Execute a DROP command for multiple tables
Task<bool> DropTablesAsync(IEnumerable<string> tables)Execute a DROP command for multiple tables
Task DropViewAsync(string name, string schema = null)Drops a database view when it exists.
Task<IReadOnlyList<Constraint>> GetConstraintsAsync(ISelectable selectable, int commandTimeout = null)Returns constraints for the given table. Empty list when the table is missing or has none (never null on success).
Task<IReadOnlyList<Constraint>> GetConstraintsAsync(int commandTimeout = null)Returns constraints in the database. Empty list when none exist (never null on success).
Task<IReadOnlyList<Constraint>> GetConstraintsAsync(string schema, int commandTimeout = null)Returns constraints filtered by schema. Empty list when the schema is missing or has none (never null on success).
Task<IReadOnlyList<IndexInformation>> GetIndexesAsync(int commandTimeout = null)Retrieve all indexes from the database. Empty list when none exist (never null on success).
Task<IReadOnlyList<IndexInformation>> GetIndexesAsync(string schema, int commandTimeout = null)Retrieve indexes from a specific database schema. Empty list when none exist (never null on success).
Task<IReadOnlyList<IndexInformation>> GetIndexesByTable(ITableInfo table, int commandTimeout = null)Retrieve indexes for a specific table. Empty list when none exist (never null on success).
TableInfo GetTableInfo(string schema, string table, bool includeIndexes, bool includeConstraints, int commandTimeout = null)Returns information about the specified database table
Task<IReadOnlyList<TableInfo>> GetTableInfoAsync(string schema, bool includeIndexes, bool includeConstraints, int commandTimeout = null)Returns information about the specified database table
Task<TableInfo> GetTableInfoAsync(ITableInfo table, bool includeIndexes, bool includeConstraints, int commandTimeout = null)Returns information about the specified database table
Task<TableInfo> GetTableInfoAsync(string schema, string table, bool includeIndexes, bool includeConstraints, int commandTimeout = null)Returns information about the specified database table
IReadOnlyList<string> GetTableList(int commandTimeout = null)Returns a List of tables in the current database
IReadOnlyList<string> GetTableList(string schema, int commandTimeout = null)Returns a List of tables limited by the schema name
Task<IReadOnlyList<string>> GetTableListAsync(string schema, int commandTimeout = null)Returns a List of tables limited by the schema name