DeveelDB
20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
|
The default implementation of a database in a system. More...
Classes | |
class | DatabaseTransactionFactory |
Public Member Functions | |
void | Dispose () |
void | Create (string adminName, string adminPassword) |
Creates the database in the context given, granting the administrative control to the user identified by the given name and password. More... | |
void | Open () |
Opens the database making it ready to be accessed. More... | |
void | Close () |
Closes the database making it not accessible to connections. More... | |
Package Functions | |
Database (DatabaseSystem system, IDatabaseContext context) | |
Properties | |
string | Name [get, private set] |
Gets the database name, as configured in the parent context. More... | |
DatabaseSystem | System [get, private set] |
ActiveSessionList | Sessions [get, private set] |
Locker | Locker [get, private set] |
ITransactionFactory | TransactionFactory [get, private set] |
Gets an object that is used to create new transactions to this database More... | |
IEventSource IEventSource. | ParentSource [get] |
IContext IEventSource. | Context [get] |
IEnumerable< KeyValuePair< string, object > > IEventSource. | Metadata [get] |
IDatabaseContext | Context [get, private set] |
Gets the context that contains this database. More... | |
Version | Version [get, private set] |
Gets the version number of this database. More... | |
bool | Exists [get] |
Gets a boolean value indicating if the database exists within the context given. More... | |
bool | IsOpen [get, private set] |
Gets a boolean value that indicates if the database was open. More... | |
TableSourceComposite | TableComposite [get, private set] |
ITable | SingleRowTable [get, private set] |
Gets a special table, unique for every database, that has a single row and a single cell. More... | |
Properties inherited from Deveel.Data.IDatabase | |
string | Name [get] |
Gets the name of the database. More... | |
new IDatabaseContext | Context [get] |
Gets the context that contains this database. More... | |
ITransactionFactory | TransactionFactory [get] |
Gets an object that is used to create new transactions to this database More... | |
ActiveSessionList | Sessions [get] |
Gets a list of all the open sessions to the database. More... | |
Locker | Locker [get] |
Gets the objects that is used to lock database objects between transactions. More... | |
Version | Version [get] |
Gets the version number of this database. More... | |
bool | Exists [get] |
Gets a boolean value indicating if the database exists within the context given. More... | |
bool | IsOpen [get] |
Gets a boolean value that indicates if the database was open. More... | |
ITable | SingleRowTable [get] |
Gets a special table, unique for every database, that has a single row and a single cell. More... | |
Properties inherited from Deveel.Data.Diagnostics.IEventSource | |
IContext | Context [get] |
IEventSource | ParentSource [get] |
Gets an optional parent source. More... | |
IEnumerable< KeyValuePair< string, object > > | Metadata [get] |
Gets the list of metadata associated to the source. More... | |
Private Member Functions | |
~Database () | |
Finalizes an instance of the Database class. More... | |
void | DiscoverDataVersion () |
void | Dispose (bool disposing) |
void | OnDatabaseCreate (IQuery context) |
void | SetCurrentDataVersion (IQuery context) |
void | CreateSchemata (IQuery context) |
void | AssertDataVersion () |
Private Attributes | |
bool | disposed |
The default implementation of a database in a system.
This class implements the IDatabase contract, that is backed by a IDatabaseContext for configurations and services, provides functionalities for the management of data in the relational model.
Definition at line 38 of file Database.cs.
|
inlinepackage |
Definition at line 39 of file Database.cs.
|
inlineprivate |
Finalizes an instance of the Database class.
Definition at line 67 of file Database.cs.
|
inlineprivate |
Definition at line 362 of file Database.cs.
|
inline |
Closes the database making it not accessible to connections.
DatabaseSystemException | The database is not initialized. or An error occurred during database shutdown. |
Typical implementations of this interface will automatically invoke the closure of the database on disposal (IDisposable.Dispose.
Implements Deveel.Data.IDatabase.
Definition at line 378 of file Database.cs.
|
inline |
Creates the database in the context given, granting the administrative control to the user identified by the given name and password.
adminName | The name of the administrator. |
adminPassword | The password used to identify the administrator. |
DatabaseSystemException | If the database context is configured to be in read-only model, if it was not possible to commit the initial information or if another unhanded error occurred while creating the database. |
ArgumentNullException | If either one of adminName or adminPassword are null or empty. |
The properties used to create the database are extracted from the underlying context (DatabaseContext).
This method does not automatically open the database: to make it accessible a call to Open is required.
Implements Deveel.Data.IDatabase.
Definition at line 240 of file Database.cs.
|
inlineprivate |
Definition at line 307 of file Database.cs.
|
inlineprivate |
Definition at line 108 of file Database.cs.
|
inline |
Definition at line 115 of file Database.cs.
|
inlineprivate |
Definition at line 122 of file Database.cs.
|
inlineprivate |
Definition at line 200 of file Database.cs.
|
inline |
Opens the database making it ready to be accessed.
DatabaseSystemException | The database was already initialized. or or An error occurred when initializing the database. |
This method ensures the system components and the data are ready to allow any connection to be established.
After this method successfully exists, the state of IsOpen is changed to true
.
Implements Deveel.Data.IDatabase.
Definition at line 337 of file Database.cs.
|
inlineprivate |
Definition at line 303 of file Database.cs.
|
private |
Definition at line 120 of file Database.cs.
|
getprivate |
Definition at line 95 of file Database.cs.
|
getprivate set |
Gets the context that contains this database.
Definition at line 154 of file Database.cs.
|
get |
Gets a boolean value indicating if the database exists within the context given.
Exception | An error occurred while testing database existence. |
Definition at line 171 of file Database.cs.
|
getprivate set |
Gets a boolean value that indicates if the database was open.
Definition at line 190 of file Database.cs.
|
getprivate set |
Definition at line 83 of file Database.cs.
|
getprivate |
Definition at line 99 of file Database.cs.
|
getprivate set |
Gets the database name, as configured in the parent context.
The database name.
Definition at line 77 of file Database.cs.
|
getprivate |
Definition at line 91 of file Database.cs.
|
getprivate set |
Definition at line 81 of file Database.cs.
|
getprivate set |
Gets a special table, unique for every database, that has a single row and a single cell.
Definition at line 198 of file Database.cs.
|
getprivate set |
Definition at line 79 of file Database.cs.
|
getprivate setpackage |
Definition at line 192 of file Database.cs.
|
getprivate set |
Gets an object that is used to create new transactions to this database
Definition at line 89 of file Database.cs.
|
getprivate set |
Gets the version number of this database.
This value is useful for data compatibility between versions of the system.
Definition at line 163 of file Database.cs.