DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Protected Member Functions | Package Functions | Properties | Private Member Functions | Private Attributes | List of all members
Deveel.Data.Client.DeveelDbTransaction Class Reference
Inheritance diagram for Deveel.Data.Client.DeveelDbTransaction:

Public Member Functions

override void Commit ()
 
override void Rollback ()
 

Protected Member Functions

override void Dispose (bool disposing)
 

Package Functions

 DeveelDbTransaction (DeveelDbConnection connection, IsolationLevel isolationLevel, int commitId)
 

Properties

new DeveelDbConnection Connection [get]
 
override DbConnection DbConnection [get]
 
override IsolationLevel IsolationLevel [get]
 
int CommitId [get, private set]
 

Private Member Functions

void AssertNotFinished ()
 

Private Attributes

DeveelDbConnection connection
 
IsolationLevel isolationLevel
 
bool finished
 

Detailed Description

Definition at line 23 of file DeveelDbTransaction.cs.

Constructor & Destructor Documentation

Deveel.Data.Client.DeveelDbTransaction.DeveelDbTransaction ( DeveelDbConnection  connection,
IsolationLevel  isolationLevel,
int  commitId 
)
inlinepackage

Definition at line 28 of file DeveelDbTransaction.cs.

28  {
29  if (connection == null)
30  throw new ArgumentNullException("connection");
31 
32  this.connection = connection;
33  CommitId = commitId;
35  connection.Transaction = this;
36  }

Member Function Documentation

void Deveel.Data.Client.DeveelDbTransaction.AssertNotFinished ( )
inlineprivate

Definition at line 38 of file DeveelDbTransaction.cs.

38  {
39  if (finished)
40  throw new InvalidOperationException("The transaction was already finished.");
41  }
override void Deveel.Data.Client.DeveelDbTransaction.Commit ( )
inline

Definition at line 44 of file DeveelDbTransaction.cs.

44  {
45  if (connection == null ||
46  (connection.State != ConnectionState.Open &&
47  connection.State != ConnectionState.Executing))
48  throw new InvalidOperationException("The underlying connection must be opened.");
49 
51 
52  try {
54  } finally {
55  Connection.Transaction = null;
56  finished = true;
57  }
58  }
override void Deveel.Data.Client.DeveelDbTransaction.Dispose ( bool  disposing)
inlineprotected

Definition at line 90 of file DeveelDbTransaction.cs.

90  {
91  if (disposing) {
92  if (!finished)
93  Rollback();
94  }
95 
96  connection = null;
97 
98  base.Dispose(disposing);
99  }
override void Dispose(bool disposing)
override void Deveel.Data.Client.DeveelDbTransaction.Rollback ( )
inline

Definition at line 60 of file DeveelDbTransaction.cs.

60  {
61  if (connection == null ||
62  (connection.State != ConnectionState.Open &&
63  connection.State != ConnectionState.Executing))
64  throw new InvalidOperationException("The underlying connection must be opened.");
65 
67 
68  try {
70  } finally {
71  Connection.Transaction = null;
72  finished = true;
73  }
74  }

Member Data Documentation

DeveelDbConnection Deveel.Data.Client.DeveelDbTransaction.connection
private

Definition at line 24 of file DeveelDbTransaction.cs.

bool Deveel.Data.Client.DeveelDbTransaction.finished
private

Definition at line 26 of file DeveelDbTransaction.cs.

IsolationLevel Deveel.Data.Client.DeveelDbTransaction.isolationLevel
private

Definition at line 25 of file DeveelDbTransaction.cs.

Property Documentation

int Deveel.Data.Client.DeveelDbTransaction.CommitId
getprivate setpackage

Definition at line 88 of file DeveelDbTransaction.cs.

new DeveelDbConnection Deveel.Data.Client.DeveelDbTransaction.Connection
get

Definition at line 76 of file DeveelDbTransaction.cs.

override DbConnection Deveel.Data.Client.DeveelDbTransaction.DbConnection
getprotected

Definition at line 80 of file DeveelDbTransaction.cs.

override IsolationLevel Deveel.Data.Client.DeveelDbTransaction.IsolationLevel
get

Definition at line 84 of file DeveelDbTransaction.cs.


The documentation for this class was generated from the following file: