moved query parts from intermediates declaration to definition file.

This commit is contained in:
2024-02-27 20:16:59 +01:00
parent 2d9a4f3866
commit b9709d14c2
18 changed files with 153 additions and 70 deletions
+10 -10
View File
@@ -39,7 +39,7 @@ private:
using namespace matador::sql;
TEST_CASE_METHOD(QueryRecordFixture, " Create and drop table statement", "[session][record]")
TEST_CASE_METHOD(QueryRecordFixture, "Create and drop table statement", "[session][record]")
{
REQUIRE(!db.exists("person"));
db.query(schema).create()
@@ -59,7 +59,7 @@ TEST_CASE_METHOD(QueryRecordFixture, " Create and drop table statement", "[sessi
REQUIRE(!db.exists("person"));
}
TEST_CASE_METHOD(QueryRecordFixture, " Create and drop table statement with foreign key", "[session][record]")
TEST_CASE_METHOD(QueryRecordFixture, "Create and drop table statement with foreign key", "[session][record]")
{
db.query(schema).create()
.table("airplane", {
@@ -94,7 +94,7 @@ TEST_CASE_METHOD(QueryRecordFixture, " Create and drop table statement with fore
REQUIRE(!db.exists("airplane"));
}
TEST_CASE_METHOD(QueryRecordFixture, " Execute insert record statement", "[session][record]")
TEST_CASE_METHOD(QueryRecordFixture, "Execute insert record statement", "[session][record]")
{
db.query(schema).create()
.table("person", {
@@ -133,7 +133,7 @@ TEST_CASE_METHOD(QueryRecordFixture, " Execute insert record statement", "[sessi
.execute();
}
TEST_CASE_METHOD(QueryRecordFixture, " Execute insert record statement with foreign key", "[session][record]")
TEST_CASE_METHOD(QueryRecordFixture, "Execute insert record statement with foreign key", "[session][record]")
{
db.query(schema).create()
.table("airplane", {
@@ -173,7 +173,7 @@ TEST_CASE_METHOD(QueryRecordFixture, " Execute insert record statement with fore
REQUIRE(!db.exists("airplane"));
}
TEST_CASE_METHOD(QueryRecordFixture, " Execute update record statement", "[session][record]")
TEST_CASE_METHOD(QueryRecordFixture, "Execute update record statement", "[session][record]")
{
db.query(schema).create()
.table("person", {
@@ -219,7 +219,7 @@ TEST_CASE_METHOD(QueryRecordFixture, " Execute update record statement", "[sessi
db.query(schema).drop().table("person").execute();
}
TEST_CASE_METHOD(QueryRecordFixture, " Execute select statement", "[session][record]")
TEST_CASE_METHOD(QueryRecordFixture, "Execute select statement", "[session][record]")
{
db.query(schema).create()
.table("person", {
@@ -262,7 +262,7 @@ TEST_CASE_METHOD(QueryRecordFixture, " Execute select statement", "[session][rec
db.query(schema).drop().table("person").execute();
}
TEST_CASE_METHOD(QueryRecordFixture, " Execute select statement with order by", "[session][record]")
TEST_CASE_METHOD(QueryRecordFixture, "Execute select statement with order by", "[session][record]")
{
db.query(schema).create()
.table("person", {
@@ -296,7 +296,7 @@ TEST_CASE_METHOD(QueryRecordFixture, " Execute select statement with order by",
db.query(schema).drop().table("person").execute();
}
TEST_CASE_METHOD(QueryRecordFixture, " Execute select statement with group by and order by", "[session][record]")
TEST_CASE_METHOD(QueryRecordFixture, "Execute select statement with group by and order by", "[session][record]")
{
db.query(schema).create()
.table("person", {
@@ -335,7 +335,7 @@ TEST_CASE_METHOD(QueryRecordFixture, " Execute select statement with group by an
db.query(schema).drop().table("person").execute();
}
TEST_CASE_METHOD(QueryRecordFixture, " Execute delete statement", "[session][record]")
TEST_CASE_METHOD(QueryRecordFixture, "Execute delete statement", "[session][record]")
{
db.query(schema).create()
.table("person", {
@@ -365,7 +365,7 @@ TEST_CASE_METHOD(QueryRecordFixture, " Execute delete statement", "[session][rec
db.query(schema).drop().table("person").execute();
}
TEST_CASE_METHOD(QueryRecordFixture, " Test quoted identifier", "[session][record]") {
TEST_CASE_METHOD(QueryRecordFixture, "Test quoted identifier", "[session][record]") {
db.query(schema).create()
.table("quotes", {
make_column<std::string>("from", 255),
+5 -5
View File
@@ -44,7 +44,7 @@ private:
}
};
TEST_CASE_METHOD(QueryFixture, " Create table with foreign key relation", "[session]")
TEST_CASE_METHOD(QueryFixture, "Create table with foreign key relation", "[session]")
{
db.query(schema).create()
.table<airplane>("airplane")
@@ -65,7 +65,7 @@ TEST_CASE_METHOD(QueryFixture, " Create table with foreign key relation", "[sess
REQUIRE(!db.exists("airplane"));
}
TEST_CASE_METHOD(QueryFixture, " Execute select statement with where clause", "[session]")
TEST_CASE_METHOD(QueryFixture, "Execute select statement with where clause", "[session]")
{
db.query(schema).create()
.table<person>("person")
@@ -115,7 +115,7 @@ TEST_CASE_METHOD(QueryFixture, " Execute select statement with where clause", "[
db.query(schema).drop().table("person").execute();
}
TEST_CASE_METHOD(QueryFixture, " Execute insert statement", "[session]")
TEST_CASE_METHOD(QueryFixture, "Execute insert statement", "[session]")
{
db.query(schema).create()
.table("person", {
@@ -154,7 +154,7 @@ TEST_CASE_METHOD(QueryFixture, " Execute insert statement", "[session]")
db.query(schema).drop().table("person").execute();
}
TEST_CASE_METHOD(QueryFixture, " Select statement with foreign key", "[session]")
TEST_CASE_METHOD(QueryFixture, "Select statement with foreign key", "[session]")
{
db.query(schema).create()
.table<airplane>("airplane")
@@ -193,7 +193,7 @@ TEST_CASE_METHOD(QueryFixture, " Select statement with foreign key", "[session]"
db.query(schema).drop().table("airplane").execute();
}
TEST_CASE_METHOD(QueryFixture, " Select statement with foreign key and join_left", "[session][join_left]")
TEST_CASE_METHOD(QueryFixture, "Select statement with foreign key and join_left", "[session][join_left]")
{
db.query(schema).create()
.table<airplane>("airplane")
+1 -1
View File
@@ -22,7 +22,7 @@ protected:
matador::sql::session ses;
};
TEST_CASE_METHOD(StatementCacheFixture, " Acquire prepared statement", "[statement cache]") {
TEST_CASE_METHOD(StatementCacheFixture, "Acquire prepared statement", "[statement cache]") {
sql::statement_cache cache;
auto conn = pool.acquire();
+1 -1
View File
@@ -46,7 +46,7 @@ private:
};
TEST_CASE_METHOD(StatementTestFixture, " Create prepared statement", "[statement]")
TEST_CASE_METHOD(StatementTestFixture, "Create prepared statement", "[statement]")
{
table ap{"airplane"};
SECTION("Insert with prepared statement and placeholder") {