| Qore DbDataProvider Module Reference 2.2

Loading...
Searching...
No Matches
DbDataProviderBase.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
24
26 namespace DbDataProvider {
28 class DbDataProviderBase : public AbstractDataProvider {
29
30 public:
31 protected:
33 AbstractDatabase db;
34
36 const ConstructorOptions = ...;
37
38
40
45 const MapperKeyInfo = ...;
46
47
49 static *code datasource_lookup;
50
52 static *code table_lookup;
53
54 public:
55
57 constructor(AbstractDatasource ds, *hash<auto> opts, *LoggerInterface logger) ;
58
59
61 constructor(AbstractDatabase db, *LoggerInterface logger) ;
62
63
65 constructor(hash<auto> options, *LoggerInterface logger) ;
66
67
69 constructor(*LoggerInterface logger) ;
70
71
73
76 bool requiresTransactionManagement();
77
78
80
87 beginTransaction();
88
89
91
96 commit();
97
98
100
105 rollback();
106
107
109
111 *hash<string, hash<MapperRuntimeKeyInfo>> getMapperRuntimeKeys();
112
113
115 int doSequenceKey(string sequence_name, hash<auto> ctx, *reference<bool> missing_input);
116
117
119 int doSequenceCurrvalKey(string sequence_name, hash<auto> ctx, *reference<bool> missing_input);
120
121
123
125 hash<auto> makeTableDesc(string name, hash<string, AbstractDataField> fields, *hash<auto> opts);
126
127
129 static hash<GenericColumnInfo> getColumnDesc(AbstractDatabase db, AbstractDataField field, *hash<auto> opts);
130
132 static setDatasourceLookup(code datasource_lookup);
133
135 static setTableLookup(code table_lookup);
136
138 static AbstractDatasource getDatasource(AbstractDatasource ds);
139
141 static AbstractDatasource getDatasource(string ds_string);
142
144 static AbstractTable getTable(string ds_string, string table_string);
145
147 static AbstractTable getTable(AbstractDatasource ds, string table_string);
148};
149};
DbDataProvider::DbDataProviderBase
The database data provider base class.
Definition DbDataProviderBase.qc.dox.h:28
DbDataProvider::DbDataProviderBase::beginTransaction
beginTransaction()
Begins a transaction in the datasource.
DbDataProvider::DbDataProviderBase::constructor
constructor(AbstractDatasource ds, *hash< auto > opts, *LoggerInterface logger)
creates the object
DbDataProvider::DbDataProviderBase::MapperKeyInfo
const MapperKeyInfo
Mapper runtime key info; see details below.
Definition DbDataProviderBase.qc.dox.h:45
DbDataProvider::DbDataProviderBase::getMapperRuntimeKeys
*hash< string, hash< MapperRuntimeKeyInfo > > getMapperRuntimeKeys()
Returns custom data mapper runtime keys.
DbDataProvider::DbDataProviderBase::constructor
constructor(hash< auto > options, *LoggerInterface logger)
Creates the object from constructor options.
DbDataProvider::DbDataProviderBase::db
AbstractDatabase db
the database object, if required
Definition DbDataProviderBase.qc.dox.h:33
DbDataProvider::DbDataProviderBase::makeTableDesc
hash< auto > makeTableDesc(string name, hash< string, AbstractDataField > fields, *hash< auto > opts)
Returns a table description hash from a field description.
DbDataProvider::DbDataProviderBase::setDatasourceLookup
static setDatasourceLookup(code datasource_lookup)
Sets the datasource lookup.
DbDataProvider::DbDataProviderBase::table_lookup
static *code table_lookup
Lookup to get an abstract table from a datasource and a name.
Definition DbDataProviderBase.qc.dox.h:52
DbDataProvider::DbDataProviderBase::datasource_lookup
static *code datasource_lookup
Lookup to get an abstract datasource from a name.
Definition DbDataProviderBase.qc.dox.h:49
DbDataProvider::DbDataProviderBase::getDatasource
static AbstractDatasource getDatasource(AbstractDatasource ds)
Returns the given AbstractDatasource object.
DbDataProvider::DbDataProviderBase::constructor
constructor(*LoggerInterface logger)
Creates the object with the given logger.
DbDataProvider::DbDataProviderBase::getTable
static AbstractTable getTable(string ds_string, string table_string)
Returns an AbstractTable object from the given datasource and table strings.
DbDataProvider::DbDataProviderBase::doSequenceKey
int doSequenceKey(string sequence_name, hash< auto > ctx, *reference< bool > missing_input)
Processes the sequence runtime key in mappers as a mapper key handler.
DbDataProvider::DbDataProviderBase::getDatasource
static AbstractDatasource getDatasource(string ds_string)
Returns an AbstractDatasource object from the given string.
DbDataProvider::DbDataProviderBase::setTableLookup
static setTableLookup(code table_lookup)
Sets the table lookup.
DbDataProvider::DbDataProviderBase::doSequenceCurrvalKey
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.
DbDataProvider::DbDataProviderBase::getColumnDesc
static hash< GenericColumnInfo > getColumnDesc(AbstractDatabase db, AbstractDataField field, *hash< auto > opts)
Returns a column description hash for a field.
DbDataProvider::DbDataProviderBase::rollback
rollback()
Rolls back any transaction in progress in the datasource.
DbDataProvider::DbDataProviderBase::getTable
static AbstractTable getTable(AbstractDatasource ds, string table_string)
Returns an AbstractTable object from the given datasource and table arguments.
DbDataProvider::DbDataProviderBase::commit
commit()
Commits any transaction in progress in the datasource.
DbDataProvider::DbDataProviderBase::ConstructorOptions
const ConstructorOptions
Constructor options.
Definition DbDataProviderBase.qc.dox.h:36
DbDataProvider::DbDataProviderBase::constructor
constructor(AbstractDatabase db, *LoggerInterface logger)
creates the object
DbDataProvider::DbDataProviderBase::requiresTransactionManagement
bool requiresTransactionManagement()
Returns True if the data provider supports transaction management.
DbDataProvider
Qore AbstractDbRecordIterator class definition.
Definition AbstractDbRecordIterator.qc.dox.h:26