com.univocity.api.config.builders
Interface QueryResultReader


public interface QueryResultReader

The QueryResultReader configuration is obtained from a QueryResult, and is used to determine functions, if any, to be executed against the results obtained by the execution of a query.

Author:
uniVocity Software Pty Ltd - dev@univocity.com
See Also:
QuerySetup, QueryResult, QueryResultError, EntityMapping, DataIntegrationEngine

Method Summary
 QueryResultError directly()
          Specifies the results of this query should be returned directly and no transform to its the output is required.
 QueryResultError readingWith(String... functionNames)
          Specifies a sequence of functions to transform the output of the query.
 

Method Detail

readingWith

QueryResultError readingWith(String... functionNames)
Specifies a sequence of functions to transform the output of the query.

Parameters:
functionNames - the sequence of function names that will be executed against each value record read from the input. Note first function must accept parameters as configured in the QueryResult
  • single value: parameters must be compatible with Object
  • single row: parameters must be compatible with Object[]
  • multiple rows: parameters must be compatible with Object[][]

Note: this establishes a chaining of functions: If the first function trims strings, then the second function will receive a trimmed String instead of the original value.

Returns:
the last step of the query configuration process: define how to handle an unexpected result from the execution of this query.

directly

QueryResultError directly()
Specifies the results of this query should be returned directly and no transform to its the output is required.

Returns:
the last step of the query configuration process: define how to handle an unexpected result from the execution of this query.


Copyright © 2015 uniVocity Software Pty Ltd. All rights reserved.