PeanutButter
Loading...
Searching...
No Matches
PeanutButter.TempDb.ITempDB Interface Reference
Inheritance diagram for PeanutButter.TempDb.ITempDB:
PeanutButter.TempDb.TempDB< TDatabaseConnection > PeanutButter.TempDb.LocalDb.TempDBLocalDb PeanutButter.TempDb.MySql.Base.TempDBMySqlBase< T > PeanutButter.TempDb.SqlCe.TempDBSqlCe PeanutButter.TempDb.Sqlite.TempDBSqlite PeanutButter.TempDb.MySql.Connector.TempDBMySql PeanutButter.TempDb.MySql.Data.TempDBMySql

Public Member Functions

DbConnection CreateConnection ()
DbConnection OpenConnection ()
 Opens a new connection to the TempDb instance with the connection string automatically set based on the current running parameters.
string DumpSchema ()
 (Where supported) dumps the current schema of the running database Currently only supported on mysql, when mysqldump is available
void SetupAutoDispose (TimeSpan absoluteTimeout)
 Set up automatic disposal of this TempDb instance (may only be done once per instance)
void SetupAutoDispose (TimeSpan? absoluteTimeout, TimeSpan? inactivityTimeout)
 Set up automatic disposal of this TempDb instance (may only be done once per instance)
void DisposeManagedConnections ()
 Close and dispose of any connections which were created by OpenConnection()

Properties

TempDbDisposedEventHandler Disposed [get, set]
 Fired when the instance is disposed. Useful if you've set up automatic disposal and would like to act on that.
string DatabasePath [get]
 Path to the database. For single-file databases, this will be a file path. For multi-file databases like MySql, this will be a folder containing all the files for that database.
string ConnectionString [get]

Member Function Documentation

◆ DisposeManagedConnections()

void PeanutButter.TempDb.ITempDB.DisposeManagedConnections ( )

Close and dispose of any connections which were created by OpenConnection()

Implemented in PeanutButter.TempDb.TempDB< TDatabaseConnection >.

◆ DumpSchema()

string PeanutButter.TempDb.ITempDB.DumpSchema ( )

(Where supported) dumps the current schema of the running database Currently only supported on mysql, when mysqldump is available

Returns

Implemented in PeanutButter.TempDb.LocalDb.TempDBLocalDb, PeanutButter.TempDb.MySql.Base.TempDBMySqlBase< T >, PeanutButter.TempDb.SqlCe.TempDBSqlCe, PeanutButter.TempDb.Sqlite.TempDBSqlite, and PeanutButter.TempDb.TempDB< TDatabaseConnection >.

◆ OpenConnection()

DbConnection PeanutButter.TempDb.ITempDB.OpenConnection ( )

Opens a new connection to the TempDb instance with the connection string automatically set based on the current running parameters.

Returns

Implemented in PeanutButter.TempDb.MySql.Base.TempDBMySqlBase< T >, and PeanutButter.TempDb.TempDB< TDatabaseConnection >.

◆ SetupAutoDispose() [1/2]

void PeanutButter.TempDb.ITempDB.SetupAutoDispose ( TimeSpan absoluteTimeout)

Set up automatic disposal of this TempDb instance (may only be done once per instance)

Parameters
absoluteTimeoutAbsolute timeout after which this instance is automatically disposed irrespective of ongoing connections
Exceptions
InvalidOperationExceptionWill be thrown if this method is invoked more than once per instance

Implemented in PeanutButter.TempDb.TempDB< TDatabaseConnection >.

◆ SetupAutoDispose() [2/2]

void PeanutButter.TempDb.ITempDB.SetupAutoDispose ( TimeSpan? absoluteTimeout,
TimeSpan? inactivityTimeout )

Set up automatic disposal of this TempDb instance (may only be done once per instance)

Parameters
inactivityTimeoutInactivity timeout (only supported on mysql so far)
absoluteTimeoutAbsolute timeout after which this instance is automatically disposed irrespective of ongoing connections
Exceptions
InvalidOperationExceptionWill be thrown if this method is invoked more than once per instance

Implemented in PeanutButter.TempDb.TempDB< TDatabaseConnection >.

Property Documentation

◆ DatabasePath

string PeanutButter.TempDb.ITempDB.DatabasePath
get

Path to the database. For single-file databases, this will be a file path. For multi-file databases like MySql, this will be a folder containing all the files for that database.

Implemented in PeanutButter.TempDb.TempDB< TDatabaseConnection >.

◆ Disposed

TempDbDisposedEventHandler PeanutButter.TempDb.ITempDB.Disposed
getset

Fired when the instance is disposed. Useful if you've set up automatic disposal and would like to act on that.

Implemented in PeanutButter.TempDb.TempDB< TDatabaseConnection >.


The documentation for this interface was generated from the following file:
  • source/TempDb/PeanutButter.TempDb/TempDB.cs