Implements an ISchemaDiscoverer for MySql databases.
Default constructor
public Void MySqlSchemaDiscoverer()
Database command builder.
public IDbCmdBuilder CommandBuilder { get; set; }
Checks whether a schema exists within the catalog configured on the DataAccessAPI.
public Boolean ExistsSchema(schema)
true if the schema exists.
Name | Type | Summary |
---|---|---|
schema | Schema | Schema to check. |
Type | Summary |
---|---|
ValidationException | Thrown when the schema configuration is not valid for checking existence. |
ArgumentNullException | Thrown when schema is null. |
SchemaManipulationException | Thrown when there is an error accesing schema data. |
MissingRequiredPropertyException | Thrown when a required property was not properly initialized. |
Checks whether a table exists within the catalog configured on the DataAccessAPI.
public Boolean ExistsTable(schema, tableName)
true is the table exists.
Name | Type | Summary |
---|---|---|
schema | String | The schema to which the table belongs to. |
tableName | String | The name of the table to check. |
Type | Summary |
---|---|
SchemaManipulationException | Thrown when there is an error accesing schema data. |
ArgumentNullOrEmptyException | Thrown when schema is null or empty. |
ArgumentNullOrEmptyException | Thrown when tableName is null or empty. |
MissingRequiredPropertyException | Thrown when a required property was not properly initialized. |
Checks whether a table exists within the catalog configured on the DataAccessAPI.
public Boolean ExistsTable(table)
true if the table exists.
Name | Type | Summary |
---|---|---|
table | Table | Table to check. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when table is null. |
SchemaManipulationException | Thrown when there is an error accesing schema data. |
ArgumentNullOrEmptyException | Thrown when table.Schema.Schema is null or empty. |
ArgumentNullOrEmptyException | Thrown when table.Name.Name is null or empty. |
MissingRequiredPropertyException | Thrown when a required property was not properly initialized. |
Checks whether a view exists within the catalog configured on the DataAccessAPI.
public Boolean ExistsView(schema, viewName)
true if the view exists.
Name | Type | Summary |
---|---|---|
schema | String | The schema to which the view belongs to. |
viewName | String | The name of the view to check. |
Type | Summary |
---|---|
SchemaManipulationException | Thrown when there is an error accesing schema data. |
ArgumentNullOrEmptyException | Thrown when schema is null or empty. |
ArgumentNullOrEmptyException | Thrown when viewName is null or empty. |
MissingRequiredPropertyException | Thrown when a required property was not properly initialized. |
Checks whether a view exists within the catalog configured on the DataAccessAPI.
public Boolean ExistsView(view)
true if the view exists.
Name | Type | Summary |
---|---|---|
view | Table | View to check. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when view is null. |
SchemaManipulationException | Thrown when there is an error accesing schema data. |
ArgumentNullOrEmptyException | Thrown when view.Schema.Schema is null or empty. |
ArgumentNullOrEmptyException | Thrown when view.Name.Name is null or empty. |
MissingRequiredPropertyException | Thrown when a required property was not properly initialized. |
This method just returns the catalog from the DataAccessAPI.
public IEnumerable<Catalog> GetCatalogs()
A list of user catalogs.
Type | Summary |
---|---|
MissingRequiredPropertyException | Thrown when a required property was not properly initialized. |
Gets a list of user created schemas from the catalog configured on the DataAccessAPI.
public IEnumerable<Schema> GetSchemas()
A list of user schemas.
Type | Summary |
---|---|
SchemaManipulationException | Thrown when there is an error accesing schema data. |
MissingRequiredPropertyException | Thrown when a required property was not properly initialized. |
Gets the schema of a table from the catalog configured on the DataAccessAPI.
public Table GetTable(schema, tableName)
A table definition.
Name | Type | Summary |
---|---|---|
schema | String | Schema that the table belongs to. |
tableName | String | The name of the table. |
Type | Summary |
---|---|
SchemaManipulationException | Thrown when there is an error accesing schema data. |
TableOrViewNotFoundException | Thrown when the specified table does not exists. |
ArgumentNullOrEmptyException | Thrown when schema or tableName are null or empty. |
MissingRequiredPropertyException | Thrown when a required property was not properly initialized. |
Gets the schema of a table from the catalog configured on the DataAccessAPI.
public Table GetTable(tableName)
A table definition.
Name | Type | Summary |
---|---|---|
tableName | TableName | Name of the table. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when tableName is null. |
SchemaManipulationException | Thrown when there is an error accesing schema data. |
TableOrViewNotFoundException | Thrown when the specified table does not exists. |
ArgumentNullOrEmptyException | Thrown when tableName.Schema.Schema or tableName.Name.Name are null or empty. |
MissingRequiredPropertyException | Thrown when a required property was not properly initialized. |
Gets a list of table names.
public IEnumerable<TableName> GetTableNames()
A list of table names.
Type | Summary |
---|---|
SchemaManipulationException | Thrown when there is an error accesing schema data. |
MissingRequiredPropertyException | Thrown when a required property was not properly initialized. |
Gets a list of tables.
public IEnumerable<Table> GetTables()
A collection of tables.
Type | Summary |
---|---|
SchemaManipulationException | Thrown when there is an error accesing schema data. |
MissingRequiredPropertyException | Thrown when a required property was not properly initialized. |
Gets the schema of a view from the catalog configured on the DataAccessAPI.
public Table GetView(schema, viewName)
A definition for the specified view.
Name | Type | Summary |
---|---|---|
schema | String | Schema to which the view belongs to. |
viewName | String | Name of the view. |
Type | Summary |
---|---|
SchemaManipulationException | Thrown when there is an error accesing schema data. |
ArgumentNullOrEmptyException | Thrown when schema or viewName are null or empty. |
TableOrViewNotFoundException | Thrown when the spacified view does not exists. |
MissingRequiredPropertyException | Thrown when a required property was not properly initialized. |
Gets the schema of a view from the catalog configured on the DataAccessAPI.
public Table GetView(viewName)
A definition for the specified view.
Name | Type | Summary |
---|---|---|
viewName | TableName | Name of the view. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when viewName is null. |
SchemaManipulationException | Thrown when there is an error accesing schema data. |
ArgumentNullOrEmptyException | Thrown when viewName.Schema.Schema or viewName.Name.Name are null or empty. |
TableOrViewNotFoundException | Thrown when the spacified view does not exists. |
MissingRequiredPropertyException | Thrown when a required property was not properly initialized. |
Gets a list of view names.
public IEnumerable<TableName> GetViewNames()
A list of view names.
Type | Summary |
---|---|
SchemaManipulationException | Thrown when there is an error accesing schema data. |
MissingRequiredPropertyException | Thrown when a required property was not properly initialized. |
Gets a list of views.
public IEnumerable<Table> GetViews()
A collection of views.
Type | Summary |
---|---|
SchemaManipulationException | Thrown when there is an error accesing schema data. |
MissingRequiredPropertyException | Thrown when a required property was not properly initialized. |