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

Public Member Functions

 SystemBuilder ()
 
 SystemBuilder (IConfiguration configuration)
 
ISystem BuildSystem ()
 

Protected Member Functions

virtual void OnServiceRegistration (ServiceContainer container)
 

Properties

IConfiguration Configuration [get, set]
 
ServiceContainer ServiceContainer [get, set]
 

Private Member Functions

void RegisterDefaultServices ()
 
ISystemContext BuildContext (out IEnumerable< ModuleInfo > modules)
 
IEnumerable< ModuleInfoLoadModules ()
 

Detailed Description

Definition at line 38 of file SystemBuilder.cs.

Constructor & Destructor Documentation

Deveel.Data.SystemBuilder.SystemBuilder ( )
inline

Definition at line 39 of file SystemBuilder.cs.

40  : this(new Configuration.Configuration()) {
41  }
Configuration(bool isRoot)
Constructs the Configuration.
Deveel.Data.SystemBuilder.SystemBuilder ( IConfiguration  configuration)
inline

Member Function Documentation

ISystemContext Deveel.Data.SystemBuilder.BuildContext ( out IEnumerable< ModuleInfo modules)
inlineprivate

Definition at line 123 of file SystemBuilder.cs.

123  {
125 
127  modules = LoadModules();
128 
129  return new SystemContext(Configuration, ServiceContainer);
130  }
virtual void OnServiceRegistration(ServiceContainer container)
IEnumerable< ModuleInfo > LoadModules()
ISystem Deveel.Data.SystemBuilder.BuildSystem ( )
inline

Definition at line 149 of file SystemBuilder.cs.

149  {
150  IEnumerable<ModuleInfo> modules;
151  var context = BuildContext(out modules);
152  return new DatabaseSystem(context, modules);
153  }
ISystemContext BuildContext(out IEnumerable< ModuleInfo > modules)
IEnumerable<ModuleInfo> Deveel.Data.SystemBuilder.LoadModules ( )
inlineprivate

Definition at line 132 of file SystemBuilder.cs.

132  {
133  var moduleInfo = new List<ModuleInfo>();
134 
135  var modules = ServiceContainer.ResolveAll<ISystemModule>();
136  foreach (var systemModule in modules) {
137  systemModule.Register(ServiceContainer);
138 
139  moduleInfo.Add(new ModuleInfo(systemModule.ModuleName, systemModule.Version));
140  }
141 
142  ServiceContainer.Unregister<ISystemModule>();
143  return moduleInfo;
144  }
bool Unregister(Type serviceType, object serviceName)
IEnumerable ResolveAll(Type serviceType)
virtual void Deveel.Data.SystemBuilder.OnServiceRegistration ( ServiceContainer  container)
inlineprotectedvirtual

Reimplemented in Deveel.Data.ContextBasedTest.TestSystemBuilder.

Definition at line 146 of file SystemBuilder.cs.

146  {
147  }
void Deveel.Data.SystemBuilder.RegisterDefaultServices ( )
inlineprivate

Definition at line 52 of file SystemBuilder.cs.

52  {
54 
56  .To<SystemFunctionsProvider>()
57  .InDatabaseScope();
58 
60  .To<SqlDefaultCompiler>()
61  .InSystemScope();
62 
64  .To<QueryPlanner>()
65  .InSystemScope();
66 
68  .To<TableCellCache>()
69  .InSystemScope();
70 
72  .To<TableManager>()
73  .WithKey(DbObjectType.Table)
74  .InTransactionScope();
75 
77  .To<ViewManager>()
78  .InTransactionScope()
79  .WithKey(DbObjectType.View);
80 
82  .To<SequenceManager>()
83  .WithKey(DbObjectType.Sequence)
84  .InTransactionScope();
85 
87  .To<TriggerManager>()
88  .WithKey(DbObjectType.Trigger)
89  .InTransactionScope();
90 
92  .To<SchemaManager>()
93  .WithKey(DbObjectType.Schema)
94  .InTransactionScope();
95 
97  .To<PersistentVariableManager>()
98  .WithKey(DbObjectType.Variable)
99  .InTransactionScope();
100 
102  .To<RoutineManager>()
103  .WithKey(DbObjectType.Routine)
104  .InTransactionScope();
105 
107  .To<InMemoryStorageSystem>()
109  .InDatabaseScope();
110 
112  .To<SingleFileStoreSystem>()
114  .InDatabaseScope();
115 
116 #if !PCL
118  .To<LocalFileSystem>()
119  .InSystemScope();
120 #endif
121  }
The system uses instances of this interface to resolve routines given a user invocation.
void Register(ServiceRegistration registration)
An object that creates and manages the IStore objects that the database engine uses to represent itse...
Definition: IStoreSystem.cs:31
Defines the contract for the business managers of database objects of a given type.
DbObjectType
The kind of objects that can be handled by a database system and its managers
Definition: DbObjectType.cs:27

Property Documentation

IConfiguration Deveel.Data.SystemBuilder.Configuration
getset

Definition at line 48 of file SystemBuilder.cs.

ServiceContainer Deveel.Data.SystemBuilder.ServiceContainer
getsetprivate

Definition at line 50 of file SystemBuilder.cs.


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