--- a/relpipe-in-cli.cpp Sat Jul 21 23:10:42 2018 +0200
+++ b/relpipe-in-cli.cpp Sat Jul 21 23:47:09 2018 +0200
@@ -2,14 +2,16 @@
#include <memory>
#include <RelationalWriter.h>
+#include <TypeId.h>
int main(int argc, char** argv) {
- std::shared_ptr<relpipe::writer::RelationalWriter> writer(relpipe::writer::RelationalWriter::create(std::cout));
+ using namespace relpipe::writer;
+ std::shared_ptr<RelationalWriter> writer(RelationalWriter::create(std::cout));
writer->startRelation(L"my_first_table",{
- {L"a1", L"string"},
- {L"a2", L"string"},
- {L"a3", L"string"}
+ {L"a1", TypeId::STRING},
+ {L"a2", TypeId::STRING},
+ {L"a3", TypeId::STRING}
}, true);
writer->writeRecord({L"1.1", L"1.2", L"1.3"});
@@ -17,9 +19,9 @@
writer->writeRecord({L"3.1", L"3.2", L"3.3"});
writer->startRelation(L"my_second_table",{
- {L"s", L"string"},
- {L"i", L"integer"},
- {L"b", L"boolean"}
+ {L"s", TypeId::STRING},
+ {L"i", TypeId::INTEGER},
+ {L"b", TypeId::BOOLEAN}
}, true);
writer->writeRecord({L"a", L"1", L"true"});