Make sure that adding tags to columns only compiles when the corresponding tables exist in the query; resolves #59

This commit is contained in:
Dr. Patrick Urbanke (劉自成)
2025-10-19 18:48:17 +02:00
committed by GitHub
parent 3736fcc29c
commit 1bfc4e472b
2 changed files with 7 additions and 5 deletions
+3 -1
View File
@@ -217,9 +217,11 @@ struct SelectFrom {
"You cannot call to<...> before group_by(...).");
static_assert(sizeof...(ColTypes) != 0,
"You must assign at least one column to group_by.");
using TableTupleType =
transpilation::table_tuple_t<TableOrQueryType, AliasType, JoinsType>;
return SelectFrom<TableOrQueryType, AliasType, FieldsType, JoinsType,
WhereType,
transpilation::group_by_t<TableOrQueryType,
transpilation::group_by_t<TableTupleType,
typename ColTypes::ColType...>,
OrderByType, LimitType, ToType>{.fields_ = _s.fields_,
.from_ = _s.from_,
+4 -4
View File
@@ -46,13 +46,13 @@ struct GetTableType<Literal<_alias>,
"Alias could not be identified.");
};
template <rfl::internal::StringLiteral _alias, class T>
struct GetTableType<Literal<_alias>, TableWrapper<T>> {
template <class T>
struct GetTableType<Literal<"">, TableWrapper<T>> {
using TableType = T;
};
template <rfl::internal::StringLiteral _alias, class T>
struct GetTableType<Literal<_alias>, T> {
template <class T>
struct GetTableType<Literal<"">, T> {
using TableType = T;
};