C# Class Deveel.Data.Database

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.
Inheritance: IDatabase
Mostra file Open project: deveel/deveeldb Class Usage Examples

Private Properties

Property Type Description
AssertDataVersion void
Close void
Count void
Database System
Delete void
DiscoverDataVersion void
Dispose void
OnDatabaseCreate void
OnDatabaseCreated void
Open void

Public Methods

Method Description
Create ( string adminName, string identification, string token ) : void

Creates the database in the context given, granting the administrative control to the user identified by the given name and token.

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.

CreateLargeObject ( long objectSize, bool compressed ) : ILargeObject
Dispose ( ) : void
GetLargeObject ( ObjectId objId ) : ILargeObject
New ( IConfiguration config, string adminName, string adminPassword ) : IDatabase
New ( IConfiguration config, string dbName, string adminName, string adminPassword ) : IDatabase
New ( string dbName, string adminName, string adminPassword ) : IDatabase

Protected Methods

Method Description
GetMetadata ( object>.Dictionary metadata ) : void

Private Methods

Method Description
AssertDataVersion ( ) : void
Close ( ) : void

Closes the database making it not accessible to connections.

Typical implementations of this interface will automatically invoke the closure of the database on disposal (IDisposable.Dispose.

Count ( CounterEvent e ) : void
Database ( DatabaseSystem system, IDatabaseContext context ) : System
Delete ( ) : void
DiscoverDataVersion ( ) : void
Dispose ( bool disposing ) : void
OnDatabaseCreate ( IQuery context ) : void
OnDatabaseCreated ( IQuery context ) : void
Open ( ) : void

Opens the database making it ready to be accessed.

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.

Method Details

Create() public method

Creates the database in the context given, granting the administrative control to the user identified by the given name and token.

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.

/// 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. /// /// If either one of or /// are null or empty. ///
public Create ( string adminName, string identification, string token ) : void
adminName string The name of the administrator.
identification string The name of the mechanism used to identify the user by the /// given token.
token string The toke used to identify the administrator, using the /// mechanism given.
return void

CreateLargeObject() public method

public CreateLargeObject ( long objectSize, bool compressed ) : ILargeObject
objectSize long
compressed bool
return ILargeObject

Dispose() public method

public Dispose ( ) : void
return void

GetLargeObject() public method

public GetLargeObject ( ObjectId objId ) : ILargeObject
objId ObjectId
return ILargeObject

GetMetadata() protected method

protected GetMetadata ( object>.Dictionary metadata ) : void
metadata object>.Dictionary
return void

New() public static method

public static New ( IConfiguration config, string adminName, string adminPassword ) : IDatabase
config IConfiguration
adminName string
adminPassword string
return IDatabase

New() public static method

public static New ( IConfiguration config, string dbName, string adminName, string adminPassword ) : IDatabase
config IConfiguration
dbName string
adminName string
adminPassword string
return IDatabase

New() public static method

public static New ( string dbName, string adminName, string adminPassword ) : IDatabase
dbName string
adminName string
adminPassword string
return IDatabase