ISchemaProvisioner

Allows the implementation of a provisiones that provision schema objects for databases.

Namespace:
Inetdev.Data.DatabaseSchema
Type:
Interface
Public:
Yes
Protected:
No
Sealed:
No
Abstract:
Yes

Properties

CommandBuilder

Database command builder.

Signature:
public IDbCmdBuilder CommandBuilder { get; set; }

DataAccessAPI

Database access.

Signature:
public IDbAccess DataAccessAPI { get; set; }

Methods

AddColumnAsync

Adds a column to a table.

Signature:
public Task AddColumnAsync(table, column)
Parameters
Name Type Summary
table Table Table to be altered.
column TableColumn Column to be added.

AddColumnConstraintAsync

Adds a column constraint.

Signature:
public Task AddColumnConstraintAsync(table, column, constraint)
Parameters
Name Type Summary
table Table Table to be alter.
column TableColumn Column to be alter.
constraint ColumnConstraint Contraint to be added.

AddForeignKeyAsync

Adds a foreign key to table.

Signature:
public Task AddForeignKeyAsync(table, foreignKey)
Parameters
Name Type Summary
table Table Table to be alter.
foreignKey ForeignKey Foreign key to be added.

AlterColumnAsync

Modifies a table column.

Signature:
public Task AlterColumnAsync(table, from, to)
Parameters
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.

CreateIndexAsync

Creates an index.

Signature:
public Task CreateIndexAsync(table, index)
Parameters
Name Type Summary
table Table Table to be alter.
index Index Index to be created.

CreatePrimaryKeyAsync

Creates a primary key for the table.

Signature:
public Task CreatePrimaryKeyAsync(table, primaryKey)
Parameters
Name Type Summary
table Table Table to be alter.
primaryKey Index Primary key to be created.

CreateSequenceIfNotExistsAsync

Creates a sequence if it does not exists.

Signature:
public Task CreateSequenceIfNotExistsAsync(sequence)
Parameters
Name Type Summary
sequence Sequence A sequence to be created.

CreateTableAsync

Creates a table.

Signature:
public Task CreateTableAsync(table)
Parameters
Name Type Summary
table Table Table to be created.

CreateViewAsync

Creates a view.

Signature:
public Task CreateViewAsync(view)
Parameters
Name Type Summary
view View View to be created.

DropColumnAsync

Drops a column from the table.

Signature:
public Task DropColumnAsync(table, column)
Parameters
Name Type Summary
table Table Table to alter.
column TableColumn Column to be dropped.

DropColumnConstraintAsync

Drops a column constraint.

Signature:
public Task DropColumnConstraintAsync(table, column, constraint)
Parameters
Name Type Summary
table Table Table to alter.
column TableColumn Column to alter.
constraint ColumnConstraint Contraint to be dropped.

DropForeignKeyAsync

Drops a foreign key.

Signature:
public Task DropForeignKeyAsync(table, foreignKey)
Parameters
Name Type Summary
table Table Table to alter.
foreignKey ForeignKey Foreign key to drop.

DropIndexAsync

Drops an index.

Signature:
public Task DropIndexAsync(table, index)
Parameters
Name Type Summary
table Table Table to alter.
index Index Index to drop.

DropPrimaryKeyAsync

Drops a primary key index.

Signature:
public Task DropPrimaryKeyAsync(table, primaryKey)
Parameters
Name Type Summary
table Table Table to alter.
primaryKey Index Index to drop.

DropTableAsync

Drops a table.

Signature:
public Task DropTableAsync(table)
Parameters
Name Type Summary
table Table Table to drop.

DropViewAsync

Drops a view.

Signature:
public Task DropViewAsync(view)
Parameters
Name Type Summary
view View View to drop.

GrantPermissionsAsync

Grants permissions to a grantee ro access a database object.

Signature:
public Task GrantPermissionsAsync(grant)
Parameters
Name Type Summary
grant Grant Grant configuration.

RenameTableAsync

Renames a table.

Signature:
public Task RenameTableAsync(tableName, newTableName)
Parameters
Name Type Summary
tableName TableName Name of the table to be renamed.
newTableName String New table name.

ValidateColumnConstraintForAdd

Validates the arguments for adding a constraint to a column.

Signature:
public Void ValidateColumnConstraintForAdd(table, column, constraint)
Parameters
Name Type Summary
table Table Table to be alter.
column TableColumn Column to be alter.
constraint ColumnConstraint Contraint to be added.

ValidateColumnConstraintForDrop

Validates the arguments for dropping a column constraint.

Signature:
public Void ValidateColumnConstraintForDrop(table, column, constraint)
Parameters
Name Type Summary
table Table Table to alter.
column TableColumn Column to alter.
constraint ColumnConstraint Contraint to be dropped.

ValidateForeignKeyForAdd

Validates the arguments for adding a foreign key to a table.

Signature:
public Void ValidateForeignKeyForAdd(table, foreignKey)
Parameters
Name Type Summary
table Table Table to be alter.
foreignKey ForeignKey Foreign key to be added.

ValidateForeignKeyForDrop

Validates the arguments for dropping a foreign key.

Signature:
public Void ValidateForeignKeyForDrop(table, foreignKey)
Parameters
Name Type Summary
table Table Table to alter.
foreignKey ForeignKey Foreign key to drop.

ValidateGrantForGrant

Validates the argument for grant permissions.

Signature:
public Void ValidateGrantForGrant(grant)
Parameters
Name Type Summary
grant Grant Grant configuration.

ValidateIndexForCreate

Validate the arguments for creating an index.

Signature:
public Void ValidateIndexForCreate(table, index)
Parameters
Name Type Summary
table Table Table to be alter.
index Index Index to be created.

ValidateIndexForDrop

Validates the arguments for dropping an index.

Signature:
public Void ValidateIndexForDrop(table, index)
Parameters
Name Type Summary
table Table Table to alter.
index Index Index to drop.

ValidateSequenceForCreate

Validates the arguments for creating a sequence.

Signature:
public Void ValidateSequenceForCreate(sequence)
Parameters
Name Type Summary
sequence Sequence A sequence to be created.

ValidateTableColumnForAdd

Validates the arguments for adding a column to a table.

Signature:
public Void ValidateTableColumnForAdd(table, column)
Parameters
Name Type Summary
table Table Table to be altered.
column TableColumn Column to be added.

ValidateTableColumnForAlter

Validates the arguments for modifying a table column.

Signature:
public Void ValidateTableColumnForAlter(table, from, to)
Parameters
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.

ValidateTableColumnForDrop

Validates the argument for dropping a column.

Signature:
public Void ValidateTableColumnForDrop(table, column)
Parameters
Name Type Summary
table Table Table to alter.
column TableColumn Column to be dropped.

ValidateTableForCreate

Validates the argument for creating a table.

Signature:
public Void ValidateTableForCreate(table)
Parameters
Name Type Summary
table Table Table to be created.

ValidateTableForDrop

Validates the argument for dropping a table.

Signature:
public Void ValidateTableForDrop(table)
Parameters
Name Type Summary
table Table Table to drop.

ValidateViewForCreate

Validates the argument for creating a view.

Signature:
public Void ValidateViewForCreate(view)
Parameters
Name Type Summary
view View View to be created.

ValidateViewForDrop

Validates the argument for dropping a view.

Signature:
public Void ValidateViewForDrop(view)
Parameters
Name Type Summary
view View View to drop.