DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
TransactionContext.cs
Go to the documentation of this file.
1 //
2 // Copyright 2010-2015 Deveel
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 
17 using System;
18 
19 using Deveel.Data.Services;
20 using Deveel.Data.Sql.Cursors;
21 using Deveel.Data.Sql.Variables;
22 
23 namespace Deveel.Data.Transactions {
25  public TransactionContext (IDatabaseContext databaseContext)
26  : base(databaseContext) {
27  VariableManager = new VariableManager(this);
28  CursorManager = new CursorManager(this);
29  }
30 
31  protected override string ContextName {
32  get { return ContextNames.Transaction; }
33  }
34 
36  get { return (IDatabaseContext) ParentContext; }
37  }
38 
40  return new SessionContext(this);
41  }
42 
44  get { return this.IgnoreIdentifiersCase(); }
45  }
46 
47  public IVariableManager VariableManager { get; private set; }
48 
49  public CursorManager CursorManager { get; private set; }
50 
51  protected override void Dispose(bool disposing) {
52  if (disposing) {
53  if (VariableManager != null)
55  if (CursorManager != null)
57  }
58 
59  CursorManager = null;
60  VariableManager = null;
61  base.Dispose(disposing);
62  }
63  }
64 }
The context of a single database within a system.
const string Transaction
Definition: ContextNames.cs:23
TransactionContext(IDatabaseContext databaseContext)