The database data provider base class.
More...
#include <DbDataProviderBase.qc.dox.h>
|
| beginTransaction () |
| Begins a transaction in the datasource.
|
|
| commit () |
| Commits any transaction in progress in the datasource.
|
|
| constructor (*LoggerInterface logger) |
| Creates the object with the given logger.
|
|
| constructor (AbstractDatabase db, *LoggerInterface logger) |
| creates the object
|
|
| constructor (AbstractDatasource ds, *hash< auto > opts, *LoggerInterface logger) |
| creates the object
|
|
| constructor (hash< auto > options, *LoggerInterface logger) |
| Creates the object from constructor options.
|
|
int | doSequenceCurrvalKey (string sequence_name, hash< auto > ctx, *reference< bool > missing_input) |
| Processes the sequence_currval runtime key in mappers as a mapper key handler.
|
|
int | doSequenceKey (string sequence_name, hash< auto > ctx, *reference< bool > missing_input) |
| Processes the sequence runtime key in mappers as a mapper key handler.
|
|
*hash< string, hash< MapperRuntimeKeyInfo > > | getMapperRuntimeKeys () |
| Returns custom data mapper runtime keys.
|
|
hash< auto > | makeTableDesc (string name, hash< string, AbstractDataField > fields, *hash< auto > opts) |
| Returns a table description hash from a field description.
|
|
bool | requiresTransactionManagement () |
| Returns True if the data provider supports transaction management.
|
|
| rollback () |
| Rolls back any transaction in progress in the datasource.
|
|
|
static hash< GenericColumnInfo > | getColumnDesc (AbstractDatabase db, AbstractDataField field, *hash< auto > opts) |
| Returns a column description hash for a field.
|
|
static AbstractDatasource | getDatasource (AbstractDatasource ds) |
| Returns the given AbstractDatasource object.
|
|
static AbstractDatasource | getDatasource (string ds_string) |
| Returns an AbstractDatasource object from the given string.
|
|
static AbstractTable | getTable (AbstractDatasource ds, string table_string) |
| Returns an AbstractTable object from the given datasource and table arguments.
|
|
static AbstractTable | getTable (string ds_string, string table_string) |
| Returns an AbstractTable object from the given datasource and table strings.
|
|
static | setDatasourceLookup (code datasource_lookup) |
| Sets the datasource lookup.
|
|
static | setTableLookup (code table_lookup) |
| Sets the table lookup.
|
|
|
const | ConstructorOptions = ... |
| Constructor options.
|
|
AbstractDatabase | db |
| the database object, if required
|
|
const | MapperKeyInfo = ... |
| Mapper runtime key info; see details below.
|
|
|
static *code | datasource_lookup |
| Lookup to get an abstract datasource from a name.
|
|
static *code | table_lookup |
| Lookup to get an abstract table from a datasource and a name.
|
|
The database data provider base class.
◆ beginTransaction()
DbDataProvider::DbDataProviderBase::beginTransaction |
( |
| ) |
|
Begins a transaction in the datasource.
- See also
- :
- Since
- DbDataProvider 1.0.1
◆ commit()
DbDataProvider::DbDataProviderBase::commit |
( |
| ) |
|
Commits any transaction in progress in the datasource.
- See also
- :
◆ getMapperRuntimeKeys()
*hash< string, hash< MapperRuntimeKeyInfo > > DbDataProvider::DbDataProviderBase::getMapperRuntimeKeys |
( |
| ) |
|
Returns custom data mapper runtime keys.
- Returns
- custom data mapper runtime keys
◆ makeTableDesc()
hash< auto > DbDataProvider::DbDataProviderBase::makeTableDesc |
( |
string |
name, |
|
|
hash< string, AbstractDataField > |
fields, |
|
|
*hash< auto > |
opts |
|
) |
| |
Returns a table description hash from a field description.
- Exceptions
-
TABLE-DESC-ERROR | error in table description |
◆ requiresTransactionManagement()
bool DbDataProvider::DbDataProviderBase::requiresTransactionManagement |
( |
| ) |
|
Returns True if the data provider supports transaction management.
- Returns
- True if the data provider supports transaction management, in which case commit() or rollback() must be called to flush or discard data written to the data provider
◆ rollback()
DbDataProvider::DbDataProviderBase::rollback |
( |
| ) |
|
Rolls back any transaction in progress in the datasource.
- See also
- :
◆ MapperKeyInfo
const DbDataProvider::DbDataProviderBase::MapperKeyInfo = ... |
|
private |
Mapper runtime key info; see details below.
The DbDataProvider class supports the following create option:
sequence:
names the DB sequence that will be used to populate the field
sequence_currval:
names the DB sequence that will be used to populate the field; the current value of the sequence is used; will not increment the sequence