DbDataProvider.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
// minimum required Qore version
// assume local scope for variables, do not use "$" signs
// require type definitions everywhere
// enable all warnings
namespace DbDataProvider {
class DbDataProvider : public AbstractDataProvider {
public:
const ProviderInfo = ...;
const ConstructorOptions = ...;
const SearchOptions = ...;
protected:
AbstractDatabase db;
static *code datasource_lookup;
static *code table_lookup;
public:
constructor(AbstractDatasource ds, *hash<auto> opts);
constructor(AbstractDatabase db);
constructor(*hash<auto> options);
string getName();
commit();
rollback();
static *hash<string, AbstractDataField> getRecordTypeFromDescribeHash(hash<auto> describe_hash);
protected:
*hash<string, AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
public:
protected:
AbstractDataProviderBulkRecordInterface searchRecordsBulkImpl(int block_size = 1000, *hash<auto> where_cond, *hash<auto> search_options);
public:
protected:
AbstractDataProviderRecordIterator searchRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
public:
protected:
*list<string> getChildProviderNamesImpl();
public:
protected:
*AbstractDataProvider getChildProviderImpl(string name);
public:
protected:
hash<DataProviderInfo> getStaticInfoImpl();
public:
static setDatasourceLookup(code datasource_lookup);
static setTableLookup(code table_lookup);
static AbstractDatasource getDatasource(AbstractDatasource ds);
static AbstractDatasource getDatasource(string ds_string);
static AbstractTable getTable(string ds_string, string table_string);
static AbstractTable getTable(AbstractDatasource ds, string table_string);
};
};
DbDataProvider::DbDataProvider::getChildProviderNamesImpl
*list< string > getChildProviderNamesImpl()
Returns a list of child data provider names, if any.
DbDataProvider::DbDataProvider::datasource_lookup
static *code datasource_lookup
Lookup to get an abstract datasource from a name.
Definition: DbDataProvider.qc.dox.h:54
DbDataProvider::DbDataProvider::getTable
static AbstractTable getTable(string ds_string, string table_string)
Returns an AbstractTable object from the given datasource and table strings.
DbDataProvider::DbDataProvider::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.
DbDataProvider::DbDataProvider::commit
commit()
Commits any transaction in progress in the datasource.
DbDataProvider::DbDataProvider::searchRecordsImpl
AbstractDataProviderRecordIterator searchRecordsImpl(*hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
DbDataProvider::DbDataProvider::db
AbstractDatabase db
The database object.
Definition: DbDataProvider.qc.dox.h:51
DbDataProvider::DbDataProvider::getTable
static AbstractTable getTable(AbstractDatasource ds, string table_string)
Returns an AbstractTable object from the given datasource and table arguments.
DbDataProvider::DbDataProvider::setDatasourceLookup
static setDatasourceLookup(code datasource_lookup)
Sets the datasource lookup.
DbDataProvider::DbDataProvider::getDatasource
static AbstractDatasource getDatasource(AbstractDatasource ds)
Returns the given AbstractDatasource object.
DbDataProvider::DbDataProvider::getStaticInfoImpl
hash< DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
DbDataProvider::DbDataProvider::getChildProviderImpl
*AbstractDataProvider getChildProviderImpl(string name)
Returns the given child provider or NOTHING if the given child is unknown.
DbDataProvider::DbDataProvider::constructor
constructor(AbstractDatasource ds, *hash< auto > opts)
creates the object
DbDataProvider::DbDataProvider::getDatasource
static AbstractDatasource getDatasource(string ds_string)
Returns an AbstractDatasource object from the given string.
DbDataProvider::DbDataProvider::getRecordTypeFromDescribeHash
static *hash< string, AbstractDataField > getRecordTypeFromDescribeHash(hash< auto > describe_hash)
Returns the record type description from a describe hash.
DbDataProvider::DbDataProvider::getName
string getName()
Returns the data provider name.
DbDataProvider::DbDataProvider::table_lookup
static *code table_lookup
Lookup to get an abstract table from a datasource and a name.
Definition: DbDataProvider.qc.dox.h:57
DbDataProvider::DbDataProvider::constructor
constructor(AbstractDatabase db)
creates the object
DbDataProvider::DbDataProvider::setTableLookup
static setTableLookup(code table_lookup)
Sets the table lookup.
DbDataProvider::DbDataProvider::getRecordTypeImpl
*hash< string, AbstractDataField > getRecordTypeImpl(*hash< auto > search_options)
Returns the description of the record type, if any.
DbDataProvider::DbDataProvider::constructor
constructor(*hash< auto > options)
Creates the object from constructor options.
DbDataProvider::DbDataProvider::rollback
rollback()
Rolls back any transaction in progress in the datasource.
DbDataProvider
Qore AbstractDbRecordIterator class definition.
Definition: AbstractDbRecordIterator.qc.dox.h:32