Qore DbDataProvider Module Reference 2.2
Loading...
Searching...
No Matches
DbDataProviderBase.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
26namespace DbDataProvider {
28class DbDataProviderBase : public AbstractDataProvider {
29
30public:
31protected:
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
54public:
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
77
78
80
88
89
91
97
98
100
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
133
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};
The database data provider base class.
Definition DbDataProviderBase.qc.dox.h:28
beginTransaction()
Begins a transaction in the datasource.
constructor(AbstractDatasource ds, *hash< auto > opts, *LoggerInterface logger)
creates the object
const MapperKeyInfo
Mapper runtime key info; see details below.
Definition DbDataProviderBase.qc.dox.h:45
*hash< string, hash< MapperRuntimeKeyInfo > > getMapperRuntimeKeys()
Returns custom data mapper runtime keys.
constructor(hash< auto > options, *LoggerInterface logger)
Creates the object from constructor options.
AbstractDatabase db
the database object, if required
Definition DbDataProviderBase.qc.dox.h:33
hash< auto > makeTableDesc(string name, hash< string, AbstractDataField > fields, *hash< auto > opts)
Returns a table description hash from a field description.
static setDatasourceLookup(code datasource_lookup)
Sets the datasource lookup.
static *code table_lookup
Lookup to get an abstract table from a datasource and a name.
Definition DbDataProviderBase.qc.dox.h:52
static *code datasource_lookup
Lookup to get an abstract datasource from a name.
Definition DbDataProviderBase.qc.dox.h:49
static AbstractDatasource getDatasource(AbstractDatasource ds)
Returns the given AbstractDatasource object.
constructor(*LoggerInterface logger)
Creates the object with the given logger.
static AbstractTable getTable(string ds_string, string table_string)
Returns an AbstractTable object from the given datasource and table strings.
int doSequenceKey(string sequence_name, hash< auto > ctx, *reference< bool > missing_input)
Processes the sequence runtime key in mappers as a mapper key handler.
static AbstractDatasource getDatasource(string ds_string)
Returns an AbstractDatasource object from the given string.
static setTableLookup(code table_lookup)
Sets the table lookup.
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.
static hash< GenericColumnInfo > getColumnDesc(AbstractDatabase db, AbstractDataField field, *hash< auto > opts)
Returns a column description hash for a field.
rollback()
Rolls back any transaction in progress in the datasource.
static AbstractTable getTable(AbstractDatasource ds, string table_string)
Returns an AbstractTable object from the given datasource and table arguments.
commit()
Commits any transaction in progress in the datasource.
const ConstructorOptions
Constructor options.
Definition DbDataProviderBase.qc.dox.h:36
constructor(AbstractDatabase db, *LoggerInterface logger)
creates the object
bool requiresTransactionManagement()
Returns True if the data provider supports transaction management.
Qore AbstractDbRecordIterator class definition.
Definition AbstractDbRecordIterator.qc.dox.h:26