SQLiteSchemaProvisioner

Implements an ISchemaProvisioner for SQLite.

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

Constructors

SQLiteSchemaProvisioner

Default constructor

Signature:
public Void SQLiteSchemaProvisioner()

Properties

CommandBuilder

Database command builder.

Signature:
public IDbCmdBuilder CommandBuilder { get; set; }

DataAccessAPI

Database access API.

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.
Exceptions
Type Summary
ArgumentNullException

Thrown when table is null.

-or- column is null.

ValidationException Thrown when the configuration is not valid.

AddColumnConstraintAsync

Adds a column constraint.

Signature:
public Task AddColumnConstraintAsync(table, column, constraint)
Remarks

SQLite does not support column constraints so this method does nothing.

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)
Remarks

SQLite does not support foreign keys so this method does nothing.

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)
Remarks

SQLite does not support column modification so this method does nothing.

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.
Exceptions
Type Summary
ArgumentNullException

Thrown when table is null.

-or- index is null.

ValidationException Thrown when the configuration is not valid.

CreatePrimaryKeyAsync

Creates a primary key for the table.

Signature:
public Task CreatePrimaryKeyAsync(table, primaryKey)
Remarks

SQLite does not support primary keys so this method does nothing.

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)
Remarks

SQLite does not support sequences so this method does nothing.

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.
Exceptions
Type Summary
ArgumentNullException Thrown when table is null.
ValidationException Thrown when the configuration is not valid.

CreateViewAsync

Creates a view.

Signature:
public Task CreateViewAsync(view)
Parameters
Name Type Summary
view View View to be created.
Exceptions
Type Summary
ArgumentNullException Thrown when view is null.
ValidationException Thrown when the configuration is not valid.

DropColumnAsync

Drops a column from the table.

Signature:
public Task DropColumnAsync(table, column)
Remarks

SQLite does not support dropping columns so this method does nothing.

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)
Remarks

SQLite does not support column constraints so this method does nothing.

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)
Remarks

SQLite does not support foreign keys so this method does nothing.

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.
Exceptions
Type Summary
ArgumentNullException Thrown when index is null.
ValidationException Thrown when the configuration is not valid.

DropPrimaryKeyAsync

Drops a primary key index.

Signature:
public Task DropPrimaryKeyAsync(table, primaryKey)
Remarks

SQLite does not support primary keys so this method does nothing.

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.
Exceptions
Type Summary
ArgumentNullException Thrown when table is null.
ValidationException Thrown when the configuration is not valid.

DropViewAsync

Drops a view.

Signature:
public Task DropViewAsync(view)
Parameters
Name Type Summary
view View View to drop.
Exceptions
Type Summary
ArgumentNullException Thrown when view is null.
ValidationException Thrown when the configuration is not valid.

GrantPermissionsAsync

Grants permission to a grantee to access a database object.

Signature:
public Task GrantPermissionsAsync(grant)
Remarks

SQLite does not support grants so this method does nothing.

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.
Exceptions
Type Summary
ArgumentNullException Thrown when tableName is null.
ArgumentNullOrEmptyException Thrown when newTableName is null or empty.
ValidationException Thrown when the configuration is not valid.

ValidateColumnConstraintForAdd

Validates the arguments for adding a constraint to a column.

Signature:
public Void ValidateColumnConstraintForAdd(table, column, constraint)
Remarks

SQLite does not support column constraints so this method does nothing.

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)
Remarks

SQLite does not support column constraints so this method does nothing.

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)
Remarks

SQLite does not support foreign keys so this method does nothing.

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)
Remarks

SQLite does not support foreign keys so this method does nothing.

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)
Remarks

SQLite does not support grants so this method does nothing.

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.
Exceptions
Type Summary
ArgumentNullException

Thrown when table is null.

-or- index is null.

ValidationException Thrown when the configuration is not valid.

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.
Exceptions
Type Summary
ArgumentNullException Thrown when index is null.
ValidationException Thrown when the configuration is not valid.

ValidateSequenceForCreate

Validates the arguments for creating a sequence.

Signature:
public Void ValidateSequenceForCreate(sequence)
Remarks

SQLite does not support sequences so this method does nothing.

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.
Exceptions
Type Summary
ArgumentNullException

Thrown when table is null.

-or- column is null.

ValidationException Thrown when the configuration is not valid.

ValidateTableColumnForAlter

Validates the arguments for modifying a table column.

Signature:
public Void ValidateTableColumnForAlter(table, from, to)
Remarks

SQLite does not support column modification so this method does nothing.

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)
Remarks

SQLite does not support dropping columns so this method does nothing.

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.
Exceptions
Type Summary
ArgumentNullException Thrown when table is null.
ValidationException Thrown when the configuration is not valid.

ValidateTableForDrop

Validates the argument for dropping a table.

Signature:
public Void ValidateTableForDrop(table)
Parameters
Name Type Summary
table Table Table to drop.
Exceptions
Type Summary
ArgumentNullException Thrown when table is null.
ValidationException Thrown when the configuration is not valid.

ValidateViewForCreate

Validates the argument for creating a view.

Signature:
public Void ValidateViewForCreate(view)
Parameters
Name Type Summary
view View View to be created.
Exceptions
Type Summary
ArgumentNullException Thrown when view is null.
ValidationException Thrown when the configuration is not valid.

ValidateViewForDrop

Validates the argument for dropping a view.

Signature:
public Void ValidateViewForDrop(view)
Parameters
Name Type Summary
view View View to drop.
Exceptions
Type Summary
ArgumentNullException Thrown when view is null.
ValidationException Thrown when the configuration is not valid.