Provides a data provider for reading fixed-length files.
More...
#include <FixedLengthReadDataProvider.qc.dox.h>
Inherits DataProvider::AbstractDataProvider.
|
| constructor (*hash< auto > options) |
| Creates the object from constructor options.
|
|
| constructor (InputStream stream, *string encoding, hash< auto > spec, *hash< auto > opts) |
| Creates the FixedLengthReadDataProvider from a binary input data stream, the record specifications, and optionally an option hash.
|
|
| constructor (string path, hash< auto > spec, *hash< auto > opts) |
| Creates the FixedLengthReadDataProvider with the input data path, the record specifications, and optionally an option hash.
|
|
| constructor (StringInputStream stream, hash< auto > spec, *hash< auto > opts) |
| Creates the FixedLengthReadDataProvider with the string input data stream, the record specifications, and optionally an option hash.
|
|
string | getName () |
| Returns the object name.
|
|
private AbstractDataProviderRecordIterator | searchRecordsImpl (*hash< DataProviderExpression > where_cond, *hash< auto > search_options) |
| Returns an iterator for zero or more records matching the search options.
|
|
|
const | ConstructorOptions |
| Constructor options.
|
|
const | FixedLengthReadOptionList = keys (ConstructorOptions - ("path", "stream", "spec")) |
| iteration option list
|
|
const | ProviderInfo |
| Provider info.
|
|
|
*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.
|
|
AbstractDataProviderRecordIterator | searchRecordsImpl (*hash< auto > where_cond, *hash< auto > search_options) |
| Returns an iterator for zero or more records matching the search options.
|
|
Provides a data provider for reading fixed-length files.
Supports generic record search operators and options
◆ constructor() [1/3]
FixedLengthUtil::FixedLengthReadDataProvider::constructor |
( |
InputStream |
stream, |
|
|
*string |
encoding, |
|
|
hash< auto > |
spec, |
|
|
*hash< auto > |
opts |
|
) |
| |
Creates the FixedLengthReadDataProvider from a binary input data stream, the record specifications, and optionally an option hash.
- Parameters
-
stream | the input stream to iterate |
encoding | the encoding of the string data in the binary input stream |
spec | Fixed-length line specification; see Specification Hash for more information |
opts | a hash of options; see Global Options for more information |
- Exceptions
-
FIXED-LENGTH-UTIL-INVALID-SPEC | invalid record specification; invalid type or missing field length |
◆ constructor() [2/3]
FixedLengthUtil::FixedLengthReadDataProvider::constructor |
( |
string |
path, |
|
|
hash< auto > |
spec, |
|
|
*hash< auto > |
opts |
|
) |
| |
Creates the FixedLengthReadDataProvider with the input data path, the record specifications, and optionally an option hash.
- Parameters
-
path | the input file to iterate |
spec | Fixed-length line specification; see Specification Hash for more information |
opts | a hash of options; see Global Options for more information |
- Exceptions
-
FIXED-LENGTH-UTIL-INVALID-SPEC | invalid record specification; invalid type or missing field length |
◆ constructor() [3/3]
FixedLengthUtil::FixedLengthReadDataProvider::constructor |
( |
StringInputStream |
stream, |
|
|
hash< auto > |
spec, |
|
|
*hash< auto > |
opts |
|
) |
| |
Creates the FixedLengthReadDataProvider with the string input data stream, the record specifications, and optionally an option hash.
- Parameters
-
stream | the string input stream to iterate |
spec | Fixed-length line specification; see Specification Hash for more information |
opts | a hash of options; see Global Options for more information |
- Exceptions
-
FIXED-LENGTH-UTIL-INVALID-SPEC | invalid record specification; invalid type or missing field length |
◆ searchRecordsImpl() [1/2]
AbstractDataProviderRecordIterator FixedLengthUtil::FixedLengthReadDataProvider::searchRecordsImpl |
( |
*hash< auto > |
where_cond, |
|
|
*hash< auto > |
search_options |
|
) |
| |
|
protected |
Returns an iterator for zero or more records matching the search options.
- Parameters
-
where_cond | the search criteria |
search_options | the search options after processing by validateSearchOptions() |
◆ searchRecordsImpl() [2/2]
private AbstractDataProviderRecordIterator FixedLengthUtil::FixedLengthReadDataProvider::searchRecordsImpl |
( |
*hash< DataProviderExpression > |
where_cond, |
|
|
*hash< auto > |
search_options |
|
) |
| |
|
inline |
Returns an iterator for zero or more records matching the search options.
- Parameters
-
where_cond | the search criteria |
search_options | the search options after processing by validateSearchOptions() |