SQLiteDbaServices

Provides DBA services for SQLite databases.

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

Constructors

SQLiteDbaServices

Initializes a new instance of SQLiteDbaServices.

Signature:
public Void SQLiteDbaServices(databaseApi, formatter)
Parameters
Name Type Summary
databaseApi IDbAccess
formatter IDbFormatter

Properties

DatabaseApi

Database communication API.

Signature:
public IDbAccess DatabaseApi { get; }

Formatter

An IDbFormatter for Sql Server.

Signature:
public IDbFormatter Formatter { get; }

Methods

AttachDatabaseAsSchema

Creates a schema by attaching a database file.

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

CreateDatabase

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

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

DropDatabase

Deletes the database file.

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