Qore DataProvider Module Reference
2.4
|
The AbstractDataProvider class. More...
Public Member Methods | |
addField (AbstractDataField field, *hash< auto > field_add_options) | |
Creates a new field. More... | |
beginTransaction () | |
Begins a transaction with a data provider. More... | |
checkAddField () | |
Ensures that the data provider supports adding fields. More... | |
checkCreate () | |
Ensures that the data provider supports record creation. More... | |
checkCreateChild () | |
Ensures that the data provider supports creating children. More... | |
checkDelete () | |
Ensures that the data provider supports record deletion. More... | |
checkDeleteChild () | |
Ensures that the data provider supports deleting children. More... | |
checkDeleteField () | |
Ensures that the data provider supports deleting fields. More... | |
checkRead () | |
Ensures that the data provider supports read operations. More... | |
checkRequest () | |
Ensures that the data provider supports the request API. More... | |
checkSchema () | |
Ensures that the data provider supports a schema. More... | |
checkSearchExpressions () | |
Ensures that the data provider supports advanced search expressions. More... | |
checkUpdate () | |
Ensures that the data provider supports record upserts. More... | |
checkUpdateField () | |
Ensures that the data provider supports updating fields. More... | |
checkUpsert () | |
Ensures that the data provider supports record upserts. More... | |
commit () | |
Commits data written to the data provider. More... | |
constructor () | |
Creates the data provider. | |
constructor (Logger logger) | |
Creates the data provider with the given Logger. | |
AbstractDataProvider | createChildProvider (string name, hash< string, AbstractDataField > fields, *hash< auto > child_create_options) |
Creates a new child data provider and returns it after adding as a child. More... | |
*hash< auto > | createRecord (hash< auto > rec, *hash< auto > create_options) |
Creates the given record in the data provider. More... | |
deleteChildProvider (string name, *hash< auto > child_delete_options) | |
Deletes a child data provider. More... | |
deleteField (string name, *hash< auto > field_delete_options) | |
Deletes an existing field. More... | |
int | deleteRecords (*hash< auto > where_cond, *hash< auto > search_options) |
Deletes zero or more records. More... | |
int | deleteRecords (*hash< DataProviderExpression > where_cond, *hash< auto > search_options) |
Deletes zero or more records. More... | |
auto | doRequest (auto req, *hash< auto > request_options) |
Makes a request and returns the response. More... | |
AbstractDataProviderBulkOperation | getBulkInserter () |
Returns a bulk insert operation object for the data provider. More... | |
AbstractDataProviderBulkRecordInterface | getBulkRecordInterface (int block_size=1000, *hash< auto > search_options) |
Returns an iterator iterating all records with the bulk read API. More... | |
AbstractDataProviderBulkOperation | getBulkUpserter () |
Returns a bulk upsert operation object for the data provider. More... | |
*AbstractDataProvider | getChildProvider (string name) |
Returns the given child provider or NOTHING if the given child is unknown. More... | |
AbstractDataProvider | getChildProviderEx (string name) |
Returns the given child provider or throws an exception if the given child is unknown. More... | |
*list< string > | getChildProviderNames () |
Returns a list of child data provider names, if any. More... | |
AbstractDataProvider | getChildProviderPath (string path) |
Returns the given child provider from a "/" separated path string. More... | |
*list< hash< DataProviderSummaryInfo > > | getChildProviderSummaryInfo () |
Return data provider summary info. More... | |
*string | getDesc () |
Returns the data provider description. | |
private hash< DataProviderExpression > | getEqualityComparisonExpression (int role, hash< DataProviderInfo > info, string key, auto value) |
Returns an equality comparison expression. More... | |
AbstractDataProviderType | getErrorResponseType (string error_code) |
Returns the type for the given error code. More... | |
*hash< string, AbstractDataProviderType > | getErrorResponseTypes () |
Returns a hash of error responses, if any. More... | |
hash< DataProviderInfo > | getInfo () |
Returns data provider info. | |
hash< auto > | getInfoAsData (*bool with_type_info) |
Returns static provider information as data; no objects are returned. More... | |
*hash< string, hash< MapperRuntimeKeyInfo > > | getMapperRuntimeKeys () |
Returns custom data mapper runtime keys. More... | |
AbstractDataProviderRecordIterator | getRecordIterator (*hash< auto > search_options) |
Returns an iterator iterating all records. More... | |
*AbstractDataProviderType | getRequestType () |
Returns the description of a successful request message, if any. More... | |
*AbstractDataProviderType | getResponseType () |
Returns the description of a response message, if this object represents a response message. More... | |
object | getSchemaObject () |
Returns the schema supporting this data provider. More... | |
*hash< auto > | getSearchExpression (*hash< auto > where_cond, *hash< auto > search_options) |
Returns a search expression for a standard search hash. More... | |
private hash< DataProviderExpression > | getSimpleArgumentIntern (int role, hash< DataProviderInfo > info, hash< DataProviderExpressionInfo > expinfo, string key, auto value) |
Returns an argument for an expression. More... | |
hash< DataProviderSummaryInfo > | getSummaryInfo () |
Return data provider summary info. | |
AbstractDataProviderRecordIterator | requestSearchRecords (auto req, *hash< auto > where_cond, *hash< auto > search_options) |
Returns an iterator for zero or more records matching the search options according to an API request. More... | |
AbstractDataProviderRecordIterator | requestSearchRecords (auto req, *hash< DataProviderExpression > where_cond, *hash< auto > search_options) |
Returns an iterator for zero or more records matching the search options according to an API request. More... | |
bool | requiresTransactionManagement () |
Returns True if the data provider supports transaction management. More... | |
rollback () | |
Rolls back data written to the data provider. More... | |
*hash< auto > | searchFirstRecord (hash< auto > where_cond, *hash< auto > search_options) |
Returns the first record matching the search options. More... | |
*hash< auto > | searchFirstRecord (hash< DataProviderExpression > where_cond, *hash< auto > search_options) |
Returns the first record matching the search options. More... | |
AbstractDataProviderRecordIterator | searchRecords (*hash< auto > where_cond, *hash< auto > search_options) |
Returns an iterator for zero or more records matching the search options. More... | |
AbstractDataProviderRecordIterator | searchRecords (*hash< DataProviderExpression > where_cond, *hash< auto > search_options) |
Returns an iterator for zero or more records matching the search options. More... | |
AbstractDataProviderBulkRecordInterface | searchRecordsBulk (int block_size=1000, *hash< DataProviderExpression > where_cond, *hash< auto > search_options) |
Returns an iterator for zero or more records matching the search options. More... | |
AbstractDataProviderBulkRecordInterface | searchRecordsBulk (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... | |
*hash< auto > | searchSingleRecord (hash< auto > where_cond, *hash< auto > search_options) |
Returns a single record matching the search options. More... | |
*hash< auto > | searchSingleRecord (hash< DataProviderExpression > where_cond, *hash< auto > search_options) |
Returns a single record matching the search options. More... | |
setLogger (Logger logger) | |
Sets or replaces the logger. | |
updateField (string name, AbstractDataField field, *hash< auto > field_update_options) | |
Updates an existing field. More... | |
int | updateRecords (hash< auto > set, *hash< auto > where_cond, *hash< auto > search_options) |
Updates zero or more records matching the search options. More... | |
int | updateRecords (hash< auto > set, *hash< DataProviderExpression > where_cond, *hash< auto > search_options) |
Updates zero or more records matching the search options. More... | |
bool | updateSingleRecord (hash< auto > set, hash< auto > where_cond, *hash< auto > search_options) |
Updates a single record matching the search options. More... | |
bool | updateSingleRecord (hash< auto > set, hash< DataProviderExpression > where_cond, *hash< auto > search_options) |
Updates a single record matching the search options. More... | |
string | upsertRecord (hash< auto > rec, *hash< auto > upsert_options) |
Upserts the given record in the data provider. More... | |
Static Public Member Methods | |
static auto | evalGenericExpressionValue (hash< auto > rec, auto val) |
Evaluates the given expression with the generic internal implementation and returns the result. More... | |
static private hash< DataProviderExpressionInfo > | getExpression (int role, string exp, *hash< string, hash< DataProviderExpressionInfo >> expmap) |
Returns an expression definition for an expression code or throws an exception. More... | |
static bool | setDynamicValueCallbacks () |
Ensures that no callbacks can be set for dynamic URI resolution. More... | |
Public Attributes | |
const | DataProviderSummaryInfoKeys = map $1.getName() |
A list of members names of the DataProviderSummaryInfoKeys hashdecl. | |
const | GenericExpressionImplementations |
Generic expression implementations for data providers without native search functionality. | |
const | GenericExpressions = map {$1.key: $1.value.exp} |
Generic search operator expressions. More... | |
Private Attributes | |
const | GenericRecordSearchOptions |
Generic record search options; see details below. More... | |
Logger | logger |
Logger for logging. | |
Static Private Attributes | |
static bool | callbacks_locked = False |
flag if callbacks are locked | |
static code | cb_resolve_value |
static callback for dynamic value resolution | |
static code | cb_value_needs_resolution |
static callback the returns a bool if the value needs dynamic resolution | |
The AbstractDataProvider class.
DataProvider::AbstractDataProvider::addField | ( | AbstractDataField | field, |
*hash< auto > | field_add_options | ||
) |
Creates a new field.
field | the field to add |
field_add_options | the options for adding the new field |
INVALID-OPERATION | thrown if the data provider does not support this API |
ADD-FIELD-ERROR | error adding the field |
DataProvider::AbstractDataProvider::beginTransaction | ( | ) |
Begins a transaction with a data provider.
Has no effect if the data provider does not support transaction management
DataProvider::AbstractDataProvider::checkAddField | ( | ) |
Ensures that the data provider supports adding fields.
INVALID-OPERATION | the data provider does not support the add field API |
DataProvider::AbstractDataProvider::checkCreate | ( | ) |
Ensures that the data provider supports record creation.
INVALID-OPERATION | the data provider does not support record creation |
DataProvider::AbstractDataProvider::checkCreateChild | ( | ) |
Ensures that the data provider supports creating children.
INVALID-OPERATION | the data provider does not support the child creation API |
DataProvider::AbstractDataProvider::checkDelete | ( | ) |
Ensures that the data provider supports record deletion.
INVALID-OPERATION | the data provider does not support record deletion |
DataProvider::AbstractDataProvider::checkDeleteChild | ( | ) |
Ensures that the data provider supports deleting children.
INVALID-OPERATION | the data provider does not support the child deletion API |
DataProvider::AbstractDataProvider::checkDeleteField | ( | ) |
Ensures that the data provider supports deleting fields.
INVALID-OPERATION | the data provider does not support the delete field API |
DataProvider::AbstractDataProvider::checkRead | ( | ) |
Ensures that the data provider supports read operations.
INVALID-OPERATION | the data provider does not support read operations |
DataProvider::AbstractDataProvider::checkRequest | ( | ) |
Ensures that the data provider supports the request API.
INVALID-OPERATION | the data provider does not support the request API |
DataProvider::AbstractDataProvider::checkSchema | ( | ) |
Ensures that the data provider supports a schema.
INVALID-OPERATION | the data provider does not support a schema |
DataProvider::AbstractDataProvider::checkSearchExpressions | ( | ) |
Ensures that the data provider supports advanced search expressions.
INVALID-OPERATION | the data provider does not support advanced search expressions |
DataProvider::AbstractDataProvider::checkUpdate | ( | ) |
Ensures that the data provider supports record upserts.
INVALID-OPERATION | the data provider does not support record updating |
DataProvider::AbstractDataProvider::checkUpdateField | ( | ) |
Ensures that the data provider supports updating fields.
INVALID-OPERATION | the data provider does not support the update field API |
DataProvider::AbstractDataProvider::checkUpsert | ( | ) |
Ensures that the data provider supports record upserts.
INVALID-OPERATION | the data provider does not support upsert operations |
DataProvider::AbstractDataProvider::commit | ( | ) |
Commits data written to the data provider.
Has no effect if the data provider does not support transaction management
|
inline |
Creates a new child data provider and returns it after adding as a child.
name | the name of the new child data provider |
fields | the fields for the new child data provider; must have at least one field |
child_create_options | the options for creating the new child data provider |
INVALID-OPERATION | thrown if the data provider does not support this API |
CREATE-CHILD-PROVIDER-ERROR | error creating the child provider |
*hash<auto> DataProvider::AbstractDataProvider::createRecord | ( | hash< auto > | rec, |
*hash< auto > | create_options | ||
) |
Creates the given record in the data provider.
rec | a hash representing a single input record |
create_options | the create options; will be processed by validateCreateOptions() |
INVALID-OPERATION | the data provider does not support record creation |
CREATE-RECORD-ERROR | the data provider raised an exception in the record creation operation |
DUPLICATE-RECORD | this exception should be thrown if the provider fails due to an attempt to create a duplicate record |
DataProvider::AbstractDataProvider::deleteChildProvider | ( | string | name, |
*hash< auto > | child_delete_options | ||
) |
Deletes a child data provider.
name | the name of the new child data provider |
child_delete_options | the options for deleting a child data provider |
INVALID-OPERATION | thrown if the data provider does not support this API |
DELETE-CHILD-PROVIDER-ERROR | error creating the child provider |
Deletes an existing field.
name | the name of the field to delete |
field_delete_options | the options for deleting the new field |
INVALID-OPERATION | thrown if the data provider does not support this API |
DELETE-FIELD-ERROR | error adding the field |
int DataProvider::AbstractDataProvider::deleteRecords | ( | *hash< auto > | where_cond, |
*hash< auto > | search_options | ||
) |
Deletes zero or more records.
where_cond | a hash for identifying the record(s) to be deleted; will be processed by processFieldValues() |
search_options | the search options; will be processed by validateSearchOptions() |
INVALID-OPERATION | the data provider does not support record deletion |
DELETE-RECORDS-ERROR | error deleting records |
int DataProvider::AbstractDataProvider::deleteRecords | ( | *hash< DataProviderExpression > | where_cond, |
*hash< auto > | search_options | ||
) |
Deletes zero or more records.
where_cond | a hash for identifying the record(s) to be deleted; will be processed by processSearchParameters() |
search_options | the search options; will be processed by validateSearchOptions() |
INVALID-OPERATION | the data provider does not support record deletion |
DELETE-RECORDS-ERROR | error deleting records |
auto DataProvider::AbstractDataProvider::doRequest | ( | auto | req, |
*hash< auto > | request_options | ||
) |
Makes a request and returns the response.
req | the request to serialize and make according to the request type |
request_options | the request options; will be processed by validateRequestOptions() |
INVALID-OPERATION | the data provider does not support the request API |
INVALID-REQUEST | the request argument provided do not match the expected request type |
|
static |
Evaluates the given expression with the generic internal implementation and returns the result.
AbstractDataProviderBulkOperation DataProvider::AbstractDataProvider::getBulkInserter | ( | ) |
Returns a bulk insert operation object for the data provider.
INVALID-OPERATION | the data provider does not support create operations |
|
inline |
Returns an iterator iterating all records with the bulk read API.
block_size | the number of records in a read block; must be a positive number |
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 |
AbstractDataProviderBulkOperation DataProvider::AbstractDataProvider::getBulkUpserter | ( | ) |
Returns a bulk upsert operation object for the data provider.
INVALID-OPERATION | the data provider does not support upsert operations |
*AbstractDataProvider DataProvider::AbstractDataProvider::getChildProvider | ( | string | name | ) |
Returns the given child provider or NOTHING if the given child is unknown.
INVALID-CHILD-PROVIDER | unknown child provider |
AbstractDataProvider DataProvider::AbstractDataProvider::getChildProviderEx | ( | string | name | ) |
Returns the given child provider or throws an exception if the given child is unknown.
INVALID-CHILD-PROVIDER | unknown child provider |
Returns a list of child data provider names, if any.
AbstractDataProvider DataProvider::AbstractDataProvider::getChildProviderPath | ( | string | path | ) |
Returns the given child provider from a "/"
separated path string.
throws an exception with unknown path elements
path | a string giving a path to the target provider where child elements are separated by "/" characters |
INVALID-CHILD-PROVIDER | unknown child provider |
*list<hash<DataProviderSummaryInfo> > DataProvider::AbstractDataProvider::getChildProviderSummaryInfo | ( | ) |
Return data provider summary info.
|
inline |
Returns an equality comparison expression.
Must be reimplemented by data provider implementations that support expressions and use a symbol different from '=' for the comparison operator
AbstractDataProviderType DataProvider::AbstractDataProvider::getErrorResponseType | ( | string | error_code | ) |
Returns the type for the given error code.
error_code | the error code for the response; must be a known error code, or an UNKNOWN-ERROR-RESPONSE exception is thrown |
INVALID-OPERATION | the data provider does not support the request API |
UNKNOWN-ERROR-RESPONSE | the error response given is not known |
*hash<string, AbstractDataProviderType> DataProvider::AbstractDataProvider::getErrorResponseTypes | ( | ) |
Returns a hash of error responses, if any.
INVALID-OPERATION | the data provider does not support the request API |
|
inlinestatic |
Returns an expression definition for an expression code or throws an exception.
hash<auto> DataProvider::AbstractDataProvider::getInfoAsData | ( | *bool | with_type_info | ) |
Returns static provider information as data; no objects are returned.
with_type_info | if True then more type information will be returned in the response |
name
and children
attributes are not returned as they are dynamic attributes *hash<string, hash<MapperRuntimeKeyInfo> > DataProvider::AbstractDataProvider::getMapperRuntimeKeys | ( | ) |
Returns custom data mapper runtime keys.
This base method returns NOTHING; reimplment in child classes to return a value
AbstractDataProviderRecordIterator DataProvider::AbstractDataProvider::getRecordIterator | ( | *hash< auto > | search_options | ) |
Returns an iterator iterating all records.
search_options | the search options; will be processed by validateSearchOptions() |
INVALID-OPERATION | the data provider does not support reading |
*AbstractDataProviderType DataProvider::AbstractDataProvider::getRequestType | ( | ) |
Returns the description of a successful request message, if any.
INVALID-OPERATION | the data provider does not support the request API |
*AbstractDataProviderType DataProvider::AbstractDataProvider::getResponseType | ( | ) |
Returns the description of a response message, if this object represents a response message.
INVALID-OPERATION | the data provider does not support the request API |
object DataProvider::AbstractDataProvider::getSchemaObject | ( | ) |
Returns the schema supporting this data provider.
INVALID-OPERATION | thrown if the data provider does not support this API |
*hash<auto> DataProvider::AbstractDataProvider::getSearchExpression | ( | *hash< auto > | where_cond, |
*hash< auto > | search_options | ||
) |
Returns a search expression for a standard search hash.
where_cond | the search criteria; if the data provider supports advanced search, and the value is an expression, it will be processed by processSearchParameters(), otherwise by processFieldValues() |
search_options | the search options; will be processed by validateSearchOptions() |
|
inline |
Returns an argument for an expression.
|
inline |
Returns an iterator for zero or more records matching the search options according to an API request.
req | the request to serialize and make according to the request type |
where_cond | the search criteria; will be processed by processFieldValues() |
search_options | the search options after processing by validateSearchOptions() |
This will execute the request and perform a default search on any record(s) returned
INVALID-OPERATION | the data provider does not support reading records or the request / response API |
|
inline |
Returns an iterator for zero or more records matching the search options according to an API request.
req | the request to serialize and make according to the request type |
where_cond | the search criteria; will be processed by processFieldValues() |
search_options | the search options after processing by validateSearchOptions() |
This will execute the request and perform a default search on any record(s) returned
INVALID-OPERATION | the data provider does not support reading records or the request / response API |
bool DataProvider::AbstractDataProvider::requiresTransactionManagement | ( | ) |
Returns True if the data provider supports transaction management.
DataProvider::AbstractDataProvider::rollback | ( | ) |
Rolls back data written to the data provider.
Has no effect if the data provider does not support transaction management
*hash<auto> DataProvider::AbstractDataProvider::searchFirstRecord | ( | hash< auto > | where_cond, |
*hash< auto > | search_options | ||
) |
Returns the first record matching the search options.
where_cond | the search criteria; will be processed by processFieldValues() |
search_options | the search options; will be processed by validateSearchOptions() |
INVALID-OPERATION | the data provider does not support reading |
*hash<auto> DataProvider::AbstractDataProvider::searchFirstRecord | ( | hash< DataProviderExpression > | where_cond, |
*hash< auto > | search_options | ||
) |
Returns the first record matching the search options.
where_cond | the search criteria; will be processed by processSearchParameters() |
search_options | the search options; will be processed by validateSearchOptions() |
INVALID-OPERATION | the data provider does not support reading |
AbstractDataProviderRecordIterator DataProvider::AbstractDataProvider::searchRecords | ( | *hash< auto > | where_cond, |
*hash< auto > | search_options | ||
) |
Returns an iterator for zero or more records matching the search options.
where_cond | the search criteria; will be processed by processFieldValues() |
search_options | the search options; will be processed by validateSearchOptions() |
INVALID-OPERATION | the data provider does not support reading |
|
inline |
Returns an iterator for zero or more records matching the search options.
where_cond | the search criteria; will be processed by processSearchParameters() |
search_options | the search options; will be processed by validateSearchOptions() |
INVALID-OPERATION | the data provider does not support reading |
|
inline |
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 processSearchParameters() |
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 |
|
inline |
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 |
*hash<auto> DataProvider::AbstractDataProvider::searchSingleRecord | ( | hash< auto > | where_cond, |
*hash< auto > | search_options | ||
) |
Returns a single record matching the search options.
where_cond | the search criteria; will be processed by processFieldValues() |
search_options | the search options; will be processed by validateSearchOptions() |
INVALID-OPERATION | the data provider does not support reading |
MULTIPLE-RECORDS-ERROR | multiple records found |
*hash<auto> DataProvider::AbstractDataProvider::searchSingleRecord | ( | hash< DataProviderExpression > | where_cond, |
*hash< auto > | search_options | ||
) |
Returns a single record matching the search options.
where_cond | the search criteria; will be processed by processSearchParameters() |
search_options | the search options; will be processed by validateSearchOptions() |
INVALID-OPERATION | the data provider does not support reading |
MULTIPLE-RECORDS-ERROR | multiple records found |
|
static |
Ensures that no callbacks can be set for dynamic URI resolution.
DataProvider::AbstractDataProvider::updateField | ( | string | name, |
AbstractDataField | field, | ||
*hash< auto > | field_update_options | ||
) |
Updates an existing field.
name | the name of the current field to update |
field | the new definition of the field |
field_update_options | the options for adding the new field |
INVALID-OPERATION | thrown if the data provider does not support this API |
UPDATE-FIELD-ERROR | error adding the field |
int DataProvider::AbstractDataProvider::updateRecords | ( | hash< auto > | set, |
*hash< auto > | where_cond, | ||
*hash< auto > | search_options | ||
) |
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; will be processed by processFieldValues() |
search_options | the search options; will be processed by validateSearchOptions() |
INVALID-OPERATION | the data provider does not support record updating |
UPDATE-RECORDS-ERROR | error updating records |
int DataProvider::AbstractDataProvider::updateRecords | ( | hash< auto > | set, |
*hash< DataProviderExpression > | where_cond, | ||
*hash< auto > | search_options | ||
) |
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; will be processed by processSearchParameters() |
search_options | the search options; will be processed by validateSearchOptions() |
INVALID-OPERATION | the data provider does not support record updating |
UPDATE-RECORDS-ERROR | error updating records |
bool DataProvider::AbstractDataProvider::updateSingleRecord | ( | hash< auto > | set, |
hash< auto > | where_cond, | ||
*hash< auto > | search_options | ||
) |
Updates a single record matching the search options.
set | the hash of field data to set; will be processed by processFieldValues() |
where_cond | the search criteria; will be processed by processFieldValues() |
search_options | the search options; will be processed by validateSearchOptions() |
INVALID-OPERATION | the data provider does not support record updating |
UPDATE-RECORDS-ERROR | error updating records |
bool DataProvider::AbstractDataProvider::updateSingleRecord | ( | hash< auto > | set, |
hash< DataProviderExpression > | where_cond, | ||
*hash< auto > | search_options | ||
) |
Updates a single record matching the search options.
set | the hash of field data to set; will be processed by processFieldValues() |
where_cond | the search criteria; will be processed by processSearchParameters() |
search_options | the search options; will be processed by validateSearchOptions() |
INVALID-OPERATION | the data provider does not support record updating |
UPDATE-RECORDS-ERROR | error updating records |
string DataProvider::AbstractDataProvider::upsertRecord | ( | hash< auto > | rec, |
*hash< auto > | upsert_options | ||
) |
Upserts the given record in the data provider.
rec | a hash representing a single input record |
upsert_options | the upsert options; will be processed by validateUpsertOptions() |
INVALID-OPERATION | the data provider does not support upsert operations |
const DataProvider::AbstractDataProvider::GenericExpressions = map {$1.key: $1.value.exp} |
Generic search operator expressions.
The following are generic search operator expressions implemented for all data providers that do not provide native search functionality
|
private |
Generic record search options; see details below.
Each record-based data provider should support the following search options:
columns:
a list of one or more field names; allows a subset of fields to be output in searcheslimit:
the maximum number of records to returnoffset:
the offset number in records to return