DbTableDataProvider.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
namespace DbDataProvider {
class DbTableDataProvider : public AbstractDataProvider {
public:
const ProviderInfo = ...;
const MapperKeyInfo = ...;
const ConstructorOptions = ...;
const CreateOptions = ...;
const UpsertOptions = ...;
const SearchOptions = ...;
const DbUpsertMap = ...;
protected:
AbstractTable table;
AbstractDatabase db;
Mutex db_lock();
public:
constructor(AbstractTable table, *Logger logger);
constructor(*hash<auto> options);
string getName();
*AbstractDataProvider getChildProviders();
bool requiresTransactionManagement();
beginTransaction();
commit();
rollback();
AbstractDataProviderBulkOperation getBulkInserter();
AbstractDataProviderBulkOperation getBulkUpserter();
*hash<string, hash<MapperRuntimeKeyInfo>> getMapperRuntimeKeys();
int doSequenceKey(string sequence_name);
int doSequenceCurrvalKey(string sequence_name);
protected:
*hash<string, AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
public:
protected:
*hash<auto> createRecordImpl(hash<auto> rec, *hash<auto> create_options);
public:
string upsertRecordImpl(hash<auto> rec, *hash<auto> upsert_options);
protected:
*hash<auto> searchSingleRecordImpl(hash<auto> where_cond, *hash<auto> search_options);
public:
protected:
AbstractDataProviderBulkRecordInterface searchRecordsBulkImpl(int block_size = 1000, *hash<auto> where_cond, *hash<auto> search_options);
public:
protected:
DbTableRecordIterator searchRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
public:
protected:
bool updateSingleRecordImpl(hash<auto> set, hash<auto> where_cond, *hash<auto> search_options);
public:
protected:
int updateRecordsImpl(hash<auto> set, *hash<auto> where_cond, *hash<auto> search_options);
public:
protected:
int deleteRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
public:
protected:
hash<DataProviderInfo> getStaticInfoImpl();
public:
protected:
addFieldImpl(AbstractDataField field, *hash<auto> field_add_options);
public:
protected:
updateFieldImpl(string name, AbstractDataField field, *hash<auto> field_update_options);
public:
protected:
deleteFieldImpl(string name, *hash<auto> field_delete_options);
public:
protected:
alignTable(hash<auto> table_desc);
public:
protected:
execDdlSql(list<auto> sqll);
public:
};
};
DbDataProvider::DbTableDataProvider::getBulkInserter
AbstractDataProviderBulkOperation getBulkInserter()
Returns a bulk insert operation object for the data provider.
DbDataProvider::DbTableRecordIterator
Defines the record iterator class for Table-based iterators.
Definition: DbTableRecordIterator.qc.dox.h:34
DbDataProvider::DbTableDataProvider::doSequenceKey
int doSequenceKey(string sequence_name)
Processes the sequence runtime key in mappers.
DbDataProvider::DbTableDataProvider::constructor
constructor(AbstractTable table, *Logger logger)
Creates the object.
DbDataProvider::DbTableDataProvider::doSequenceCurrvalKey
int doSequenceCurrvalKey(string sequence_name)
Processes the sequence_currval runtime key in mappers.
DbDataProvider::DbTableDataProvider::db_lock
Mutex db_lock()
lock for "db"
DbDataProvider::DbTableDataProvider::ProviderInfo
const ProviderInfo
Provider info.
Definition: DbTableDataProvider.qc.dox.h:32
DbDataProvider::DbTableDataProvider::updateRecordsImpl
int updateRecordsImpl(hash< auto > set, *hash< auto > where_cond, *hash< auto > search_options)
Updates zero or more records matching the search options.
DbDataProvider::DbTableDataProvider::getMapperRuntimeKeys
*hash< string, hash< MapperRuntimeKeyInfo > > getMapperRuntimeKeys()
Returns custom data mapper runtime keys.
DbDataProvider::DbTableDataProvider
Defines a data provider based on a single SQL table.
Definition: DbTableDataProvider.qc.dox.h:28
DbDataProvider::DbTableDataProvider::commit
commit()
Commits data written to the data provider.
DbDataProvider::DbTableDataProvider::deleteRecordsImpl
int deleteRecordsImpl(*hash< auto > where_cond, *hash< auto > search_options)
Deletes zero or more records.
DbDataProvider::DbTableDataProvider::MapperKeyInfo
const MapperKeyInfo
Mapper runtime key info; see details below.
Definition: DbTableDataProvider.qc.dox.h:41
DbDataProvider::DbTableDataProvider::updateFieldImpl
updateFieldImpl(string name, AbstractDataField field, *hash< auto > field_update_options)
Updates an existing field.
DbDataProvider::DbTableDataProvider::SearchOptions
const SearchOptions
Search options; see details below.
Definition: DbTableDataProvider.qc.dox.h:96
DbDataProvider::DbTableDataProvider::getStaticInfoImpl
hash< DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
DbDataProvider::DbTableDataProvider::requiresTransactionManagement
bool requiresTransactionManagement()
Returns True if the data provider supports transaction management.
DbDataProvider::DbTableDataProvider::upsertRecordImpl
string upsertRecordImpl(hash< auto > rec, *hash< auto > upsert_options)
Upserts the given record to the data provider.
DbDataProvider::DbTableDataProvider::getChildProviders
*AbstractDataProvider getChildProviders()
Returns child providers; return NOTHING if there are no child providers.
DbDataProvider::DbTableDataProvider::UpsertOptions
const UpsertOptions
Upsert options; see details below.
Definition: DbTableDataProvider.qc.dox.h:69
DbDataProvider::DbTableDataProvider::db
AbstractDatabase db
the database object, if required
Definition: DbTableDataProvider.qc.dox.h:108
DbDataProvider::DbTableDataProvider::addFieldImpl
addFieldImpl(AbstractDataField field, *hash< auto > field_add_options)
Creates a new field.
DbDataProvider::DbTableDataProvider::alignTable
alignTable(hash< auto > table_desc)
Align table with the given description.
DbDataProvider::DbTableDataProvider::table
AbstractTable table
the table
Definition: DbTableDataProvider.qc.dox.h:105
DbDataProvider::DbTableDataProvider::getRecordTypeImpl
*hash< string, AbstractDataField > getRecordTypeImpl(*hash< auto > search_options)
Returns the description of the record type, if any.
DbDataProvider::DbTableDataProvider::DbUpsertMap
const DbUpsertMap
Maps SqlUtil Upsert Result Codes to DB Provider Upsert Result Codes.
Definition: DbTableDataProvider.qc.dox.h:100
DbDataProvider::DbTableDataProvider::searchSingleRecordImpl
*hash< auto > searchSingleRecordImpl(hash< auto > where_cond, *hash< auto > search_options)
Returns a single record matching the search options.
DbDataProvider::DbTableDataProvider::rollback
rollback()
Rolls back data written to the data provider.
DbDataProvider::DbTableDataProvider::createRecordImpl
*hash< auto > createRecordImpl(hash< auto > rec, *hash< auto > create_options)
Writes the given record to the data provider.
DbDataProvider::DbTableDataProvider::searchRecordsImpl
DbTableRecordIterator searchRecordsImpl(*hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
DbDataProvider::DbTableDataProvider::getName
string getName()
Returns the data provider name.
DbDataProvider::DbTableDataProvider::CreateOptions
const CreateOptions
Create options; see details below.
Definition: DbTableDataProvider.qc.dox.h:58
DbDataProvider::DbTableDataProvider::execDdlSql
execDdlSql(list< auto > sqll)
Executes the given DDL SQL string list.
DbDataProvider::DbTableDataProvider::beginTransaction
beginTransaction()
Begins a transaction in the datasource underlying the table.
DbDataProvider::DbTableDataProvider::updateSingleRecordImpl
bool updateSingleRecordImpl(hash< auto > set, hash< auto > where_cond, *hash< auto > search_options)
Updates a single record matching the search options.
DbDataProvider::DbTableDataProvider::deleteFieldImpl
deleteFieldImpl(string name, *hash< auto > field_delete_options)
Deletes an existing field.
DbDataProvider
Qore AbstractDbRecordIterator class definition.
Definition: AbstractDbRecordIterator.qc.dox.h:32
DbDataProvider::DbTableDataProvider::getBulkUpserter
AbstractDataProviderBulkOperation getBulkUpserter()
Returns a bulk upsert operation object for the data provider.
DbDataProvider::DbTableDataProvider::ConstructorOptions
const ConstructorOptions
Constructor options.
Definition: DbTableDataProvider.qc.dox.h:45
DbDataProvider::DbTableDataProvider::searchRecordsBulkImpl
AbstractDataProviderBulkRecordInterface searchRecordsBulkImpl(int block_size=1000, *hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.