author | František Kučera <franta-hg@frantovo.cz> |
Thu, 24 Sep 2020 18:57:20 +0200 | |
branch | v_0 |
changeset 30 | 3c6374467a82 |
child 31 | c22577615ce4 |
permissions | -rw-r--r-- |
30
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
1 |
/** |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
2 |
* Relational pipes |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
3 |
* Copyright © 2020 František Kučera (Frantovo.cz, GlobalCode.info) |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
4 |
* |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
5 |
* This program is free software: you can redistribute it and/or modify |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
6 |
* it under the terms of the GNU General Public License as published by |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
7 |
* the Free Software Foundation, version 3 of the License. |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
8 |
* |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
12 |
* GNU General Public License for more details. |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
13 |
* |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
15 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
16 |
*/ |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
17 |
#pragma once |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
18 |
|
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
19 |
#include <vector> |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
20 |
#include <iostream> |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
21 |
|
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
22 |
#include <relpipe/reader/typedefs.h> |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
23 |
|
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
24 |
|
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
25 |
namespace relpipe { |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
26 |
namespace out { |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
27 |
namespace tabular { |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
28 |
|
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
29 |
class RelationConfiguration { |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
30 |
public: |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
31 |
|
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
32 |
virtual ~RelationConfiguration() { |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
33 |
} |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
34 |
|
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
35 |
relpipe::reader::string_t relation; |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
36 |
relpipe::reader::boolean_t printTypes = true; |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
37 |
relpipe::reader::boolean_t printRecordCount = true; |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
38 |
relpipe::reader::boolean_t printRelationName = true; |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
39 |
}; |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
40 |
|
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
41 |
class Configuration { |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
42 |
public: |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
43 |
relpipe::reader::boolean_t printTypes = true; |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
44 |
relpipe::reader::boolean_t printRecordCount = true; |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
45 |
relpipe::reader::boolean_t printRelationName = true; |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
46 |
std::vector<RelationConfiguration> relationConfigurations; |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
47 |
|
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
48 |
virtual ~Configuration() { |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
49 |
} |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
50 |
}; |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
51 |
|
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
52 |
} |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
53 |
} |
3c6374467a82
change CLI interface: options: --relation --print-types --print-relation-name --print-record-count
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
54 |
} |