added sequence-specific code (create, drop and nextval)

This commit is contained in:
2026-02-17 13:31:06 +01:00
parent 80426c5293
commit 5668f1060b
17 changed files with 174 additions and 8 deletions
+7 -1
View File
@@ -145,6 +145,7 @@ public:
[[nodiscard]] const std::string& end_binary_data() const;
[[nodiscard]] const std::string& end_quote() const;
[[nodiscard]] const std::string& end_string_data() const;
[[nodiscard]] const std::string& exists() const;
[[nodiscard]] const std::string& foreign_key() const;
[[nodiscard]] const std::string& from() const;
[[nodiscard]] const std::string& group_by() const;
@@ -157,6 +158,7 @@ public:
[[nodiscard]] const std::string& join() const;
[[nodiscard]] const std::string& like() const;
[[nodiscard]] const std::string& limit() const;
[[nodiscard]] const std::string& nextval() const;
[[nodiscard]] const std::string& not_() const;
[[nodiscard]] const std::string& not_null() const;
[[nodiscard]] const std::string& offset() const;
@@ -171,6 +173,7 @@ public:
[[nodiscard]] const std::string& schema() const;
[[nodiscard]] const std::string& select() const;
[[nodiscard]] const std::string& set() const;
[[nodiscard]] const std::string& sequence() const;
[[nodiscard]] const std::string& start_quote() const;
[[nodiscard]] const std::string& string_quote() const;
[[nodiscard]] const std::string& table() const;
@@ -192,6 +195,7 @@ private:
std::string default_schema_name_;
token_to_string_map tokens_ {
{dialect_token::AddConstraint, "ADD CONSTRAINT"},
{dialect_token::Alter, "ALTER"},
@@ -215,6 +219,7 @@ private:
{dialect_token::EndBinaryData, "'"},
{dialect_token::EndQuote, "\""},
{dialect_token::EndStringData, "'"},
{dialect_token::Exists, "EXISTS"},
{dialect_token::ForeignKey, "FOREIGN KEY"},
{dialect_token::From, "FROM"},
{dialect_token::GroupBy, "GROUP BY"},
@@ -227,6 +232,7 @@ private:
{dialect_token::Join, "LEFT JOIN"},
{dialect_token::Like, "LIKE"},
{dialect_token::Limit, "LIMIT"},
{dialect_token::NextVal, "NEXTVAL"},
{dialect_token::None, ""},
{dialect_token::Not, "NOT"},
{dialect_token::NotNull, "NOT NULL"},
@@ -242,6 +248,7 @@ private:
{dialect_token::Schema, "SCHEMA"},
{dialect_token::Select, "SELECT"},
{dialect_token::Set, "SET"},
{dialect_token::Sequence, "SEQUENCE"},
{dialect_token::StartQuote, "\""},
{dialect_token::StringQuote, "'"},
{dialect_token::Table, "TABLE"},
@@ -250,7 +257,6 @@ private:
{dialect_token::Values, "VALUES"},
{dialect_token::Where, "WHERE"}
};
data_type_to_string_map data_types_ {
{utils::basic_type::Int8, "TINYINT"},
{utils::basic_type::Int16, "SMALLINT"},