# HG changeset patch # User František Kučera # Date 1532205501 -7200 # Node ID 2ee70261bd9b974b97927903d0c4b71f76e39317 # Parent 7e43750deca83f63a4df295ae15afa362a86f1f8 add table name to startRelation() diff -r 7e43750deca8 -r 2ee70261bd9b relpipe-in-cli.cpp --- a/relpipe-in-cli.cpp Sat Jul 21 17:30:46 2018 +0200 +++ b/relpipe-in-cli.cpp Sat Jul 21 22:38:21 2018 +0200 @@ -4,13 +4,22 @@ #include int main(int argc, char** argv) { - std::unique_ptr writer(relpipe::writer::RelationalWriter::create(std::cout)); + std::shared_ptr writer(relpipe::writer::RelationalWriter::create(std::cout)); if (writer.get() == nullptr) { std::cout << "writer.get() == nullptr" << std::endl; } else { - writer->startRelation({}, true); - writer->writeRecord({}); + writer->startRelation(L"my_first_table", // + { + {L"a1", L"string"}, + {L"a2", L"string"}, + {L"a3", L"string"} + }, true); + writer->writeRecord({ + L"1.1", L"1.2", L"1.3", + L"2.1", L"2.2", L"2.3", + L"3.1", L"3.2", L"3.3", + }); return 0; } }