SQLiteSchemaProvisioner

Implements an ISchemaProvisioner for SQLite.

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

Methods

AddColumn

Adds a column to a table.

Signature:
public Void AddColumn(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.

AddColumnConstraint

Adds a column constraint.

Signature:
public Void AddColumnConstraint(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.

AddForeignKey

Adds a foreign key to table.

Signature:
public Void AddForeignKey(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.

AlterColumn

Modifies a table column.

Signature:
public Void AlterColumn(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.

CreateIndex

Creates an index.

Signature:
public Void CreateIndex(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.

CreatePrimaryKey

Creates a primary key for the table.

Signature:
public Void CreatePrimaryKey(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.

CreateSchema

Creates a schema.

Signature:
public Void CreateSchema(name)
Remarks

SQLite does not support schemas so this method does nothing.

Parameters
Name Type Summary
name String The name of the schema to create.

CreateSequenceIfNotExists

Creates a sequence if it does not exists.

Signature:
public Void CreateSequenceIfNotExists(sequence)
Remarks

SQLite does not support sequences so this method does nothing.

Parameters
Name Type Summary
sequence Sequence A sequence to be created.

CreateTable

Creates a table.

Signature:
public Void CreateTable(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.

CreateView

Creates a view.

Signature:
public Void CreateView(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.

DropColumn

Drops a column from the table.

Signature:
public Void DropColumn(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.

DropColumnConstraint

Drops a column constraint.

Signature:
public Void DropColumnConstraint(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.

DropForeignKey

Drops a foreign key.

Signature:
public Void DropForeignKey(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.

DropIndex

Drops an index.

Signature:
public Void DropIndex(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.

DropPrimaryKey

Drops a primary key index.

Signature:
public Void DropPrimaryKey(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.

DropTable

Drops a table.

Signature:
public Void DropTable(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.

DropView

Drops a view.

Signature:
public Void DropView(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.

GrantPermissions

Grants permission to a grantee to access a database object.

Signature:
public Void GrantPermissions(grant)
Remarks

SQLite does not support grants so this method does nothing.

Parameters
Name Type Summary
grant Grant Grant configuration.

RenameTable

Renames a table.

Signature:
public Void RenameTable(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.