mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
Table aliases must not use braces for tables but for sub selects
This commit is contained in:
parent
9e1ecaf15a
commit
437607813c
@ -74,9 +74,12 @@ namespace sqlpp
|
|||||||
|
|
||||||
static Context& _(const T& t, Context& context)
|
static Context& _(const T& t, Context& context)
|
||||||
{
|
{
|
||||||
context << "(";
|
if (requires_braces_t<T>::value)
|
||||||
|
context << "(";
|
||||||
serialize(t._table, context);
|
serialize(t._table, context);
|
||||||
context << ") AS " << name_of<T>::char_ptr();
|
if (requires_braces_t<T>::value)
|
||||||
|
context << ")";
|
||||||
|
context << " AS " << name_of<T>::char_ptr();
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user