Implements an ISchemaProvisioner for Mysql databases.
Adds a column to a table.
public Void AddColumn(table, column)
Name | Type | Summary |
---|---|---|
table | Table | Table to be altered. |
column | TableColumn | Column to be added. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when table is null. -or- column is null. |
ValidationException | Thrown when the configuration is not valid. |
Adds a column constraint.
public Void AddColumnConstraint(table, column, constraint)
Name | Type | Summary |
---|---|---|
table | Table | Table to be alter. |
column | TableColumn | Column to be alter. |
constraint | ColumnConstraint | Contraint to be added. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when table is null. -or- column is null. -or- constraint is null. |
ValidationException | Thrown when the configuration is not valid. |
Adds a foreign key to table.
public Void AddForeignKey(table, foreignKey)
Name | Type | Summary |
---|---|---|
table | Table | Table to be alter. |
foreignKey | ForeignKey | Foreign key to be added. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when table is null. -or- foreignKey is null. |
ValidationException | Thrown when the configuration is not valid. |
Modifies a table column.
public Void AlterColumn(table, from, to)
Name | Type | Summary |
---|---|---|
table | Table | Table to be alter. |
from | TableColumn | The actual configuration of the column. |
to | TableColumn | The desired configuration of the column. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when table is null. -or- from is null. -or- to is null. |
ValidationException | Thrown when the configuration is not valid. |
Creates an index.
public Void CreateIndex(table, index)
Name | Type | Summary |
---|---|---|
table | Table | Table to be alter. |
index | Index | Index to be created. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when table is null. -or- index is null. |
ValidationException | Thrown when the configuration is not valid. |
Creates a primary key for the table.
public Void CreatePrimaryKey(table, primaryKey)
Name | Type | Summary |
---|---|---|
table | Table | Table to be alter. |
primaryKey | Index | Primary key to be created. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when table is null. -or- primaryKey is null. |
ValidationException | Thrown when the configuration is not valid. |
Creates a schema.
public Void CreateSchema(name)
Name | Type | Summary |
---|---|---|
name | String | The name of the schema to create. |
Creates a sequence if it does not exists.
public Void CreateSequenceIfNotExists(sequence)
As MySql does not support sequences this method does nothing.
Name | Type | Summary |
---|---|---|
sequence | Sequence | A sequence to be created. |
Creates a table.
public Void CreateTable(table)
Name | Type | Summary |
---|---|---|
table | Table | Table to be created. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when table is null. |
ValidationException | Thrown when the configuration is not valid. |
Creates a view.
public Void CreateView(view)
Name | Type | Summary |
---|---|---|
view | View | View to be created. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when view is null. |
ValidationException | Thrown when the configuration is not valid. |
Drops a column from the table.
public Void DropColumn(table, column)
Name | Type | Summary |
---|---|---|
table | Table | Table to alter. |
column | TableColumn | Column to be dropped. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when table is null. -or- column is null. |
ValidationException | Thrown when the configuration is not valid. |
Drops a column constraint.
public Void DropColumnConstraint(table, column, constraint)
MySql does not support column constraint so this method does not do anything.
Name | Type | Summary |
---|---|---|
table | Table | Table to alter. |
column | TableColumn | Column to alter. |
constraint | ColumnConstraint | Contraint to be dropped. |
Drops a foreign key.
public Void DropForeignKey(table, foreignKey)
Name | Type | Summary |
---|---|---|
table | Table | Table to alter. |
foreignKey | ForeignKey | Foreign key to drop. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when table is null. -or- foreignKey is null. |
ValidationException | Thrown when the configuration is not valid. |
Drops an index.
public Void DropIndex(table, index)
Name | Type | Summary |
---|---|---|
table | Table | Table to alter. |
index | Index | Index to drop. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when table is null. -or- index is null. |
ValidationException | Thrown when the configuration is not valid. |
Drops a primary key index.
public Void DropPrimaryKey(table, primaryKey)
Name | Type | Summary |
---|---|---|
table | Table | Table to alter. |
primaryKey | Index | Index to drop. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when table is null. -or- primaryKey is null. |
ValidationException | Thrown when the configuration is not valid. |
Drops a table.
public Void DropTable(table)
Name | Type | Summary |
---|---|---|
table | Table | Table to drop. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when table is null. |
ValidationException | Thrown when the configuration is not valid. |
Drops a view.
public Void DropView(view)
Name | Type | Summary |
---|---|---|
view | View | View to drop. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when view is null. |
ValidationException | Thrown when the configuration is not valid. |
Grants permission to a grantee to access a database object
public Void GrantPermissions(grant)
This method does nothing.
Name | Type | Summary |
---|---|---|
grant | Grant | Grant configuration. |
Renames a table.
public Void RenameTable(tableName, newTableName)
Name | Type | Summary |
---|---|---|
tableName | TableName | Name of the table to be renamed. |
newTableName | String | New table name. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when tableName is null. |
ArgumentNullOrEmptyException | Thrown when newTableName is null or empty. |
ValidationException | Thrown when the configuration is not valid. |