mirror of
https://github.com/getml/sqlgen.git
synced 2026-05-03 21:49:39 -05:00
Make sure that adding tags to columns only compiles when the corresponding tables exist in the query; resolves #59
This commit is contained in:
committed by
GitHub
parent
3736fcc29c
commit
1bfc4e472b
@@ -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_,
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user