renamed column to table_column and constraint to table_constraint.

This commit is contained in:
2025-12-31 13:01:54 +01:00
parent ab2d39407c
commit b9d35cbd4e
62 changed files with 424 additions and 423 deletions
+10 -10
View File
@@ -8,7 +8,7 @@
#include "matador/query/criteria_evaluator.hpp"
#include "matador/query/query.hpp"
#include "matador/query/column.hpp"
#include "matador/query/table_column.hpp"
#include "matador/query/table.hpp"
#include "matador/query/schema.hpp"
@@ -59,9 +59,9 @@ public:
, author_id(*column_by_name(*this, "author_id")) {
}
const column& id;
const column& title;
const column& author_id;
const table_column& id;
const table_column& title;
const table_column& author_id;
};
book_table BOOK;
@@ -92,7 +92,7 @@ TEST_CASE("Create sql query data for entity with eager has one", "[query][entity
REQUIRE(data->joins.size() == 1);
const auto flights = table("flights").as("t01");
const auto airplanes = table("airplanes").as("t02");
const std::vector<column> expected_columns {
const std::vector<table_column> expected_columns {
{ &flights, "id", "c01" },
{ &airplanes, "id", "c02" },
{ &airplanes, "brand", "c03" },
@@ -146,7 +146,7 @@ TEST_CASE("Create sql query data for entity with eager belongs to", "[query][ent
REQUIRE(data->joins.size() == 1);
const auto books = table("books").as("t01");
const auto authors = table("authors").as("t02");
const std::vector<column> expected_columns {
const std::vector<table_column> expected_columns {
{ &books, "id", "c01" },
{ &books, "title", "c02" },
{ &authors, "id", "c03" },
@@ -218,7 +218,7 @@ TEST_CASE("Create sql query data for entity with eager has many belongs to", "[q
REQUIRE(data->joins.size() == 1);
const auto orders = table("orders").as("t01");
const auto order_details = table("order_details").as("t02");
const std::vector<column> expected_columns = {
const std::vector<table_column> expected_columns = {
{ &orders, "order_id", "c01" },
{ &orders, "order_date", "c02" },
{ &orders, "required_date", "c03" },
@@ -282,7 +282,7 @@ TEST_CASE("Create sql query data for entity with eager many to many", "[query][e
REQUIRE(data->joins.size() == 2);
const auto ingredients = table("ingredients").as("t01");
const auto recipes = table("recipes").as("t03");
const std::vector<column> expected_columns {
const std::vector<table_column> expected_columns {
{ &ingredients, "id", "c01" },
{ &ingredients, "name", "c02" },
{ &recipes, "id", "c03" },
@@ -336,7 +336,7 @@ TEST_CASE("Create sql query data for entity with eager many to many (inverse par
REQUIRE(data->joins.size() == 2);
const auto courses = table("courses").as("t01");
const auto students = table("students").as("t03");
const std::vector<column> expected_columns {
const std::vector<table_column> expected_columns {
{ &courses, "id", "c01" },
{ &courses, "title", "c02" },
{ &students, "id", "c03" },
@@ -386,7 +386,7 @@ TEST_CASE("Test eager relationship", "[session][eager]") {
.from(*data->root_table)
.join_left(data->joins)
.where(std::move(data->where_clause))
.order_by(column{data->root_table, data->pk_column_name})
.order_by(table_column{data->root_table, data->pk_column_name})
.asc()
.str(db);