include/RelationalWriter.h
author František Kučera <franta-hg@frantovo.cz>
Sun, 22 Jul 2018 10:26:22 +0200
branchv_0
changeset 15 8fd6c4d44071
parent 14 733334eca89b
child 16 3613617d3076
permissions -rw-r--r--
use more TypeId enum
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7
01dd90eeedbb add data type and catalog classes from the prototype
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
#pragma once
01dd90eeedbb add data type and catalog classes from the prototype
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
01dd90eeedbb add data type and catalog classes from the prototype
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     3
#include <string>
01dd90eeedbb add data type and catalog classes from the prototype
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     4
#include <iostream>
01dd90eeedbb add data type and catalog classes from the prototype
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     5
#include <vector>
01dd90eeedbb add data type and catalog classes from the prototype
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     6
13
e7234dd45166 use TypeId enum instead of numeric constants
František Kučera <franta-hg@frantovo.cz>
parents: 11
diff changeset
     7
#include "typedefs.h"
e7234dd45166 use TypeId enum instead of numeric constants
František Kučera <franta-hg@frantovo.cz>
parents: 11
diff changeset
     8
#include "TypeId.h"
7
01dd90eeedbb add data type and catalog classes from the prototype
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
8
03750aff8619 writer only writes + refactoring
František Kučera <franta-hg@frantovo.cz>
parents: 7
diff changeset
    10
namespace relpipe {
03750aff8619 writer only writes + refactoring
František Kučera <franta-hg@frantovo.cz>
parents: 7
diff changeset
    11
namespace writer {
7
01dd90eeedbb add data type and catalog classes from the prototype
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
9
0a40752e401d shared library with pure abstract class (interface)
František Kučera <franta-hg@frantovo.cz>
parents: 8
diff changeset
    13
class RelationalWriter {
7
01dd90eeedbb add data type and catalog classes from the prototype
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    14
public:
01dd90eeedbb add data type and catalog classes from the prototype
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
9
0a40752e401d shared library with pure abstract class (interface)
František Kučera <franta-hg@frantovo.cz>
parents: 8
diff changeset
    16
	virtual ~RelationalWriter() = default;
0a40752e401d shared library with pure abstract class (interface)
František Kučera <franta-hg@frantovo.cz>
parents: 8
diff changeset
    17
15
8fd6c4d44071 use more TypeId enum
František Kučera <franta-hg@frantovo.cz>
parents: 14
diff changeset
    18
	virtual TypeId toTypeId(const string_t typeCode) = 0;
9
0a40752e401d shared library with pure abstract class (interface)
František Kučera <franta-hg@frantovo.cz>
parents: 8
diff changeset
    19
15
8fd6c4d44071 use more TypeId enum
František Kučera <franta-hg@frantovo.cz>
parents: 14
diff changeset
    20
	virtual string_t toTypeCode(const TypeId typeId) = 0;
7
01dd90eeedbb add data type and catalog classes from the prototype
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
13
e7234dd45166 use TypeId enum instead of numeric constants
František Kučera <franta-hg@frantovo.cz>
parents: 11
diff changeset
    22
	virtual void startRelation(string_t name, std::vector<std::pair<string_t, TypeId>> attributes, boolean_t writeHeader) = 0;
7
01dd90eeedbb add data type and catalog classes from the prototype
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
9
0a40752e401d shared library with pure abstract class (interface)
František Kučera <franta-hg@frantovo.cz>
parents: 8
diff changeset
    24
	virtual void writeRecord(std::vector<string_t> attributes) = 0;
7
01dd90eeedbb add data type and catalog classes from the prototype
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
01dd90eeedbb add data type and catalog classes from the prototype
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    26
};
01dd90eeedbb add data type and catalog classes from the prototype
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    27
8
03750aff8619 writer only writes + refactoring
František Kučera <franta-hg@frantovo.cz>
parents: 7
diff changeset
    28
}
9
0a40752e401d shared library with pure abstract class (interface)
František Kučera <franta-hg@frantovo.cz>
parents: 8
diff changeset
    29
}