MySqlSchemaDiscoverer

Implements an ISchemaDiscoverer for MySql databases.

Namespace:
KpokPatagon.Data.MySql.DatabaseSchema
Type:
Class
Public:
Yes
Protected:
No
Sealed:
No
Abstract:
No

Methods

ExistsSchema

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

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.

ExistsTable

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

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.

ExistsTable

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

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.

ExistsView

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

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.

ExistsView

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

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.

GetCatalogs

This method just returns the DefaultSchema from the DatabaseApi.

Signature:
public IList GetCatalogs()
Returns

A list of user catalogs.

GetSchemas

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

Signature:
public IList GetSchemas()
Returns

A list of user schemas.

Exceptions
Type Summary
SchemaManipulationException Thrown when there is an error accesing schema data.

GetTable

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

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.

GetTable

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

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.

GetTableNames

Gets a list of table names.

Signature:
public IList 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 IList GetTables()
Returns

A collection of tables.

Exceptions
Type Summary
SchemaManipulationException Thrown when there is an error accesing schema data.

GetView

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

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.

GetView

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

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.

GetViewNames

Gets a list of view names.

Signature:
public IList GetViewNames()
Returns

A list of view names.

Exceptions
Type Summary
SchemaManipulationException Thrown when there is an error accesing schema data.

GetViews

Gets a list of views.

Signature:
public IList GetViews()
Returns

A collection of views.

Exceptions
Type Summary
SchemaManipulationException Thrown when there is an error accesing schema data.