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
View File
@@ -50,6 +50,17 @@ TEST_CASE_METHOD(QueryFixture, "Test create table sql statement string", "[query
REQUIRE(result == R"##(CREATE TABLE "person" ("id" BIGINT NOT NULL, "name" VARCHAR(255) NOT NULL, "age" INTEGER NOT NULL, CONSTRAINT PK_person PRIMARY KEY (id)))##");
result = query::create()
.table({"person"})
.columns({
column("id", basic_type::UInt32).primary_key().identity(),
column("name", basic_type::Varchar, 255),
column("age", basic_type::UInt16)
})
.str(*db);
REQUIRE(result == R"##(CREATE TABLE "person" ("id" BIGINT NOT NULL AUTO INCREMENT PRIMARY KEY, "name" VARCHAR(255) NOT NULL, "age" INTEGER NOT NULL))##");
auto ctx = query::create()
.table("person")
.columns({