C# Class SimpleMigrations.DatabaseProvider.SqliteDatabaseProvider

Class which can read from / write to a version table in an SQLite database
SQLite does not support advisory locks, and its transaction model means that we cannot use a transaction on the VersionInfo table to guard against concurrent migrators. Therefore this database does not provide support for concurrent migrators.
Inheritance: DatabaseProviderBaseWithAdvisoryLock
ファイルを表示 Open project: canton7/SimpleMigrations Class Usage Examples

Public Methods

Method Description
AcquireAdvisoryLock ( ) : void

No-op: SQLite does not support advisory locks

GetCreateVersionTableSql ( ) : string

Returns SQL to create the version table

GetCurrentVersionSql ( ) : string

Returns SQL to fetch the current version from the version table

GetSetVersionSql ( ) : string

Returns SQL to update the current version in the version table

ReleaseAdvisoryLock ( ) : void

No-op: SQLite does not support advisory locks

SqliteDatabaseProvider ( DbConnection connection ) : System.Data.Common

Initialises a new instance of the SqliteDatabaseProvider class

Method Details

AcquireAdvisoryLock() public method

No-op: SQLite does not support advisory locks
public AcquireAdvisoryLock ( ) : void
return void

GetCreateVersionTableSql() public method

Returns SQL to create the version table
public GetCreateVersionTableSql ( ) : string
return string

GetCurrentVersionSql() public method

Returns SQL to fetch the current version from the version table
public GetCurrentVersionSql ( ) : string
return string

GetSetVersionSql() public method

Returns SQL to update the current version in the version table
public GetSetVersionSql ( ) : string
return string

ReleaseAdvisoryLock() public method

No-op: SQLite does not support advisory locks
public ReleaseAdvisoryLock ( ) : void
return void

SqliteDatabaseProvider() public method

Initialises a new instance of the SqliteDatabaseProvider class
public SqliteDatabaseProvider ( DbConnection connection ) : System.Data.Common
connection System.Data.Common.DbConnection Connection to use to run migrations. The caller is responsible for closing this.
return System.Data.Common