![]() |
Qore DataProvider Module Reference 3.1
|
The AbstractDataProvider class. More...
#include <AbstractDataProvider.qc.dox.h>
Public Member Functions | |
| addField (AbstractDataField field, *hash< auto > field_add_options) | |
| Creates a new field. | |
| beginTransaction () | |
| Begins a transaction with a data provider. | |
| checkAddField () | |
| Ensures that the data provider supports adding fields. | |
| checkCreate () | |
| Ensures that the data provider supports record creation. | |
| checkCreateChild () | |
| Ensures that the data provider supports creating children. | |
| checkDelete () | |
| Ensures that the data provider supports record deletion. | |
| checkDeleteChild () | |
| Ensures that the data provider supports deleting children. | |
| checkDeleteField () | |
| Ensures that the data provider supports deleting fields. | |
| checkMessages () | |
| Ensures that the data provider supports sending messages. | |
| checkObservable () | |
| Ensures that the data provider supports observer pattern / event API. | |
| checkRead () | |
| Ensures that the data provider supports read operations. | |
| checkRequest () | |
| Ensures that the data provider supports the request API. | |
| checkSchema () | |
| Ensures that the data provider supports a schema. | |
| checkSearchExpressions () | |
| Ensures that the data provider supports advanced search expressions. | |
| checkUpdate () | |
| Ensures that the data provider supports record upserts. | |
| checkUpdateField () | |
| Ensures that the data provider supports updating fields. | |
| checkUpsert () | |
| Ensures that the data provider supports record upserts. | |
| commit () | |
| Commits data written to the data provider. | |
| constructor () | |
| Creates the data provider. | |
| constructor (LoggerInterface 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. | |
| *hash< auto > | createRecord (hash< auto > rec, *hash< auto > create_options) |
| Creates the given record in the data provider. | |
| deleteChildProvider (string name, *hash< auto > child_delete_options) | |
| Deletes a child data provider. | |
| deleteField (string name, *hash< auto > field_delete_options) | |
| Deletes an existing field. | |
| int | deleteRecords (*hash< auto > where_cond, *hash< auto > search_options) |
| Deletes zero or more records. | |
| int | deleteRecords (*hash< DataProviderExpression > where_cond, *hash< auto > search_options) |
| Deletes zero or more records. | |
| auto | doRequest (auto req, *hash< auto > request_options) |
| Makes a request and returns the response. | |
| *hash< auto > | getAdditionalInfo () |
| Returns additional provider-specific information. | |
| AbstractDataProviderBulkOperation | getBulkInserter () |
| Returns a bulk insert operation object for the data provider. | |
| AbstractDataProviderBulkRecordInterface | getBulkRecordInterface (int block_size=1000, *hash< auto > search_options) |
| Returns an iterator iterating all records with the bulk read API. | |
| AbstractDataProviderBulkOperation | getBulkUpserter () |
| Returns a bulk upsert operation object for the data provider. | |
| *AbstractDataProvider | getChildProvider (string name) |
| Returns the given child provider or nothing if the given child is unknown. | |
| AbstractDataProvider | getChildProviderEx (string name) |
| Returns the given child provider or throws an exception if the given child is unknown. | |
| *list< string > | getChildProviderNames () |
| Returns a list of child data provider names, if any. | |
| AbstractDataProvider | getChildProviderPath (string path) |
Returns the given child provider from a "/" separated path string. | |
| *list< hash< DataProviderSummaryInfo > > | getChildProviderSummaryInfo () |
| Return data provider summary info. | |
| *hash< DataProviderConnectionInfo > | getConnectionInfo () |
| Returns connection info if the data provider supports connections, otherwise returns NOTHING. | |
| *string | getDesc () |
| Returns the data provider description. | |
| string | getDisplayName () |
| Returns the data provider display name. | |
| *list< hash< AllowedValueInfo > > | getElementReferenceData (string type, *hash< auto > action_opts) |
| Returns element reference data of the given kind if available. | |
| *list< hash< AllowedValueInfo > > | getElementReferenceDataEx (string type, *hash< auto > action_opts) |
| Returns element reference data of the given kind if available. | |
| *list< hash< AllowedValueInfo > > | getElementReferenceDataSafe (string type, *hash< auto > action_opts) |
| Returns element reference data of the given kind if available; logs but ignores exceptions retrieving the data. | |
| *list< hash< AllowedValueInfo > > | getElementReferenceDataSafeEx (string type, *hash< auto > action_opts) |
| Returns element reference data of the given kind if available. | |
| AbstractDataProviderType | getErrorResponseType (string error_code) |
| Returns the type for the given error code. | |
| *hash< string, AbstractDataProviderType > | getErrorResponseTypes () |
| Returns a hash of error responses, if any. | |
| hash< DataProviderMessageInfo > | getEventInfo (string event_id) |
| Returns the description of an observable event, if any. | |
| hash< DataProviderMessageInfo > | getEventInfoWithData (string event_id, auto req) |
| Returns the description of an observable event, if any with option data, if any. | |
| hash< string, hash< DataProviderMessageInfo > > | getEventTypes () |
| Returns a hash of all supported event types. | |
| auto | getExampleErrorResponseData (string error_code) |
| Returns example data for the error message with the given error code. | |
| auto | getExampleEventData (string event_id) |
| Returns example data for the given observable event. | |
| hash< auto > | getExampleRecordData () |
| Returns example data for the record type. | |
| auto | getExampleRequestData () |
| Returns example data for a request message. | |
| auto | getExampleResponseData () |
| Returns example data for a successful request message. | |
| hash< DataProviderInfo > | getInfo () |
| Returns data provider info. | |
| hash< auto > | getInfoAsData (*bool with_type_info) |
| Returns static provider information as data; no objects are returned. | |
| *hash< string, hash< MapperRuntimeKeyInfo > > | getMapperRuntimeKeys () |
| Returns custom data mapper runtime keys. | |
| hash< DataProviderMessageInfo > | getMessageInfo (string message_id) |
| Returns the description of an outbound message, if any. | |
| hash< string, hash< DataProviderMessageInfo > > | getMessageTypes () |
| Returns a hash of all supported outbound messages. | |
| AbstractDataProviderRecordIterator | getRecordIterator (*hash< auto > search_options) |
| Returns an iterator iterating all records. | |
| *list< hash< AllowedValueInfo > > | getReferenceData (string type, *hash< auto > action_opts) |
| Returns reference data of the given kind if available. | |
| *list< hash< AllowedValueInfo > > | getReferenceDataEx (string type, *hash< auto > action_opts) |
| Returns reference data of the given kind if available. | |
| *list< hash< AllowedValueInfo > > | getReferenceDataSafe (string type, *hash< auto > action_opts) |
| Returns reference data of the given kind if available; logs but ignores exceptions retrieving the data. | |
| *list< hash< AllowedValueInfo > > | getReferenceDataSafeEx (string type, *hash< auto > action_opts) |
| Returns reference data of the given kind if available. | |
| auto | getReferenceDataValue (string type, *hash< auto > action_opts) |
| Returns a reference data value of the given kind if available. | |
| auto | getReferenceDataValueEx (string type, *hash< auto > action_opts) |
| Returns a reference data value of the given kind if available. | |
| auto | getReferenceDataValueSafe (string type, *hash< auto > action_opts) |
| Returns a reference data value of the given kind if available; logs but ignores exceptions retrieving the data. | |
| auto | getReferenceDataValueSafeEx (string type, *hash< auto > action_opts) |
| Returns reference data of the given kind if available. | |
| *AbstractDataProviderType | getRequestType () |
| Returns the description of a successful request message, if any. | |
| *AbstractDataProviderType | getRequestTypeWithData (auto req) |
| Returns the description of a successful request message with call data, if any. | |
| *AbstractDataProviderType | getResponseType () |
| Returns the description of a response message, if this object represents a response message. | |
| *AbstractDataProviderType | getResponseTypeWithData (auto req) |
| Returns the description of a successful response message with call data, if any. | |
| object | getSchemaObject () |
| Returns the schema supporting this data provider. | |
| *hash< auto > | getSearchExpression (*hash< auto > where_cond, *hash< auto > search_options) |
| Returns a search expression for a standard search hash. | |
| *string | getShortDesc () |
| Returns the data provider short description. | |
| hash< DataProviderSummaryInfo > | getSummaryInfo () |
| Return data provider summary info. | |
| *hash< string, bool > | getSupportedElementReferenceData () |
| Returns information on supported element reference data. | |
| *hash< string, bool > | getSupportedReferenceData () |
| Returns information on supported reference data. | |
| *hash< string, bool > | getSupportedReferenceDataValues () |
| Returns information on supported reference data values. | |
| 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. | |
| 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. | |
| bool | requiresTransactionManagement () |
| Returns True if the data provider requires transaction management. | |
| rollback () | |
| Rolls back data written to the data provider. | |
| *hash< auto > | searchFirstRecord (hash< auto > where_cond, *hash< auto > search_options) |
| Returns the first record matching the search options. | |
| *hash< auto > | searchFirstRecord (hash< DataProviderExpression > where_cond, *hash< auto > search_options) |
| Returns the first record matching the search options. | |
| AbstractDataProviderRecordIterator | searchRecords (*hash< auto > where_cond, *hash< auto > search_options) |
| Returns an iterator for zero or more records matching the search options. | |
| AbstractDataProviderRecordIterator | searchRecords (*hash< DataProviderExpression > where_cond, *hash< auto > search_options) |
| Returns an iterator for zero or more records matching the search options. | |
| 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. | |
| 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. | |
| *hash< auto > | searchSingleRecord (hash< auto > where_cond, *hash< auto > search_options) |
| Returns a single record matching the search options. | |
| *hash< auto > | searchSingleRecord (hash< DataProviderExpression > where_cond, *hash< auto > search_options) |
| Returns a single record matching the search options. | |
| sendMessage (string message_id, auto msg, *hash< auto > send_message_options) | |
| Sends a message from message-capable data providers. | |
| *hash< string, hash< ActionOptionInfo > > | tryGetActionOptionsFromRequestTypeWithData (auto req) |
| Returns action options corresponding to the request type with the given request data, if possible. | |
| *hash< string, hash< ActionOptionInfo > > | tryGetActionOptionsWithData (hash< DataProviderActionInfo > action, auto req) |
| Returns action options corresponding to the given option data. | |
| updateConnectionObjects (object conn, object connobj) | |
| Update any connection used by the data provider. | |
| updateField (string name, AbstractDataField field, *hash< auto > field_update_options) | |
| Updates an existing field. | |
| int | updateRecords (hash< auto > set, *hash< auto > where_cond, *hash< auto > search_options) |
| Updates zero or more records matching the search options. | |
| int | updateRecords (hash< auto > set, *hash< DataProviderExpression > where_cond, *hash< auto > search_options) |
| Updates zero or more records matching the search options. | |
| bool | updateSingleRecord (hash< auto > set, hash< auto > where_cond, *hash< auto > search_options) |
| Updates a single record matching the search options. | |
| bool | updateSingleRecord (hash< auto > set, hash< DataProviderExpression > where_cond, *hash< auto > search_options) |
| Updates a single record matching the search options. | |
| string | upsertRecord (hash< auto > rec, *hash< auto > upsert_options) |
| Upserts the given record in the data provider. | |
Static Public Member Functions | |
| static auto | evalGenericExpressionValue (hash< auto > rec, auto val) |
| Evaluates the given expression with the generic internal implementation and returns the result. | |
| static bool | setDynamicValueCallbacks () |
| Ensures that no callbacks can be set for dynamic URI resolution. | |
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. | |
| const | GenericRecordSearchOptions = ... |
| Generic record search options; see details below. | |
Protected Member Functions | |
| hash< DataProviderExpression > | getEqualityComparisonExpression (int role, hash< DataProviderInfo > info, string key, auto value) |
| Returns an equality comparison expression. | |
| hash< DataProviderExpression > | getSimpleArgumentIntern (int role, hash< DataProviderInfo > info, hash< DataProviderExpressionInfo > expinfo, string key, auto value) |
| Returns an argument for an expression. | |
| *hash< string, hash< ActionOptionInfo > > | tryGetActionOptionsWithDataImpl (hash< DataProviderActionInfo > action, auto req) |
| Returns action options corresponding to the given option data. | |
Static Protected Member Functions | |
| static hash< DataProviderExpressionInfo > | getExpression (int role, string exp, *hash< string, hash< DataProviderExpressionInfo > > expmap) |
| Returns an expression definition for an expression code or throws an exception. | |
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 require 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::checkMessages | ( | ) |
Ensures that the data provider supports sending messages.
| INVALID-OPERATION | the data provider does not support sending messages |
| DataProvider::AbstractDataProvider::checkObservable | ( | ) |
Ensures that the data provider supports observer pattern / event API.
| INVALID-OPERATION | the data provider does not support the observer pattern / event 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
| AbstractDataProvider DataProvider::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.
| 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 |
| DataProvider::AbstractDataProvider::deleteField | ( | string | name, |
| *hash< auto > | field_delete_options ) |
Deletes an existing field.
| name | the name of the field to delete |
| field_delete_options | the options for deleting the new field; processed by validateFieldDeleteOptions() |
| 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.
| *hash< auto > DataProvider::AbstractDataProvider::getAdditionalInfo | ( | ) |
Returns additional provider-specific information.
| AbstractDataProviderBulkOperation DataProvider::AbstractDataProvider::getBulkInserter | ( | ) |
Returns a bulk insert operation object for the data provider.
| INVALID-OPERATION | the data provider does not support create operations |
| AbstractDataProviderBulkRecordInterface DataProvider::AbstractDataProvider::getBulkRecordInterface | ( | int | block_size = 1000, |
| *hash< auto > | search_options ) |
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.
| name | the name of the child |
| 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.
| name | the name of the child |
| INVALID-CHILD-PROVIDER | unknown child provider |
| *list< string > DataProvider::AbstractDataProvider::getChildProviderNames | ( | ) |
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.
| *hash< DataProviderConnectionInfo > DataProvider::AbstractDataProvider::getConnectionInfo | ( | ) |
Returns connection info if the data provider supports connections, otherwise returns NOTHING.
| string DataProvider::AbstractDataProvider::getDisplayName | ( | ) |
Returns the data provider display name.
| *list< hash< AllowedValueInfo > > DataProvider::AbstractDataProvider::getElementReferenceData | ( | string | type, |
| *hash< auto > | action_opts ) |
Returns element reference data of the given kind if available.
| type | the unique type name of the element reference data |
| action_opts | an optional hash of action options when called when working with an app action |
| ELEMENT-REFERENCE-DATA-ERROR | thrown if there is an error retrieving the element reference data |
| *list< hash< AllowedValueInfo > > DataProvider::AbstractDataProvider::getElementReferenceDataEx | ( | string | type, |
| *hash< auto > | action_opts ) |
Returns element reference data of the given kind if available.
| type | the unique type name of the element reference data |
| action_opts | an optional hash of action options when called when working with an app action |
| ELEMENT-REFERENCE-DATA-ERROR | thrown if there is an error retrieving the element reference data |
| UNSUPPORTED-ELEMENT-REFERENCE-DATA | thrown if type is not supported as element reference data |
| *list< hash< AllowedValueInfo > > DataProvider::AbstractDataProvider::getElementReferenceDataSafe | ( | string | type, |
| *hash< auto > | action_opts ) |
Returns element reference data of the given kind if available; logs but ignores exceptions retrieving the data.
| type | the unique type name of the element reference data |
| action_opts | an optional hash of action options when called when working with an app action |
| *list< hash< AllowedValueInfo > > DataProvider::AbstractDataProvider::getElementReferenceDataSafeEx | ( | string | type, |
| *hash< auto > | action_opts ) |
Returns element reference data of the given kind if available.
| type | the unique type name of the element reference data |
| action_opts | an optional hash of action options when called when working with an app action |
Logs but ignores exceptions retrieving the data; throws an exception if the data type is unsupported
| UNSUPPORTED-ELEMENT-REFERENCE-DATA | thrown if type is not supported as element reference data |
|
protected |
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 |
| hash< DataProviderMessageInfo > DataProvider::AbstractDataProvider::getEventInfo | ( | string | event_id | ) |
Returns the description of an observable event, if any.
| event_id | the event ID of the event |
| INVALID-OPERATION | the data provider does not support the observer pattern / event API |
| INVALID-EVENT | the event_id is not valid |
| hash< DataProviderMessageInfo > DataProvider::AbstractDataProvider::getEventInfoWithData | ( | string | event_id, |
| auto | req ) |
Returns the description of an observable event, if any with option data, if any.
| event_id | the event ID of the event |
| req | example option data that can be used to determine the final type |
| INVALID-OPERATION | the data provider does not support the observer pattern / event API |
| INVALID-EVENT | the event_id is not valid |
| hash< string, hash< DataProviderMessageInfo > > DataProvider::AbstractDataProvider::getEventTypes | ( | ) |
Returns a hash of all supported event types.
| INVALID-OPERATION | the data provider does not support the observer pattern / event API |
| auto DataProvider::AbstractDataProvider::getExampleErrorResponseData | ( | string | error_code | ) |
Returns example data for the error message with 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 |
| auto DataProvider::AbstractDataProvider::getExampleEventData | ( | string | event_id | ) |
Returns example data for the given observable event.
| event_id | the event ID of the event |
| INVALID-OPERATION | the data provider does not support the observer pattern / event API |
| INVALID-EVENT | the event_id is not valid |
| hash< auto > DataProvider::AbstractDataProvider::getExampleRecordData | ( | ) |
Returns example data for the record type.
| auto DataProvider::AbstractDataProvider::getExampleRequestData | ( | ) |
Returns example data for a request message.
| INVALID-OPERATION | the data provider does not support the request API |
| auto DataProvider::AbstractDataProvider::getExampleResponseData | ( | ) |
Returns example data for a successful request message.
| INVALID-OPERATION | the data provider does not support the request API |
|
staticprotected |
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
| hash< DataProviderMessageInfo > DataProvider::AbstractDataProvider::getMessageInfo | ( | string | message_id | ) |
Returns the description of an outbound message, if any.
| message_id | the ID of the message |
| INVALID-OPERATION | the data provider does not support sending messages |
| INVALID-MESSAGE | the message_id is not valid |
| hash< string, hash< DataProviderMessageInfo > > DataProvider::AbstractDataProvider::getMessageTypes | ( | ) |
Returns a hash of all supported outbound messages.
| INVALID-OPERATION | the data provider does not support sending messages |
| 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 |
| *list< hash< AllowedValueInfo > > DataProvider::AbstractDataProvider::getReferenceData | ( | string | type, |
| *hash< auto > | action_opts ) |
Returns reference data of the given kind if available.
| type | the unique type name of the reference data |
| action_opts | an optional hash of action options when called when working with an app action |
| REFERENCE-DATA-ERROR | thrown if there is an error retrieving the reference data |
| *list< hash< AllowedValueInfo > > DataProvider::AbstractDataProvider::getReferenceDataEx | ( | string | type, |
| *hash< auto > | action_opts ) |
Returns reference data of the given kind if available.
| type | the unique type name of the reference data |
| action_opts | an optional hash of action options when called when working with an app action |
| REFERENCE-DATA-ERROR | thrown if there is an error retrieving the reference data |
| UNSUPPORTED-REFERENCE-DATA | thrown if type is not supported as reference data |
| *list< hash< AllowedValueInfo > > DataProvider::AbstractDataProvider::getReferenceDataSafe | ( | string | type, |
| *hash< auto > | action_opts ) |
Returns reference data of the given kind if available; logs but ignores exceptions retrieving the data.
| type | the unique type name of the reference data |
| action_opts | an optional hash of action options when called when working with an app action |
| *list< hash< AllowedValueInfo > > DataProvider::AbstractDataProvider::getReferenceDataSafeEx | ( | string | type, |
| *hash< auto > | action_opts ) |
Returns reference data of the given kind if available.
| type | the unique type name of the reference data |
| action_opts | an optional hash of action options when called when working with an app action |
Logs but ignores exceptions retrieving the data; throws an exception if the data type is unsupported
| UNSUPPORTED-REFERENCE-DATA | thrown if type is not supported as reference data |
| auto DataProvider::AbstractDataProvider::getReferenceDataValue | ( | string | type, |
| *hash< auto > | action_opts ) |
Returns a reference data value of the given kind if available.
| type | the unique type name of the reference data |
| action_opts | an optional hash of action options when called when working with an app action |
| REFERENCE-DATA-ERROR | thrown if there is an error retrieving the reference data |
| auto DataProvider::AbstractDataProvider::getReferenceDataValueEx | ( | string | type, |
| *hash< auto > | action_opts ) |
Returns a reference data value of the given kind if available.
| type | the unique type name of the reference data |
| action_opts | an optional hash of action options when called when working with an app action |
| REFERENCE-DATA-ERROR | thrown if there is an error retrieving the reference data |
| UNSUPPORTED-REFERENCE-DATA | thrown if type is not supported as reference data |
| auto DataProvider::AbstractDataProvider::getReferenceDataValueSafe | ( | string | type, |
| *hash< auto > | action_opts ) |
Returns a reference data value of the given kind if available; logs but ignores exceptions retrieving the data.
| type | the unique type name of the reference data value |
| action_opts | an optional hash of action options when called when working with an app action |
| auto DataProvider::AbstractDataProvider::getReferenceDataValueSafeEx | ( | string | type, |
| *hash< auto > | action_opts ) |
Returns reference data of the given kind if available.
| type | the unique type name of the reference data |
| action_opts | an optional hash of action options when called when working with an app action |
Logs but ignores exceptions retrieving the data; throws an exception if the data type is unsupported
| UNSUPPORTED-REFERENCE-DATA | thrown if type is not supported as reference data |
| *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::getRequestTypeWithData | ( | auto | req | ) |
Returns the description of a successful request message with call data, if any.
| req | sample request data that can be used to determine the final type |
| 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 |
| *AbstractDataProviderType DataProvider::AbstractDataProvider::getResponseTypeWithData | ( | auto | req | ) |
Returns the description of a successful response message with call data, if any.
| req | sample request data that can be used to determine the final type |
| INVALID-OPERATION | the data provider does not support the request / response 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() |
| *string DataProvider::AbstractDataProvider::getShortDesc | ( | ) |
Returns the data provider short description.
|
protected |
Returns an argument for an expression.
| *hash< string, bool > DataProvider::AbstractDataProvider::getSupportedElementReferenceData | ( | ) |
Returns information on supported element reference data.
| *hash< string, bool > DataProvider::AbstractDataProvider::getSupportedReferenceData | ( | ) |
Returns information on supported reference data.
| *hash< string, bool > DataProvider::AbstractDataProvider::getSupportedReferenceDataValues | ( | ) |
Returns information on supported reference data values.
| AbstractDataProviderRecordIterator DataProvider::AbstractDataProvider::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.
| 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 |
| AbstractDataProviderRecordIterator DataProvider::AbstractDataProvider::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.
| 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 requires 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 |
| AbstractDataProviderRecordIterator DataProvider::AbstractDataProvider::searchRecords | ( | *hash< DataProviderExpression > | 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 processSearchParameters() |
| search_options | the search options; will be processed by validateSearchOptions() |
| INVALID-OPERATION | the data provider does not support reading |
| AbstractDataProviderBulkRecordInterface DataProvider::AbstractDataProvider::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.
| 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 |
| AbstractDataProviderBulkRecordInterface DataProvider::AbstractDataProvider::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.
| 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 |
| DataProvider::AbstractDataProvider::sendMessage | ( | string | message_id, |
| auto | msg, | ||
| *hash< auto > | send_message_options ) |
Sends a message from message-capable data providers.
| message_id | the message ID to send; must correspond to a valid message ID |
| msg | the message to send |
| send_message_options | the options for sending the message; processed by validateSendMessageOptions() |
| INVALID-OPERATION | thrown if the data provider does not support this API |
| INVALID-MESSAGE | the message_id is not valid |
| SEND-MESSAGE-ERROR | error sending the message |
|
static |
Ensures that no callbacks can be set for dynamic URI resolution.
| *hash< string, hash< ActionOptionInfo > > DataProvider::AbstractDataProvider::tryGetActionOptionsFromRequestTypeWithData | ( | auto | req | ) |
Returns action options corresponding to the request type with the given request data, if possible.
| req | sample request data that can be used to determine the final type |
| INVALID-OPERATION | the data provider does not support the request API |
| *hash< string, hash< ActionOptionInfo > > DataProvider::AbstractDataProvider::tryGetActionOptionsWithData | ( | hash< DataProviderActionInfo > | action, |
| auto | req ) |
Returns action options corresponding to the given option data.
| req | sample option data that can be used to determine the final type |
|
protected |
Returns action options corresponding to the given option data.
| req | sample option data that can be used to determine the final type |
| DataProvider::AbstractDataProvider::updateConnectionObjects | ( | object | conn, |
| object | connobj ) |
Update any connection used by the data provider.
| conn | the new AbstractConnection object |
| connobj | the new connection object itself (ex: RestClient for a "rest" connection) |
This is useful for event-driven providers that require a connection object to generate events.
Subclasses should implement appropriate logic
| 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
| const DataProvider::AbstractDataProvider::GenericRecordSearchOptions = ... |
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