renamed schema to repository
This commit is contained in:
@@ -20,25 +20,25 @@ public:
|
||||
TypeTraitsTestFixture() {
|
||||
REQUIRE(db.open());
|
||||
const auto res = query::create()
|
||||
.table<location>("location", schema)
|
||||
.table<location>("location", repo)
|
||||
.execute(db);
|
||||
tables_to_drop.emplace("location");
|
||||
}
|
||||
};
|
||||
|
||||
TEST_CASE_METHOD(TypeTraitsTestFixture, "Special handling of attributes with type traits", "[typetraits]") {
|
||||
REQUIRE(schema.attach<location>("location"));
|
||||
REQUIRE(repo.attach<location>("location"));
|
||||
SECTION("Insert and select with direct execution") {
|
||||
location loc{1, "center", {1, 2, 3}, Color::Black};
|
||||
|
||||
auto res = query::insert()
|
||||
.into("location", column_generator::generate<location>(schema, true))
|
||||
.into("location", column_generator::generate<location>(repo, true))
|
||||
.values(loc)
|
||||
.execute(db);
|
||||
REQUIRE(res.is_ok());
|
||||
REQUIRE(*res == 1);
|
||||
|
||||
auto result = query::select(column_generator::generate<location>(schema, true))
|
||||
auto result = query::select(column_generator::generate<location>(repo, true))
|
||||
.from("location")
|
||||
.fetch_one<location>(db);
|
||||
|
||||
@@ -54,7 +54,7 @@ TEST_CASE_METHOD(TypeTraitsTestFixture, "Special handling of attributes with typ
|
||||
location loc{1, "center", {1, 2, 3}, Color::Black};
|
||||
|
||||
auto stmt = query::insert()
|
||||
.into("location", column_generator::generate<location>(schema, true))
|
||||
.into("location", column_generator::generate<location>(repo, true))
|
||||
.values<location>()
|
||||
.prepare(db);
|
||||
REQUIRE(stmt);
|
||||
@@ -63,7 +63,7 @@ TEST_CASE_METHOD(TypeTraitsTestFixture, "Special handling of attributes with typ
|
||||
REQUIRE(res.is_ok());
|
||||
REQUIRE(*res == 1);
|
||||
|
||||
auto result = query::select(column_generator::generate<location>(schema, true))
|
||||
auto result = query::select(column_generator::generate<location>(repo, true))
|
||||
.from("location")
|
||||
.fetch_one<location>(db);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user