|
| 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()
|
|
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.
|
virtual string | GenerateConnectionString () |
void | CreateDatabase () |
virtual void | DeleteTemporaryDataArtifacts () |
|
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] |
◆ CreateConnection()
DbConnection PeanutButter.TempDb.TempDB< TDatabaseConnection >.CreateConnection |
( |
| ) |
|
◆ Dispose()
virtual void PeanutButter.TempDb.TempDB< TDatabaseConnection >.Dispose |
( |
| ) |
|
|
virtual |
◆ DisposeManagedConnections()
void PeanutButter.TempDb.TempDB< TDatabaseConnection >.DisposeManagedConnections |
( |
| ) |
|
◆ DumpSchema()
string PeanutButter.TempDb.TempDB< TDatabaseConnection >.DumpSchema |
( |
| ) |
|
|
abstract |
(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()
virtual string PeanutButter.TempDb.TempDB< TDatabaseConnection >.GenerateConnectionString |
( |
| ) |
|
|
protectedvirtual |
◆ Log()
void PeanutButter.TempDb.TempDB< TDatabaseConnection >.Log |
( |
string | message, |
|
|
params object[] | parameters ) |
|
protected |
Provides a convenience logging mechanism which outputs via the established LogAction.
- Parameters
-
◆ OpenConnection()
virtual DbConnection PeanutButter.TempDb.TempDB< TDatabaseConnection >.OpenConnection |
( |
| ) |
|
|
virtual |
◆ SetupAutoDispose() [1/2]
void PeanutButter.TempDb.TempDB< TDatabaseConnection >.SetupAutoDispose |
( |
TimeSpan | absoluteTimeout | ) |
|
Set up automatic disposal of this TempDb instance (may only be done once per instance)
- Parameters
-
absoluteTimeout | Absolute timeout after which this instance is automatically disposed irrespective of ongoing connections |
- Exceptions
-
InvalidOperationException | Will be thrown if this method is invoked more than once per instance |
Implements PeanutButter.TempDb.ITempDB.
◆ SetupAutoDispose() [2/2]
void PeanutButter.TempDb.TempDB< TDatabaseConnection >.SetupAutoDispose |
( |
TimeSpan? | absoluteTimeout, |
|
|
TimeSpan? | inactivityTimeout ) |
Set up automatic disposal of this TempDb instance (may only be done once per instance)
- Parameters
-
inactivityTimeout | Inactivity timeout (only supported on mysql so far) |
absoluteTimeout | Absolute timeout after which this instance is automatically disposed irrespective of ongoing connections |
- Exceptions
-
InvalidOperationException | Will be thrown if this method is invoked more than once per instance |
Implements PeanutButter.TempDb.ITempDB.
◆ ConnectionString
string PeanutButter.TempDb.TempDB< TDatabaseConnection >.ConnectionString |
|
get |
◆ DatabasePath
string PeanutButter.TempDb.TempDB< TDatabaseConnection >.DatabasePath |
|
getset |
Path to where the temporary database resides. May be a file for single-file databases or a folder.
Implements PeanutButter.TempDb.ITempDB.
◆ Disposed
TempDbDisposedEventHandler PeanutButter.TempDb.TempDB< TDatabaseConnection >.Disposed |
|
getset |
Fired when the instance is disposed. Useful if you've set up automatic disposal and would like to act on that.
Implements PeanutButter.TempDb.ITempDB.
The documentation for this class was generated from the following file:
- source/TempDb/PeanutButter.TempDb/TempDB.cs