DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Protected Member Functions | Package Functions | Properties | Private Member Functions | List of all members
Deveel.Data.Linq.QueryContext Class Referenceabstract
Inheritance diagram for Deveel.Data.Linq.QueryContext:
Deveel.Data.Linq.ContextQueryTests.EmptyTestQueryContext Deveel.Data.Linq.TableQueryTests.TestQueryContext

Public Member Functions

 QueryContext (IQuery context)
 
QueryTable< T > Table< T > ()
 
void Dispose ()
 

Protected Member Functions

abstract void OnBuildMap (MappingContext mappingContext)
 
virtual void Dispose (bool disposing)
 

Package Functions

IEntityTable< T > GetTable< T > ()
 

Properties

IQuery ParentContext [get, private set]
 
IQueryProvider Provider [get, set]
 

Private Member Functions

 ~QueryContext ()
 
DeveelDbProvider CreateProvider ()
 

Detailed Description

Definition at line 9 of file QueryContext.cs.

Constructor & Destructor Documentation

Deveel.Data.Linq.QueryContext.QueryContext ( IQuery  context)
inline

Definition at line 10 of file QueryContext.cs.

10  {
11  ParentContext = context;
12  }
Deveel.Data.Linq.QueryContext.~QueryContext ( )
inlineprivate

Definition at line 14 of file QueryContext.cs.

14  {
15  Dispose(false);
16  }

Member Function Documentation

DeveelDbProvider Deveel.Data.Linq.QueryContext.CreateProvider ( )
inlineprivate

Definition at line 22 of file QueryContext.cs.

22  {
23  if (Provider == null) {
24  // TODO: Get all other settings as metadata
25 
26  var mappingContext = new MappingContext();
27  OnBuildMap(mappingContext);
28 
29  var model = mappingContext.CreateModel();
30 
31  Provider = ParentContext.GetQueryProvider(model);
32  }
33 
34  return (DeveelDbProvider) Provider;
35  }
abstract void OnBuildMap(MappingContext mappingContext)
void Deveel.Data.Linq.QueryContext.Dispose ( )
inline

Definition at line 47 of file QueryContext.cs.

47  {
48  Dispose(true);
49  GC.SuppressFinalize(this);
50  }
virtual void Deveel.Data.Linq.QueryContext.Dispose ( bool  disposing)
inlineprotectedvirtual

Definition at line 52 of file QueryContext.cs.

52  {
53  if (disposing) {
54  }
55 
56  Provider = null;
57  }
IEntityTable<T> Deveel.Data.Linq.QueryContext.GetTable< T > ( )
inlinepackage
Type Constraints
T :class 

Definition at line 39 of file QueryContext.cs.

39  : class {
40  return CreateProvider().GetTable<T>();
41  }
DeveelDbProvider CreateProvider()
Definition: QueryContext.cs:22
abstract void Deveel.Data.Linq.QueryContext.OnBuildMap ( MappingContext  mappingContext)
protectedpure virtual
QueryTable<T> Deveel.Data.Linq.QueryContext.Table< T > ( )
inline
Type Constraints
T :class 

Definition at line 43 of file QueryContext.cs.

43  : class {
44  return new QueryTable<T>(this);
45  }

Property Documentation

IQuery Deveel.Data.Linq.QueryContext.ParentContext
getprivate set

Definition at line 18 of file QueryContext.cs.

IQueryProvider Deveel.Data.Linq.QueryContext.Provider
getsetprivate

Definition at line 20 of file QueryContext.cs.


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