diff options
Diffstat (limited to 'lib/binding.h')
| -rw-r--r-- | lib/binding.h | 14 |
1 files changed, 13 insertions, 1 deletions
| diff --git a/lib/binding.h b/lib/binding.h index 5578a09..5da1e71 100644 --- a/lib/binding.h +++ b/lib/binding.h | |||
| @@ -10,7 +10,8 @@ namespace verbly { | |||
| 10 | enum class type { | 10 | enum class type { |
| 11 | invalid, | 11 | invalid, |
| 12 | integer, | 12 | integer, |
| 13 | string | 13 | string, |
| 14 | field | ||
| 14 | }; | 15 | }; |
| 15 | 16 | ||
| 16 | // Default constructor | 17 | // Default constructor |
| @@ -55,11 +56,22 @@ namespace verbly { | |||
| 55 | 56 | ||
| 56 | std::string getString() const; | 57 | std::string getString() const; |
| 57 | 58 | ||
| 59 | // Field | ||
| 60 | |||
| 61 | binding(std::string table, std::string column); | ||
| 62 | |||
| 63 | std::string getTable() const; | ||
| 64 | std::string getColumn() const; | ||
| 65 | |||
| 58 | private: | 66 | private: |
| 59 | 67 | ||
| 60 | union { | 68 | union { |
| 61 | int integer_; | 69 | int integer_; |
| 62 | std::string string_; | 70 | std::string string_; |
| 71 | struct { | ||
| 72 | std::string table_; | ||
| 73 | std::string column_; | ||
| 74 | } field_; | ||
| 63 | }; | 75 | }; |
| 64 | 76 | ||
| 65 | type type_ = type::invalid; | 77 | type type_ = type::invalid; |
