Definition at line 26 of file DatabaseSystem.cs.
Definition at line 31 of file DatabaseSystem.cs.
IContext IEventSource. Context
IEnumerable< ModuleInfo > Modules
Deveel.Data.DatabaseSystem.~DatabaseSystem |
( |
| ) |
|
|
inlineprivate |
IDatabase Deveel.Data.DatabaseSystem.CreateDatabase |
( |
IConfiguration |
configuration, |
|
|
string |
adminUser, |
|
|
string |
adminPassword |
|
) |
| |
|
inline |
Implements Deveel.Data.ISystem.
Definition at line 132 of file DatabaseSystem.cs.
134 if (configuration == null)
135 throw new ArgumentNullException(
"configuration");
137 var databaseName = configuration.GetString(
"database.name");
138 if (
String.IsNullOrEmpty(databaseName))
139 throw new ArgumentException(
"The configuration must specify a database name.");
142 throw new InvalidOperationException(
String.Format(
"Database '{0}' already exists in the system.", databaseName));
144 var dbContext =
Context.CreateDatabaseContext(configuration);
145 var database =
new Database(
this, dbContext);
148 throw new InvalidOperationException(
String.Format(
"The database '{0}' was already created.", databaseName));
150 database.Create(adminUser, adminPassword);
154 databases =
new Dictionary<string, IDatabase>();
A long string in the system.
IContext IEventSource. Context
IDictionary< string, IDatabase > databases
bool DatabaseExists(string databaseName)
void Deveel.Data.DatabaseSystem.CreateMetadata |
( |
| ) |
|
|
inlineprivate |
Definition at line 41 of file DatabaseSystem.cs.
42 metadata =
new Dictionary<string, object>();
45 metadata[
"[env]:os.platform"] = Environment.OSVersion.Platform;
46 metadata[
"[env]:os.version"] = Environment.OSVersion.VersionString;
47 metadata[
"[env]:os.sp"] = Environment.OSVersion.ServicePack;
48 metadata[
"[env]:runtime.version"] = Environment.Version.ToString();
49 metadata[
"[env]:machineName"] = Environment.MachineName;
50 metadata[
"[env]:hostName"] = Dns.GetHostName();
53 metadata[
"[env]processors"] = Environment.ProcessorCount;
56 metadata[
String.Format(
"[config]:{0}", config.Key)] = config.Value;
59 foreach (var module
in Modules) {
60 metadata[
String.Format(
"[module]:{0}", module.ModuleName)] = module.Version;
A long string in the system.
IDictionary< string, object > metadata
IEnumerable< ModuleInfo > Modules
bool Deveel.Data.DatabaseSystem.DatabaseExists |
( |
string |
databaseName | ) |
|
|
inline |
Implements Deveel.Data.ISystem.
Definition at line 183 of file DatabaseSystem.cs.
185 if (
String.IsNullOrEmpty(databaseName))
186 throw new ArgumentNullException(
"databaseName");
191 return databases.ContainsKey(databaseName);
A long string in the system.
IDictionary< string, IDatabase > databases
bool Deveel.Data.DatabaseSystem.DeleteDatabase |
( |
string |
databaseName | ) |
|
|
inline |
Implements Deveel.Data.ISystem.
Definition at line 195 of file DatabaseSystem.cs.
197 if (
String.IsNullOrEmpty(databaseName))
198 throw new ArgumentNullException(
"databaseName");
204 if (!
databases.TryGetValue(databaseName, out database))
207 if (!database.Exists)
A long string in the system.
IDictionary< string, IDatabase > databases
void Deveel.Data.DatabaseSystem.Dispose |
( |
| ) |
|
|
inline |
void Deveel.Data.DatabaseSystem.Dispose |
( |
bool |
disposing | ) |
|
|
inlineprivate |
Definition at line 92 of file DatabaseSystem.cs.
96 foreach (var database
in databases.Values) {
IContext IEventSource. Context
IDictionary< string, IDatabase > databases
IDatabase Deveel.Data.DatabaseSystem.GetDatabase |
( |
string |
databaseName | ) |
|
|
inline |
IEnumerable<string> Deveel.Data.DatabaseSystem.GetDatabases |
( |
| ) |
|
|
inline |
Implements Deveel.Data.ISystem.
Definition at line 162 of file DatabaseSystem.cs.
164 if (configuration == null)
165 throw new ArgumentNullException(
"configuration");
167 var databaseName = configuration.GetString(
"database.name");
168 if (
String.IsNullOrEmpty(databaseName))
169 throw new ArgumentException(
"The configuration must specify a database name.");
173 !
databases.TryGetValue(databaseName, out database))
174 throw new InvalidOperationException(
String.Format(
"Database '{0}' does not exist in the system.", databaseName));
176 if (!database.IsOpen)
A long string in the system.
IDictionary< string, IDatabase > databases
void Deveel.Data.DatabaseSystem.RemoveDatabase |
( |
Database |
database | ) |
|
|
inlinepackage |
IDictionary<string, IDatabase> Deveel.Data.DatabaseSystem.databases |
|
private |
IDictionary<string, object> Deveel.Data.DatabaseSystem.metadata |
|
private |
IContext IEventSource. Deveel.Data.DatabaseSystem.Context |
|
getprivate |
IEnumerable<KeyValuePair<string, object> > IEventSource. Deveel.Data.DatabaseSystem.Metadata |
|
getprivate |
IEnumerable<ModuleInfo> Deveel.Data.DatabaseSystem.Modules |
|
getprivate set |
IEventSource IEventSource. Deveel.Data.DatabaseSystem.ParentSource |
|
getprivate |
The documentation for this class was generated from the following file:
- /var/calculate/remote/distfiles/egit-src/deveeldb.git/src/deveeldb/Deveel.Data/DatabaseSystem.cs