identity generator progress
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user