mirror of
https://github.com/rbock/sqlpp11.git
synced 2026-01-04 12:10:43 -06:00
Reformatted using clang-format
Please use clang-format before submitting code, e.g via the pre-commit supplied in the repo (thanks AndiDog)
This commit is contained in:
@@ -31,22 +31,23 @@
|
||||
|
||||
int With(int, char**)
|
||||
{
|
||||
MockDb db;
|
||||
MockDb::_serializer_context_t printer;
|
||||
MockDb db;
|
||||
MockDb::_serializer_context_t printer;
|
||||
|
||||
const auto t = test::TabBar{};
|
||||
const auto t = test::TabBar{};
|
||||
|
||||
auto x = sqlpp::cte(sqlpp::alias::x).as(select(all_of(t)).from(t));
|
||||
auto x = sqlpp::cte(sqlpp::alias::x).as(select(all_of(t)).from(t));
|
||||
|
||||
db(with(x)(select(x.alpha).from(x).where(true)));
|
||||
db(with(x)(select(x.alpha).from(x).where(true)));
|
||||
|
||||
auto y0 = sqlpp::cte(sqlpp::alias::y).as(select(all_of(t)).from(t));
|
||||
auto y = y0.union_all(select(all_of(y0)).from(y0).where(false));
|
||||
auto y0 = sqlpp::cte(sqlpp::alias::y).as(select(all_of(t)).from(t));
|
||||
auto y = y0.union_all(select(all_of(y0)).from(y0).where(false));
|
||||
|
||||
std::cout << serialize(y, printer).str() << std::endl; printer.reset();
|
||||
std::cout << serialize(from_table(y), printer).str() << std::endl;
|
||||
std::cout << serialize(y, printer).str() << std::endl;
|
||||
printer.reset();
|
||||
std::cout << serialize(from_table(y), printer).str() << std::endl;
|
||||
|
||||
db(with(y)(select(y.alpha).from(y).where(true)));
|
||||
db(with(y)(select(y.alpha).from(y).where(true)));
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user