SQLiteSchemaDiscoverer

Implements an ISchemaDiscoverer for SQLite.

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

Methods

ExistsSchema

Checks if schema exists.

Signature:
public Boolean ExistsSchema(schema)
Returns

true if the schema exists, otherwise false.

Remarks

This method checks if there is a database attached to the connection as the specified schema.

Parameters
Name Type Summary
schema Schema Schema to check.
Exceptions
Type Summary
ValidationException Thrown when schema is not valid for this operation.
ArgumentNullException Thrown when schema is null.
SchemaManipulationException Thown when there is an error accesing schema data.

ExistsTable

Checks if there is a table named tableName within the optional schema.

Signature:
public Boolean ExistsTable(schema, tableName)
Returns

true if the table exists, otherwise false.

Parameters
Name Type Summary
schema String Schema to which the table belongs to (optional).
tableName String Name of the table.
Exceptions
Type Summary
ArgumentNullOrEmptyException Thrown when tableName is null or empty.
SchemaManipulationException Thown when there is an error accesing schema data.

ExistsTable

Checks whether table exists.

Signature:
public Boolean ExistsTable(table)
Returns

true if the table exists, otherwise false.

Parameters
Name Type Summary
table Table Table to check.
Exceptions
Type Summary
ArgumentNullException Thrown when table is null.
SchemaManipulationException Thown when there is an error accesing schema data.
ArgumentNullOrEmptyException Thrown when table.Name.Name is null or empty.

ExistsView

Checks if there is a view named viewName within the optional schema.

Signature:
public Boolean ExistsView(schema, viewName)
Returns

true if the view exists, otherwise false.

Parameters
Name Type Summary
schema String Schema to which the view belongs to (optional).
viewName String Name of the view.
Exceptions
Type Summary
SchemaManipulationException Thown when there is an error accesing schema data.
ArgumentNullOrEmptyException Thrown when viewName is null or empty.

ExistsView

Checks whether view exists.

Signature:
public Boolean ExistsView(view)
Returns

true if the view exists, otherwise false.

Parameters
Name Type Summary
view Table View to check.
Exceptions
Type Summary
ArgumentNullException Thrown when view is null.
SchemaManipulationException Thown when there is an error accesing schema data.
ArgumentNullOrEmptyException Thrown when view.Name.Name is null or empty.

GetCatalogs

Gets a list of catalogs. This method just returns the catalog from the DatabaseApi.

Signature:
public IList GetCatalogs()
Returns

A list of catalogs.

GetSchemas

Gets a list of schemas.

Signature:
public IList GetSchemas()
Returns

A list of schemas.

Exceptions
Type Summary
SchemaManipulationException Thown when there is an error accesing schema data.

GetTable

Gets the schema definition for the specified table.

Signature:
public Table GetTable(schema, tableName)
Returns

A Table with the schema.

Parameters
Name Type Summary
schema String Schema to which the table belongs to (optional).
tableName String Name of the table.
Exceptions
Type Summary
SchemaManipulationException Thown when there is an error accesing schema data.
TableOrViewNotFoundException Thrown when the requested table does not exists.
ArgumentNullOrEmptyException Thrown when tableName is null or empty.

GetTable

Gets the schema of the specified table.

Signature:
public Table GetTable(tableName)
Returns

A table definition.

Parameters
Name Type Summary
tableName TableName Name of the table.
Exceptions
Type Summary
ArgumentNullException Thrown when tableName is null.
SchemaManipulationException Thown when there is an error accesing schema data.
TableOrViewNotFoundException Thrown when the requested table does not exists.
ArgumentNullOrEmptyException Thrown when tableName.Name.Name is null or empty.

GetTableNames

Gets a list of table names.

Signature:
public IList GetTableNames()
Returns

A list of table names.

Exceptions
Type Summary
SchemaManipulationException Thown when there is an error accesing schema data.

GetTables

Get a collections of Tables contained within the database.

Signature:
public IList GetTables()
Exceptions
Type Summary
SchemaManipulationException Thown when there is an error accesing schema data.

GetView

Gets the schema of the specified view.

Signature:
public Table GetView(schema, viewName)
Returns

A table definition.

Parameters
Name Type Summary
schema String Schema to which the table belongs to (optional).
viewName String Name of the view.
Exceptions
Type Summary
SchemaManipulationException Thown when there is an error accesing schema data.
TableOrViewNotFoundException Thrown when the requested table does not exists.
ArgumentNullOrEmptyException Thrown when viewName is null or empty.

GetView

Gets the schema of the specified view.

Signature:
public Table GetView(viewName)
Returns

A definition for the specified view.

Parameters
Name Type Summary
viewName TableName Name of the view.
Exceptions
Type Summary
ArgumentNullException Thrown when viewName is null.
SchemaManipulationException Thown when there is an error accesing schema data.
ArgumentNullOrEmptyException Thrown when viewName.Name.Name is null or empty.

GetViewNames

Gets a list of view names.

Signature:
public IList GetViewNames()
Returns

A list of view names.

Exceptions
Type Summary
SchemaManipulationException Thown when there is an error accesing schema data.

GetViews

Get a collections of Tables contained within the database.

Signature:
public IList GetViews()
Exceptions
Type Summary
SchemaManipulationException Thown when there is an error accesing schema data.