startet with connection query intermediates
This commit is contained in:
@@ -23,7 +23,6 @@ public:
|
||||
SELECT,
|
||||
TABLE,
|
||||
VALUES,
|
||||
VALUE,
|
||||
COLUMNS,
|
||||
COLUMN,
|
||||
FROM,
|
||||
@@ -36,11 +35,10 @@ public:
|
||||
GROUP_BY,
|
||||
ASC,
|
||||
DESC,
|
||||
TOP,
|
||||
LIMIT,
|
||||
AS,
|
||||
OFFSET,
|
||||
DISTINCT,
|
||||
CONDITION,
|
||||
SET,
|
||||
NOT_NULL,
|
||||
PRIMARY_KEY,
|
||||
@@ -53,14 +51,6 @@ public:
|
||||
NONE
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Enum representing the compile type
|
||||
*/
|
||||
enum class compile_type_t : uint8_t {
|
||||
PREPARED, /**< Compile type for prepared statements */
|
||||
DIRECT /**< Compile type for direct execute statements */
|
||||
};
|
||||
|
||||
/**
|
||||
* Holding enums concerning escaping identifiers
|
||||
*/
|
||||
@@ -127,7 +117,6 @@ public:
|
||||
*/
|
||||
virtual std::string next_placeholder() const;
|
||||
|
||||
compile_type_t compile_type() const;
|
||||
void add_host_var(const std::string &host_var);
|
||||
void add_column(const std::string &column);
|
||||
|
||||
@@ -137,41 +126,41 @@ public:
|
||||
private:
|
||||
using token_to_string_map = std::unordered_map<token_t, std::string>;
|
||||
|
||||
compile_type_t compile_type_ = compile_type_t::DIRECT;
|
||||
std::vector<std::string> host_vars_;
|
||||
std::vector<std::string> columns_;
|
||||
|
||||
token_to_string_map tokens_ {
|
||||
{token_t::CREATE, "CREATE"},
|
||||
{token_t::DROP, "DROP"},
|
||||
{token_t::REMOVE, "DELETE"},
|
||||
{token_t::INSERT, "INSERT"},
|
||||
{token_t::TABLE, "TABLE"},
|
||||
{token_t::INTO, "INTO"},
|
||||
{token_t::VALUES, "VALUES"},
|
||||
{token_t::UPDATE, "UPDATE"},
|
||||
{token_t::SELECT, "SELECT"},
|
||||
{token_t::COLUMNS, "COLUMNS"},
|
||||
{token_t::COLUMN, "COLUMN"},
|
||||
{token_t::FROM, "FROM"},
|
||||
{token_t::WHERE, "WHERE"},
|
||||
{token_t::AND, "AND"},
|
||||
{token_t::OR, "OR"},
|
||||
{token_t::LIKE, "LIKE"},
|
||||
{token_t::ORDER_BY, "ORDER BY"},
|
||||
{token_t::GROUP_BY, "GROUP BY"},
|
||||
{token_t::ASC, "ASC"},
|
||||
{token_t::DESC, "DESC"},
|
||||
{token_t::TOP, "LIMIT"},
|
||||
{token_t::AS, "AS"},
|
||||
{token_t::OFFSET, "OFFSET"},
|
||||
{token_t::DISTINCT, "DISTINCT"},
|
||||
{token_t::SET, "SET"},
|
||||
{token_t::NOT_NULL, "NOT NULL"},
|
||||
{token_t::CREATE, "CREATE"},
|
||||
{token_t::DROP, "DROP"},
|
||||
{token_t::REMOVE, "DELETE"},
|
||||
{token_t::INSERT, "INSERT"},
|
||||
{token_t::TABLE, "TABLE"},
|
||||
{token_t::INTO, "INTO"},
|
||||
{token_t::VALUES, "VALUES"},
|
||||
{token_t::UPDATE, "UPDATE"},
|
||||
{token_t::SELECT, "SELECT"},
|
||||
{token_t::COLUMNS, "COLUMNS"},
|
||||
{token_t::COLUMN, "COLUMN"},
|
||||
{token_t::FROM, "FROM"},
|
||||
{token_t::WHERE, "WHERE"},
|
||||
{token_t::AND, "AND"},
|
||||
{token_t::OR, "OR"},
|
||||
{token_t::LIKE, "LIKE"},
|
||||
{token_t::ORDER_BY, "ORDER BY"},
|
||||
{token_t::GROUP_BY, "GROUP BY"},
|
||||
{token_t::ASC, "ASC"},
|
||||
{token_t::DESC, "DESC"},
|
||||
{token_t::OFFSET, "OFFSET"},
|
||||
{token_t::LIMIT, "LIMIT"},
|
||||
{token_t::AS, "AS"},
|
||||
{token_t::OFFSET, "OFFSET"},
|
||||
{token_t::DISTINCT, "DISTINCT"},
|
||||
{token_t::SET, "SET"},
|
||||
{token_t::NOT_NULL, "NOT NULL"},
|
||||
{token_t::PRIMARY_KEY, "PRIMARY KEY"},
|
||||
{token_t::BEGIN, "BEGIN TRANSACTION"},
|
||||
{token_t::COMMIT, "COMMIT TRANSACTION"},
|
||||
{token_t::ROLLBACK, "ROLLBACK TRANSACTION"},
|
||||
{token_t::BEGIN, "BEGIN TRANSACTION"},
|
||||
{token_t::COMMIT, "COMMIT TRANSACTION"},
|
||||
{token_t::ROLLBACK, "ROLLBACK TRANSACTION"},
|
||||
{token_t::START_QUOTE, "\""},
|
||||
{token_t::END_QUOTE, "\""},
|
||||
{token_t::STRING_QUOTE, "'"},
|
||||
|
||||
Reference in New Issue
Block a user