|
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()
|
|
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] |
◆ DisposeManagedConnections()
void PeanutButter.TempDb.ITempDB.DisposeManagedConnections |
( |
| ) |
|
◆ DumpSchema()
string PeanutButter.TempDb.ITempDB.DumpSchema |
( |
| ) |
|
◆ OpenConnection()
DbConnection PeanutButter.TempDb.ITempDB.OpenConnection |
( |
| ) |
|
◆ 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
-
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 |
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
-
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 |
Implemented in PeanutButter.TempDb.TempDB< TDatabaseConnection >.
◆ DatabasePath
string PeanutButter.TempDb.ITempDB.DatabasePath |
|
get |
◆ Disposed
TempDbDisposedEventHandler PeanutButter.TempDb.ITempDB.Disposed |
|
getset |
The documentation for this interface was generated from the following file:
- source/TempDb/PeanutButter.TempDb/TempDB.cs