PeanutButter
Loading...
Searching...
No Matches
PeanutButter.TempDb.LocalDb.TempDBLocalDb Class Reference
Inheritance diagram for PeanutButter.TempDb.LocalDb.TempDBLocalDb:
PeanutButter.TempDb.TempDB< TDatabaseConnection > PeanutButter.TempDb.ITempDB

Public Member Functions

 TempDBLocalDb (params string[] creationScripts)
 TempDBLocalDb (string dbName, string instanceName=null, params string[] creationScripts)
override string DumpSchema ()
 (Where supported) dumps the current schema of the running database Currently only supported on mysql, when mysqldump is available
Public Member Functions inherited from PeanutButter.TempDb.TempDB< TDatabaseConnection >
 TempDB (params string[] creationScripts)
 TempDB (Action< object > beforeInit, params string[] creationScripts)
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)
int TryFetchCurrentConnectionCount ()
DbConnection CreateConnection ()
virtual DbConnection OpenConnection ()
 Opens a new connection to the TempDb instance with the connection string automatically set based on the current running parameters.
void RunScripts (IEnumerable< string > scripts)
virtual void Dispose ()
void DisposeManagedConnections ()
 Close and dispose of any connections which were created by OpenConnection()

Protected Member Functions

override void CreateDatabase ()
override int FetchCurrentConnectionCount ()
override string GenerateConnectionString ()
override void DeleteTemporaryDataArtifacts ()
Protected Member Functions inherited from PeanutButter.TempDb.TempDB< TDatabaseConnection >
virtual void Init (string[] creationScripts)
int FetchCurrentConnectionCount ()
void CheckForInactivity (object _)
void Log (string message, params object[] parameters)
 Provides a convenience logging mechanism which outputs via the established LogAction.
void CreateDatabase ()

Properties

string DatabaseName [get, set]
string InstanceName [get, set]
Properties inherited from PeanutButter.TempDb.TempDB< TDatabaseConnection >
uint DefaultTimeout = 30 [get, set]
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.
bool KeepTemporaryDatabaseArtifactsForDiagnostics [get, set]
string DatabasePath [get, set]
 Path to where the temporary database resides. May be a file for single-file databases or a folder.
string ConnectionString [get]
Action< string > LogAction [get, set]
static string[] UndeletedArtifacts [get]

Member Function Documentation

◆ DeleteTemporaryDataArtifacts()

override void PeanutButter.TempDb.LocalDb.TempDBLocalDb.DeleteTemporaryDataArtifacts ( )
protectedvirtual

◆ DumpSchema()

override string PeanutButter.TempDb.LocalDb.TempDBLocalDb.DumpSchema ( )

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

Returns

Implements PeanutButter.TempDb.ITempDB.

◆ GenerateConnectionString()

override string PeanutButter.TempDb.LocalDb.TempDBLocalDb.GenerateConnectionString ( )
protectedvirtual

The documentation for this class was generated from the following file:
  • source/TempDb/PeanutButter.TempDb.LocalDb/TempDBLocalDb.cs