#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;
static RelationalWriter* create(std::ostream &output);
};
}
}