Class SLTransaction
A SQLite transaction or savepoint. The main purpose is to automatically rollback if not explicitly committed.
Usage: using(var trans = new SLTransaction(db)) { ... trans.Commit(); }
public sealed class SLTransaction : IDisposable
Namespace: Au.Types
Assembly: Au.dll
Constructors
Name | Description |
---|---|
SLTransaction(sqlite, string, string) | Begins a SQLite transaction and prepares for automatic rollback if not explicitly committed.
Usage: |
Properties
Name | Description |
---|---|
SqlOfDispose | Gets or sets SQL to execute when disposing this variable if not called SLTransaction.Commit or SLTransaction.Rollback.
Initially = parameter |
Methods
Name | Description |
---|---|
Commit(string) | Executes a commit SQL and disables SLTransaction.Dispose. |
Dispose() | Calls SLTransaction.Rollback if not called SLTransaction.Commit or SLTransaction.Rollback. |
Rollback(string) | Executes a rollback SQL (if in transaction) and disables SLTransaction.Dispose. Usually don't need to call this function explicitly. It is implicitly called when disposing this variable if the transaction was not committed. |