SQLiteSchemaDiscoverer

Implements an ISchemaDiscoverer 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.ISchemaDiscoverer

Constructors

SQLiteSchemaDiscoverer

Default constructor

Signature:
public Void SQLiteSchemaDiscoverer()

Properties

CommandBuilder

Database command builder.

Signature:
public IDbCmdBuilder CommandBuilder { get; set; }

DataAccessAPI

Database access API.

Signature:
public IDbAccess DataAccessAPI { get; set; }

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.
MissingRequiredPropertyException Thrown when the object is not properly initialized.

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.
MissingRequiredPropertyException Thrown when the object is not properly initialized.

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.
MissingRequiredPropertyException Thrown when the object is not properly initialized.

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.
MissingRequiredPropertyException Thrown when the object is not properly initialized.

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.
MissingRequiredPropertyException Thrown when the object is not properly initialized.

GetCatalogs

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

Signature:
public IEnumerable<Catalog> GetCatalogs()
Returns

A list of catalogs.

Exceptions
Type Summary
MissingRequiredPropertyException Thrown when the object is not properly initialized.

GetSchemas

Gets a list of schemas.

Signature:
public IEnumerable<Schema> GetSchemas()
Returns

A list of schemas.

Exceptions
Type Summary
SchemaManipulationException Thown when there is an error accesing schema data.
MissingRequiredPropertyException Thrown when the object is not properly initialized.

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.
MissingRequiredPropertyException Thrown when the object is not properly initialized.

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.
MissingRequiredPropertyException Thrown when a required property was not properly initialized.

GetTableNames

Gets a list of table names.

Signature:
public IEnumerable<TableName> GetTableNames()
Returns

A list of table names.

Exceptions
Type Summary
SchemaManipulationException Thown when there is an error accesing schema data.
MissingRequiredPropertyException Thrown when the object is not properly initialized.

GetTables

Get a collections of Tables contained within the database.

Signature:
public IEnumerable<Table> GetTables()
Exceptions
Type Summary
SchemaManipulationException Thown when there is an error accesing schema data.
MissingRequiredPropertyException Thrown when the object is not properly initialized.

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.
MissingRequiredPropertyException Thrown when a required property was not properly initialized.

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.
MissingRequiredPropertyException Thrown when a required property was not properly initialized.

GetViewNames

Gets a list of view names.

Signature:
public IEnumerable<TableName> GetViewNames()
Returns

A list of view names.

Exceptions
Type Summary
SchemaManipulationException Thown when there is an error accesing schema data.
MissingRequiredPropertyException Thrown when the object is not properly initialized.

GetViews

Get a collections of Tables contained within the database.

Signature:
public IEnumerable<Table> GetViews()
Exceptions
Type Summary
SchemaManipulationException Thown when there is an error accesing schema data.
MissingRequiredPropertyException Thrown when the object is not properly initialized.