identity generator progress

This commit is contained in:
Sascha Kühl
2026-02-11 16:01:44 +01:00
parent 881e93e0f6
commit 4c63322024
20 changed files with 68 additions and 69 deletions
+11 -11
View File
@@ -4,8 +4,7 @@
#include "matador/utils/basic_types.hpp"
[[maybe_unused]] const matador::sql::dialect *get_dialect()
{
[[maybe_unused]] const matador::sql::dialect *get_dialect() {
using namespace matador::sql;
const static dialect d = dialect_builder::builder()
.create()
@@ -13,16 +12,17 @@
return "$" + std::to_string(index);
})
.with_token_replace_map({
{dialect_token::BeginBinaryData, "'\\x"}
})
{dialect_token::BeginBinaryData, "'\\x"},
{dialect_token::Identity, "GENERATED BY DEFAULT AS IDENTITY"}
})
.with_data_type_replace_map({
{matador::utils::basic_type::Int8, "SMALLINT"},
{matador::utils::basic_type::UInt8, "SMALLINT"},
{matador::utils::basic_type::Float, "REAL"},
{matador::utils::basic_type::Double, "DOUBLE PRECISION"},
{matador::utils::basic_type::Time, "TIME(6)"},
{matador::utils::basic_type::DateTime, "TIMESTAMPTZ(6)"},
{matador::utils::basic_type::Blob, "BYTEA"}
{matador::utils::basic_type::Int8, "SMALLINT"},
{matador::utils::basic_type::UInt8, "SMALLINT"},
{matador::utils::basic_type::Float, "REAL"},
{matador::utils::basic_type::Double, "DOUBLE PRECISION"},
{matador::utils::basic_type::Time, "TIME(6)"},
{matador::utils::basic_type::DateTime, "TIMESTAMPTZ(6)"},
{matador::utils::basic_type::Blob, "BYTEA"}
})
.with_bool_strings("TRUE", "FALSE")
.with_default_schema_name("public")