Implements an ISchemaProvisioner for SQLite.
Default constructor
public Void SQLiteSchemaProvisioner()
Database command builder.
public IDbCmdBuilder CommandBuilder { get; set; }
Adds a column to a table.
public Task AddColumnAsync(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 Task AddColumnConstraintAsync(table, column, constraint)
SQLite does not support column constraints so this method does nothing.
Name | Type | Summary |
---|---|---|
table | Table | Table to be alter. |
column | TableColumn | Column to be alter. |
constraint | ColumnConstraint | Contraint to be added. |
Adds a foreign key to table.
public Task AddForeignKeyAsync(table, foreignKey)
SQLite does not support foreign keys so this method does nothing.
Name | Type | Summary |
---|---|---|
table | Table | Table to be alter. |
foreignKey | ForeignKey | Foreign key to be added. |
Modifies a table column.
public Task AlterColumnAsync(table, from, to)
SQLite does not support column modification so this method does nothing.
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. |
Creates an index.
public Task CreateIndexAsync(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 Task CreatePrimaryKeyAsync(table, primaryKey)
SQLite does not support primary keys so this method does nothing.
Name | Type | Summary |
---|---|---|
table | Table | Table to be alter. |
primaryKey | Index | Primary key to be created. |
Creates a sequence if it does not exists.
public Task CreateSequenceIfNotExistsAsync(sequence)
SQLite does not support sequences so this method does nothing.
Name | Type | Summary |
---|---|---|
sequence | Sequence | A sequence to be created. |
Creates a table.
public Task CreateTableAsync(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 Task CreateViewAsync(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 Task DropColumnAsync(table, column)
SQLite does not support dropping columns so this method does nothing.
Name | Type | Summary |
---|---|---|
table | Table | Table to alter. |
column | TableColumn | Column to be dropped. |
Drops a column constraint.
public Task DropColumnConstraintAsync(table, column, constraint)
SQLite does not support column constraints so this method does nothing.
Name | Type | Summary |
---|---|---|
table | Table | Table to alter. |
column | TableColumn | Column to alter. |
constraint | ColumnConstraint | Contraint to be dropped. |
Drops a foreign key.
public Task DropForeignKeyAsync(table, foreignKey)
SQLite does not support foreign keys so this method does nothing.
Name | Type | Summary |
---|---|---|
table | Table | Table to alter. |
foreignKey | ForeignKey | Foreign key to drop. |
Drops an index.
public Task DropIndexAsync(table, index)
Name | Type | Summary |
---|---|---|
table | Table | Table to alter. |
index | Index | Index to drop. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when index is null. |
ValidationException | Thrown when the configuration is not valid. |
Drops a primary key index.
public Task DropPrimaryKeyAsync(table, primaryKey)
SQLite does not support primary keys so this method does nothing.
Name | Type | Summary |
---|---|---|
table | Table | Table to alter. |
primaryKey | Index | Index to drop. |
Drops a table.
public Task DropTableAsync(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 Task DropViewAsync(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 Task GrantPermissionsAsync(grant)
SQLite does not support grants so this method does nothing.
Name | Type | Summary |
---|---|---|
grant | Grant | Grant configuration. |
Renames a table.
public Task RenameTableAsync(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. |
Validates the arguments for adding a constraint to a column.
public Void ValidateColumnConstraintForAdd(table, column, constraint)
SQLite does not support column constraints so this method does nothing.
Name | Type | Summary |
---|---|---|
table | Table | Table to be alter. |
column | TableColumn | Column to be alter. |
constraint | ColumnConstraint | Contraint to be added. |
Validates the arguments for dropping a column constraint.
public Void ValidateColumnConstraintForDrop(table, column, constraint)
SQLite does not support column constraints so this method does nothing.
Name | Type | Summary |
---|---|---|
table | Table | Table to alter. |
column | TableColumn | Column to alter. |
constraint | ColumnConstraint | Contraint to be dropped. |
Validates the arguments for adding a foreign key to a table.
public Void ValidateForeignKeyForAdd(table, foreignKey)
SQLite does not support foreign keys so this method does nothing.
Name | Type | Summary |
---|---|---|
table | Table | Table to be alter. |
foreignKey | ForeignKey | Foreign key to be added. |
Validates the arguments for dropping a foreign key.
public Void ValidateForeignKeyForDrop(table, foreignKey)
SQLite does not support foreign keys so this method does nothing.
Name | Type | Summary |
---|---|---|
table | Table | Table to alter. |
foreignKey | ForeignKey | Foreign key to drop. |
Validates the argument for grant permissions.
public Void ValidateGrantForGrant(grant)
SQLite does not support grants so this method does nothing.
Name | Type | Summary |
---|---|---|
grant | Grant | Grant configuration. |
Validate the arguments for creating an index.
public Void ValidateIndexForCreate(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. |
Validates the arguments for dropping an index.
public Void ValidateIndexForDrop(table, index)
Name | Type | Summary |
---|---|---|
table | Table | Table to alter. |
index | Index | Index to drop. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when index is null. |
ValidationException | Thrown when the configuration is not valid. |
Validates the arguments for creating a sequence.
public Void ValidateSequenceForCreate(sequence)
SQLite does not support sequences so this method does nothing.
Name | Type | Summary |
---|---|---|
sequence | Sequence | A sequence to be created. |
Validates the arguments for adding a column to a table.
public Void ValidateTableColumnForAdd(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. |
Validates the arguments for modifying a table column.
public Void ValidateTableColumnForAlter(table, from, to)
SQLite does not support column modification so this method does nothing.
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. |
Validates the argument for dropping a column.
public Void ValidateTableColumnForDrop(table, column)
SQLite does not support dropping columns so this method does nothing.
Name | Type | Summary |
---|---|---|
table | Table | Table to alter. |
column | TableColumn | Column to be dropped. |
Validates the argument for creating a table.
public Void ValidateTableForCreate(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. |
Validates the argument for dropping a table.
public Void ValidateTableForDrop(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. |
Validates the argument for creating a view.
public Void ValidateViewForCreate(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. |
Validates the argument for dropping a view.
public Void ValidateViewForDrop(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. |
In this document