diff --git a/backends/tests/QueryTest.cpp b/backends/tests/QueryTest.cpp index 3bce3fb..5916909 100644 --- a/backends/tests/QueryTest.cpp +++ b/backends/tests/QueryTest.cpp @@ -245,9 +245,9 @@ TEST_CASE_METHOD(QueryFixture, "Select statement with foreign key and join_left" auto result = db.query(schema).select({"f.id", "ap.brand", "ap.model", "f.pilot_name"}) .from({"flight", "f"}) .join_left({"airplane", "ap"}) - .on("f.airplane_id"_col == "ap.id"_col) - .order_by("f.id").asc() - .fetch_all(); + .on("f.airplane_id"_col == "ap.id"_col) + .order_by("f.id").asc() + .fetch_all(); std::vector> expected_result { {4, "hans"}, diff --git a/backends/tests/StatementTest.cpp b/backends/tests/StatementTest.cpp index 5eb5e7c..6a69708 100644 --- a/backends/tests/StatementTest.cpp +++ b/backends/tests/StatementTest.cpp @@ -53,7 +53,8 @@ TEST_CASE_METHOD(StatementTestFixture, "Create prepared statement", "[statement] SECTION("Insert with prepared statement and placeholder") { auto stmt = db.query(schema).insert() .into("airplane") - .values().prepare(); + .values() + .prepare(); for (const auto &plane: planes) { auto res = stmt.bind(*plane).execute(); diff --git a/backends/tests/TypeTraitsTest.cpp b/backends/tests/TypeTraitsTest.cpp index 29bb5dd..94ff02f 100644 --- a/backends/tests/TypeTraitsTest.cpp +++ b/backends/tests/TypeTraitsTest.cpp @@ -88,10 +88,19 @@ TEST_CASE_METHOD(TypeTraitsTestFixture, "Special handling of attributes with typ SECTION("Insert and select with direct execution") { location loc{1, "center", {1, 2, 3}, Color::Black}; - auto res = db.query(schema).insert().into("location").values(loc).execute(); + auto res = db + .query(schema) + .insert() + .into("location") + .values(loc) + .execute(); REQUIRE(res == 1); - auto result = db.query(schema).select().from("location").fetch_all(); + auto result = db + .query(schema) + .select() + .from("location") + .fetch_all(); for (const auto &l: result) { REQUIRE(l.name == "center"); @@ -101,12 +110,23 @@ TEST_CASE_METHOD(TypeTraitsTestFixture, "Special handling of attributes with typ SECTION("Insert and select with prepared statement") { location loc{1, "center", {1, 2, 3}, Color::Black}; - auto stmt = db.query(schema).insert().into("location").values().prepare(); - auto res = stmt.bind(loc).execute(); + auto stmt = db + .query(schema) + .insert() + .into("location") + .values() + .prepare(); + + auto res = stmt + .bind(loc) + .execute(); REQUIRE(res == 1); - auto result = db.query(schema).select().from("location"). - template fetch_all(); + auto result = db + .query(schema) + .select() + .from("location") + .fetch_all(); for (const auto &l: result) { REQUIRE(l.name == "center");