DataSource :: database - Database handle
When the data source handle has been opened successfully, this handle refers to the opened database. The handle can be checked by calling database.isValid() .
bool CheckDatabase( DataSource &ds ) {
return ( ds.database.IsValid() ? OK : FAIL )
}
The database handle refers to an (usually) opened database. Calling functions with invalid database handles may cause an exception. For checking the database handle, isValid() can be called.
Implementation overview
- Get database handle
DataSource :: database (  ) - Set database
DataSource :: database ( cDatabase )
Implementation details
-
Get database handle
odaba::Database & DataSource  :: database (  )
The property returns the database handle for the data source. The database handle might be invalid, when the data source has not been opened or has not been opened successfully.
to list
-
Set database
odaba::Database & DataSource  :: database ( odaba::Database &cDatabase )
The function closes the database handle when being opened. The function copies the database handle passed in rDatabase to the data source database handle. It sets the database path in the data source to the database path extracted from the passed database handle ( rDatabase .path() ).
Notes:The database handle passed to the function need not fit to the dictionary opened in the data source. No consistency check will be made.
- cDatabase
- Database handle
The database handle refers to an (usually) opened database. Calling functions with invalid database handles may cause an exception. For checking the database handle, isValid() can be called.
to list
- cDatabase
- Database handle