![]() |
Qore DbDataProvider Module Reference
1.0
|
Defines a data provider based on a single SQL table. More...
Inherits AbstractDataProvider.
Public Member Functions | |
| commit () | |
| Commits data written to the data provider. More... | |
| constructor (AbstractTable table) | |
| Creates the object. | |
| constructor (*hash< auto > options) | |
| Creates the object from constructor options. | |
| int | doSequenceCurrvalKey (string sequence_name) |
Processes the sequence_currval runtime key in mappers. | |
| int | doSequenceKey (string sequence_name) |
Processes the sequence runtime key in mappers. | |
| AbstractDataProviderBulkOperation | getBulkInserter () |
| Returns a bulk insert operation object for the data provider. More... | |
| AbstractDataProviderBulkOperation | getBulkUpserter () |
| Returns a bulk upsert operation object for the data provider. More... | |
| *AbstractDataProvider | getChildProviders () |
| Returns child providers; return NOTHING if there are no child providers. | |
| *hash< string, hash< MapperRuntimeKeyInfo > > | getMapperRuntimeKeys () |
| Returns custom data mapper runtime keys. More... | |
| string | getName () |
| Returns the data provider name. | |
| bool | requiresTransactionManagement () |
| Returns True if the data provider supports transaction management. More... | |
| rollback () | |
| Rolls back data written to the data provider. More... | |
| string | upsertRecordImpl (hash< auto > rec, *hash< auto > upsert_options) |
| Upserts the given record to the data provider. More... | |
Public Attributes | |
| const | ConstructorOptions |
| Constructor options. | |
| const | CreateOptions |
| Create options. | |
| const | DbUpsertMap |
| Maps SqlUtil Upsert Result Codes to DB Provider Upsert Result Codes. | |
| const | MapperKeyInfo |
| Mapper runtime key info. | |
| const | ProviderInfo |
| Provider info. | |
| const | SearchOptions |
| Search options. | |
| const | UpsertOptions |
| Upsert options. | |
Protected Member Functions | |
| *hash< auto > | createRecordImpl (hash< auto > rec, *hash< auto > create_options) |
| Writes the given record to the data provider. More... | |
| Mutex | db_lock () |
| lock for "db" | |
| int | deleteRecordsImpl (*hash< auto > where_cond, *hash< auto > search_options) |
| Deletes zero or more records. More... | |
| *hash< string, AbstractDataField > | getRecordTypeImpl (*hash< auto > search_options) |
| Returns the description of the record type, if any. | |
| hash< DataProviderInfo > | getStaticInfoImpl () |
| Returns data provider static info. | |
| 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. More... | |
| DbTableRecordIterator | searchRecordsImpl (*hash< auto > where_cond, *hash< auto > search_options) |
| Returns an iterator for zero or more records matching the search options. More... | |
| *hash< auto > | searchSingleRecordImpl (hash< auto > where_cond, *hash< auto > search_options) |
| Returns a single record matching the search options. More... | |
| int | updateRecordsImpl (hash< auto > set, *hash< auto > where_cond, *hash< auto > search_options) |
| Updates zero or more records matching the search options. More... | |
| bool | updateSingleRecordImpl (hash< auto > set, hash< auto > where_cond, *hash< auto > search_options) |
| Updates a single record matching the search options. More... | |
Protected Attributes | |
| AbstractDatabase | db |
| the database object, if required | |
| AbstractTable | table |
| the table | |
Defines a data provider based on a single SQL table.
| DbDataProvider::DbTableDataProvider::commit | ( | ) |
Commits data written to the data provider.
Has no effect if the data provider does not support transaction management
|
protected |
Writes the given record to the data provider.
| rec | a hash representing a single input record |
| create_options | the create options after processing by validateCreateOptions() |
|
protected |
Deletes zero or more records.
| where_cond | a hash for identifying the record(s) to be deleted |
| search_options | the delete options after processing by validateSearchOptions() |
| INVALID-OPERATION | the data provider does not support record updating |
| AbstractDataProviderBulkOperation DbDataProvider::DbTableDataProvider::getBulkInserter | ( | ) |
Returns a bulk insert operation object for the data provider.
| AbstractDataProviderBulkOperation DbDataProvider::DbTableDataProvider::getBulkUpserter | ( | ) |
Returns a bulk upsert operation object for the data provider.
| *hash<string, hash<MapperRuntimeKeyInfo> > DbDataProvider::DbTableDataProvider::getMapperRuntimeKeys | ( | ) |
Returns custom data mapper runtime keys.
| bool DbDataProvider::DbTableDataProvider::requiresTransactionManagement | ( | ) |
Returns True if the data provider supports transaction management.
| DbDataProvider::DbTableDataProvider::rollback | ( | ) |
Rolls back data written to the data provider.
Has no effect if the data provider does not support transaction management
|
protected |
Returns an iterator for zero or more records matching the search options.
| block_size | the number of records in a read block; must be a positive number |
| where_cond | the search criteria; will be processed by processFieldValues() |
| search_options | the search options; will be processed by validateSearchOptions() |
| INVALID-BLOCK-SIZE | the block size must be a positive number |
| INVALID-OPERATION | the data provider does not support reading |
|
protected |
Returns an iterator for zero or more records matching the search options.
| search_options | the search options after processing by validateSearchOptions() |
|
protected |
Returns a single record matching the search options.
| search_options | the search options after processing by validateSearchOptions() |
| MULTIPLE-RECORDS-ERROR | multiple records found |
|
protected |
Updates zero or more records matching the search options.
| set | the hash of field data to set |
| where_cond | a hash for identifying the record(s) to be updated |
| search_options | the update options after processing by validateSearchOptions() |
|
protected |
Updates a single record matching the search options.
| set | the hash of field data to set |
| where_cond | a hash for identifying the record to be update |
| search_options | the update options after processing by validateSearchOptions() |
| UPDATE-SINGLE-RECORD-ERROR | if the update would update more than one record |
| string DbDataProvider::DbTableDataProvider::upsertRecordImpl | ( | hash< auto > | rec, |
| *hash< auto > | upsert_options | ||
| ) |
Upserts the given record to the data provider.
| rec | a hash representing a single input record |
| upsert_options | the create options after processing by validateUpsertOptions() |