MySqlSchemaDiscoverer

Implements an ISchemaDiscoverer for MySql databases.

Namespace:
Inetdev.Data.MySql.DatabaseSchema
Type:
Class
Public:
Yes
Protected:
No
Sealed:
No
Abstract:
No
Inherits from:
System.Object
Implements:
Inetdev.Data.DatabaseSchema.ISchemaDiscoverer

Constructors

MySqlSchemaDiscoverer

Default constructor

Signature:
public Void MySqlSchemaDiscoverer()

Properties

CommandBuilder

Database command builder.

Signature:
public IDbCmdBuilder CommandBuilder { get; set; }

DataAccessAPI

Database access.

Signature:
public IDbAccess DataAccessAPI { get; set; }

Methods

ExistsSchema

Checks whether a schema exists within the catalog configured on the DataAccessAPI.

Signature:
public Boolean ExistsSchema(schema)
Returns

true if the schema exists.

Parameters
Name Type Summary
schema Schema Schema to check.
Exceptions
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.

ExistsTable

Checks whether a table exists within the catalog configured on the DataAccessAPI.

Signature:
public Boolean ExistsTable(schema, tableName)
Returns

true is the table exists.

Parameters
Name Type Summary
schema String The schema to which the table belongs to.
tableName String The name of the table to check.
Exceptions
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.

ExistsTable

Checks whether a table exists within the catalog configured on the DataAccessAPI.

Signature:
public Boolean ExistsTable(table)
Returns

true if the table exists.

Parameters
Name Type Summary
table Table Table to check.
Exceptions
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.

ExistsView

Checks whether a view exists within the catalog configured on the DataAccessAPI.

Signature:
public Boolean ExistsView(schema, viewName)
Returns

true if the view exists.

Parameters
Name Type Summary
schema String The schema to which the view belongs to.
viewName String The name of the view to check.
Exceptions
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.

ExistsView

Checks whether a view exists within the catalog configured on the DataAccessAPI.

Signature:
public Boolean ExistsView(view)
Returns

true if the view exists.

Parameters
Name Type Summary
view Table View to check.
Exceptions
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.

GetCatalogs

This method just returns the catalog from the DataAccessAPI.

Signature:
public IEnumerable<Catalog> GetCatalogs()
Returns

A list of user catalogs.

Exceptions
Type Summary
MissingRequiredPropertyException Thrown when a required property was not properly initialized.

GetSchemas

Gets a list of user created schemas from the catalog configured on the DataAccessAPI.

Signature:
public IEnumerable<Schema> GetSchemas()
Returns

A list of user schemas.

Exceptions
Type Summary
SchemaManipulationException Thrown when there is an error accesing schema data.
MissingRequiredPropertyException Thrown when a required property was not properly initialized.

GetTable

Gets the schema of a table from the catalog configured on the DataAccessAPI.

Signature:
public Table GetTable(schema, tableName)
Returns

A table definition.

Parameters
Name Type Summary
schema String Schema that the table belongs to.
tableName String The name of the table.
Exceptions
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.

GetTable

Gets the schema of a table from the catalog configured on the DataAccessAPI.

Signature:
public Table GetTable(tableName)
Returns

A table definition.

Parameters
Name Type Summary
tableName TableName Name of the table.
Exceptions
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.

GetTableNames

Gets a list of table names.

Signature:
public IEnumerable<TableName> GetTableNames()
Returns

A list of table names.

Exceptions
Type Summary
SchemaManipulationException Thrown when there is an error accesing schema data.
MissingRequiredPropertyException Thrown when a required property was not properly initialized.

GetTables

Gets a list of tables.

Signature:
public IEnumerable<Table> GetTables()
Returns

A collection of tables.

Exceptions
Type Summary
SchemaManipulationException Thrown when there is an error accesing schema data.
MissingRequiredPropertyException Thrown when a required property was not properly initialized.

GetView

Gets the schema of a view from the catalog configured on the DataAccessAPI.

Signature:
public Table GetView(schema, viewName)
Returns

A definition for the specified view.

Parameters
Name Type Summary
schema String Schema to which the view belongs to.
viewName String Name of the view.
Exceptions
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.

GetView

Gets the schema of a view from the catalog configured on the DataAccessAPI.

Signature:
public Table GetView(viewName)
Returns

A definition for the specified view.

Parameters
Name Type Summary
viewName TableName Name of the view.
Exceptions
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.

GetViewNames

Gets a list of view names.

Signature:
public IEnumerable<TableName> GetViewNames()
Returns

A list of view names.

Exceptions
Type Summary
SchemaManipulationException Thrown when there is an error accesing schema data.
MissingRequiredPropertyException Thrown when a required property was not properly initialized.

GetViews

Gets a list of views.

Signature:
public IEnumerable<Table> GetViews()
Returns

A collection of views.

Exceptions
Type Summary
SchemaManipulationException Thrown when there is an error accesing schema data.
MissingRequiredPropertyException Thrown when a required property was not properly initialized.