Qore CsvUtil Module Reference  1.7.2
CsvReadDataProvider.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
2 // Qore CsvReadDataProvider class definition
3 
4 /* CsvReadDataProvider.qc Copyright 2012 - 2021 Qore Technologies, s.r.o.
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23 */
24 
26 namespace CsvUtil {
28 class CsvReadDataProvider : public DataProvider::AbstractDataProvider {
29 
30 public:
32  const ProviderInfo = ...;
33 
34 
36  const ConstructorOptions = ...;
37 
38 
40  const CsvIterationOptionList = keys (ConstructorOptions - ("path", "stream"));
41 
42 protected:
45 
46 public:
47 
49 
55  constructor(string path, *hash<auto> opts);
56 
57 
59 
65  constructor(InputStream stream, *hash<auto> opts);
66 
67 
69  string getName();
70 
71 
73  constructor(*hash<auto> options);
74 
75 
77 
80 protected:
81  AbstractDataProviderRecordIterator searchRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
82 public:
83 
84 
86 protected:
87  *hash<string, AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
88 public:
89 
90 
92 protected:
93  hash<DataProviderInfo> getStaticInfoImpl();
94 public:
95 
96 };
97 }; // CsvUtil namespace
AbstractDataProviderRecordIterator searchRecordsImpl(*hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
const CsvIterationOptionList
CSV iteration option list.
Definition: CsvReadDataProvider.qc.dox.h:40
Provides a data provider for reading CSV files.
Definition: CsvReadDataProvider.qc.dox.h:28
the AbstractCsvIterator class is an abstract base class that allows abstract CSV data to be iterated ...
Definition: AbstractCsvIterator.qc.dox.h:285
AbstractCsvIterator i
the iterator object
Definition: CsvReadDataProvider.qc.dox.h:44
constructor(string path, *hash< auto > opts)
Creates the CsvReadDataProvider with the input data path and optionally an option hash...
string getName()
Returns the object name.
hash< DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
const ProviderInfo
Provider info.
Definition: CsvReadDataProvider.qc.dox.h:32
the CsvUtil namespace. All classes used in the CsvUtil module should be inside this namespace ...
Definition: AbstractCsvIterator.qc.dox.h:28
const ConstructorOptions
Constructor options.
Definition: CsvReadDataProvider.qc.dox.h:36
*hash< string, AbstractDataField > getRecordTypeImpl(*hash< auto > search_options)
Returns the description of the record type, if any.