Loading...
Searching...
No Matches
CsvReadDataProvider.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
// Qore CsvReadDataProvider class definition
/* CsvReadDataProvider.qc Copyright 2012 - 2024 Qore Technologies, s.r.o.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
namespace CsvUtil {
class CsvReadDataProvider : public DataProvider::AbstractDataProvider {
public:
const ProviderInfo = ...;
const ConstructorOptions = ...;
const CsvIterationOptionList = keys (ConstructorOptions - ("path", "data", "stream"));
protected:
AbstractCsvIterator i;
public:
constructor(string path, *hash<auto> opts);
constructor(InputStream stream, *hash<auto> opts);
constructor(*hash<auto> options);
string getName();
*hash<auto> getAdditionalInfo();
protected:
AbstractDataProviderRecordIterator searchRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
public:
protected:
AbstractDataProviderRecordIterator searchRecordsImpl(*hash<DataProviderExpression> where_cond, *hash<auto> search_options);
public:
protected:
*hash<string, AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
public:
protected:
hash<DataProviderInfo> getStaticInfoImpl();
public:
};
}; // CsvUtil namespace
CsvUtil::AbstractCsvIterator
the AbstractCsvIterator class is an abstract base class that allows abstract CSV data to be iterated
Definition AbstractCsvIterator.qc.dox.h:285
CsvUtil::CsvReadDataProvider
Provides a data provider for reading CSV files.
Definition CsvReadDataProvider.qc.dox.h:30
CsvUtil::CsvReadDataProvider::ProviderInfo
const ProviderInfo
Provider info.
Definition CsvReadDataProvider.qc.dox.h:34
CsvUtil::CsvReadDataProvider::getStaticInfoImpl
hash< DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
CsvUtil::CsvReadDataProvider::constructor
constructor(string path, *hash< auto > opts)
Creates the CsvReadDataProvider with the input data path and optionally an option hash.
CsvUtil::CsvReadDataProvider::searchRecordsImpl
AbstractDataProviderRecordIterator searchRecordsImpl(*hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
CsvUtil::CsvReadDataProvider::getRecordTypeImpl
*hash< string, AbstractDataField > getRecordTypeImpl(*hash< auto > search_options)
Returns the description of the record type, if any.
CsvUtil::CsvReadDataProvider::ConstructorOptions
const ConstructorOptions
Constructor options.
Definition CsvReadDataProvider.qc.dox.h:38
CsvUtil::CsvReadDataProvider::searchRecordsImpl
AbstractDataProviderRecordIterator searchRecordsImpl(*hash< DataProviderExpression > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
CsvUtil::CsvReadDataProvider::getName
string getName()
Returns the object name.
CsvUtil::CsvReadDataProvider::constructor
constructor(InputStream stream, *hash< auto > opts)
Creates the CsvReadDataProvider with the input data stream and optionally an option hash.
CsvUtil::CsvReadDataProvider::constructor
constructor(*hash< auto > options)
Creates the object from constructor options.
CsvUtil::CsvReadDataProvider::getAdditionalInfo
*hash< auto > getAdditionalInfo()
Returns additional data-provider-specific info.
CsvUtil::CsvReadDataProvider::CsvIterationOptionList
const CsvIterationOptionList
CSV iteration option list.
Definition CsvReadDataProvider.qc.dox.h:42
CsvUtil::CsvReadDataProvider::i
AbstractCsvIterator i
the iterator object
Definition CsvReadDataProvider.qc.dox.h:46
CsvUtil
the CsvUtil namespace. All classes used in the CsvUtil module should be inside this namespace
Definition AbstractCsvIterator.qc.dox.h:28