SQLiteDbaServices

Provides DBA services for SQLite databases.

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

Constructors

SQLiteDbaServices

Default constructor

Signature:
public Void SQLiteDbaServices()

Properties

DataAccessAPI

Database comunication API.

Signature:
public IDbAccess DataAccessAPI { get; set; }

Formatter

Builder to construct database commands.

Signature:
public IDbFormatter Formatter { get; set; }

Methods

AttachDatabaseAsSchema

Creates a schema by attaching a database file.

Signature:
public Task AttachDatabaseAsSchema(path, schemaName)
Parameters
Name Type Summary
path String Database full file name.
schemaName String Name of the schema.
Exceptions
Type Summary
SchemaManipulationException Thrown when an error occurs while manipulating the schema.
ArgumentNullOrEmptyException Thrown when path is null or empty.
ArgumentNullOrEmptyException Thrown when schemaName is null or empty.
MissingRequiredPropertyException Thrown when the object has not been correctly initialized.

CreateDatabaseAsync

Asyncronously create the database file (and a directory if required).

Signature:
public Task CreateDatabaseAsync(path)
Parameters
Name Type Summary
path String Full database file name.
Exceptions
Type Summary
SchemaManipulationException Thrown when an error occurs while manipulating the database.
ArgumentNullOrEmptyException Thrown when path is null or empty.

DetachDatabase

Detaches a schema.

Signature:
public Task DetachDatabase(name)
Parameters
Name Type Summary
name String Name of the schema.
Exceptions
Type Summary
SchemaManipulationException Thrown when an error occurs while manipulating the schema.
ArgumentNullOrEmptyException Thrown when name is null or empty.
MissingRequiredPropertyException Thrown when the object has not been correctly initialized.

DropDatabaseAsync

Deletes the database file.

Signature:
public Task DropDatabaseAsync(path)
Parameters
Name Type Summary
path String Full database file name.
Exceptions
Type Summary
SchemaManipulationException Thrown when an error occurs while manipulating the database.
ArgumentNullOrEmptyException Thrown when path is null or empty.

ExistsDatabase

Checks whether the database file exists.

Signature:
public Boolean ExistsDatabase(path)
Returns

true if the database file exists, otherwise false.

Parameters
Name Type Summary
path String Full database file name.
Exceptions
Type Summary
ArgumentNullOrEmptyException Thrown when path is null or empty.