Qore DataProvider Module Reference
2.4
|
Defines an abstract class for accepting data and outputting optionally transformed or filtered data. More...
Public Member Methods | |
flush (code enqueue) | |
This method is called for each pipeline element to permit flushing of any pending data at the end of processing. More... | |
AbstractDataProviderType | getExpectedType () |
Returns the expected type of data to be submitted, if available. More... | |
AbstractDataProviderType | getReturnType () |
Returns the type of data that will be returned, if available. More... | |
setThreadLocalData (*hash< auto > thread_local_data) | |
Sets thread-local data to set before running the processor. | |
submit (code enqueue, auto _data) | |
Submits the data for processing. More... | |
bool | supportsBulkApi () |
Returns True if the data processor supports bulk operation. More... | |
Private Member Methods | |
flushImpl (code enqueue) | |
This method is called for each pipeline element to permit flushing of any pending data at the end of processing. More... | |
*AbstractDataProviderType | getExpectedTypeImpl () |
Returns the expected type of data to be submitted, if available. More... | |
*AbstractDataProviderType | getReturnTypeImpl () |
Returns the type of data that will be returned, if available. More... | |
abstract | submitImpl (code enqueue, auto _data) |
Submits the data for processing. More... | |
abstract bool | supportsBulkApiImpl () |
Returns True if the data processor supports bulk operation. More... | |
Private Attributes | |
*hash< auto > | thread_local_data |
Thread-local data to set before running the processor. | |
*list< string > | thread_local_data_keys |
Thread-local data keys from thread_local_data. | |
Defines an abstract class for accepting data and outputting optionally transformed or filtered data.
DataProvider::AbstractDataProcessor::flush | ( | code | enqueue | ) |
This method is called for each pipeline element to permit flushing of any pending data at the end of processing.
enqueue | a closure taking a single arugment that enqueues the processed data for the next step in the pipeline; if no data should be processed onwards, do not call enqueue; if only one record should be processed onwards, then enqueue should be called only once; if multiple records are generated, then call it once for each generated record; prototype: code enqueue = sub (auto qdata) {}
|
|
private |
This method is called for each pipeline element to permit flushing of any pending data at the end of processing.
enqueue | a closure taking a single arugment that enqueues the processed data for the next step in the pipeline; if no data should be processed onwards, do not call enqueue; if only one record should be processed onwards, then enqueue should be called only once; if multiple records are generated, then call it once for each generated record; prototype: code enqueue = sub (auto qdata) {}
|
AbstractDataProviderType DataProvider::AbstractDataProcessor::getExpectedType | ( | ) |
Returns the expected type of data to be submitted, if available.
|
private |
Returns the expected type of data to be submitted, if available.
This base class method returns NOTHING; reimplement in subclasses to provide a type
AbstractDataProviderType DataProvider::AbstractDataProcessor::getReturnType | ( | ) |
Returns the type of data that will be returned, if available.
|
private |
Returns the type of data that will be returned, if available.
This base class method returns NOTHING; reimplement in subclasses to provide a type
DataProvider::AbstractDataProcessor::submit | ( | code | enqueue, |
auto | _data | ||
) |
Submits the data for processing.
enqueue | a closure taking a single arugment that enqueues the processed data for the next step in the pipeline; if no data should be processed onwards, do not call enqueue; if only one record should be processed onwards, then enqueue should be called only once; if multiple records are generated from the input data, then call it once for each generated record; prototype: code enqueue = sub (auto qdata) {}
|
_data | the data to process |
Sets thread-local data before running and clears on exit if any is set
|
privatepure virtual |
Submits the data for processing.
enqueue | a closure taking a single arugment that enqueues the processed data for the next step in the pipeline; if no data should be processed onwards, do not call enqueue; if only one record should be processed onwards, then enqueue should be called only once; if multiple records are generated from the input data, then call it once for each generated record; prototype: code enqueue = sub (auto qdata) {}
|
_data | the data to process |
bool DataProvider::AbstractDataProcessor::supportsBulkApi | ( | ) |
Returns True if the data processor supports bulk operation.