include/RelationalWriter.h
author František Kučera <franta-hg@frantovo.cz>
Sun, 22 Jul 2018 00:08:13 +0200
branchv_0
changeset 14 733334eca89b
parent 13 e7234dd45166
child 15 8fd6c4d44071
permissions -rw-r--r--
move create() method to a factory

#pragma once

#include <string>
#include <iostream>
#include <vector>

#include "typedefs.h"
#include "TypeId.h"

namespace relpipe {
namespace writer {

class RelationalWriter {
public:

	virtual ~RelationalWriter() = default;

	virtual integer_t toTypeId(const string_t typeCode) = 0;

	virtual string_t toTypeCode(const integer_t typeId) = 0;

	virtual void startRelation(string_t name, std::vector<std::pair<string_t, TypeId>> attributes, boolean_t writeHeader) = 0;

	virtual void writeRecord(std::vector<string_t> attributes) = 0;

};

}
}