From 38c17f093615a16a4b4ec6dc2b5d3edb5c1d3895 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Thu, 27 Sep 2018 21:40:52 -0400 Subject: More hkutil refactoring All database access goes through hatkirby::database now. verbly::token, verbly::statement::condition, and verbly::part have been converted to use mpark::variant now. verbly::binding has been deleted, and replaced with a mpark::variant typedef in statement.h. This means that the only remaining tagged union class is verbly::generator::part. refs #5 --- lib/binding.h | 82 ----------------------------------------------------------- 1 file changed, 82 deletions(-) delete mode 100644 lib/binding.h (limited to 'lib/binding.h') diff --git a/lib/binding.h b/lib/binding.h deleted file mode 100644 index 5da1e71..0000000 --- a/lib/binding.h +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef BINDING_H_CAE0B18E -#define BINDING_H_CAE0B18E - -#include - -namespace verbly { - - class binding { - public: - enum class type { - invalid, - integer, - string, - field - }; - - // Default constructor - - binding() - { - } - - // Copy and move constructors - - binding(const binding& other); - binding(binding&& other); - - // Assignment - - binding& operator=(binding other); - - // Swap - - friend void swap(binding& first, binding& second); - - // Destructor - - ~binding(); - - // Generic accessors - - type getType() const - { - return type_; - } - - // Integer - - binding(int arg); - - int getInteger() const; - - // String - - binding(std::string arg); - - std::string getString() const; - - // Field - - binding(std::string table, std::string column); - - std::string getTable() const; - std::string getColumn() const; - - private: - - union { - int integer_; - std::string string_; - struct { - std::string table_; - std::string column_; - } field_; - }; - - type type_ = type::invalid; - }; - -}; - -#endif /* end of include guard: BINDING_H_CAE0B18E */ -- cgit 1.4.1