0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-15 20:31:16 +08:00

Added test to prepare statement with zero parameters

This commit is contained in:
rbock 2016-04-24 10:30:06 +02:00
parent 4e4cb9cc4c
commit 690028fb84

View File

@ -130,6 +130,12 @@ int Prepared(int, char* [])
std::cerr << x.alpha << std::endl;
}
// Can we prepare a query without parameters?
{
auto ps = db.prepare(select(all_of(t)).from(t).where((t.beta.like("%"))));
auto res = db(ps);
}
// Check that a prepared select is default-constructable
{
auto s = select(all_of(t)).from(t).where((t.beta.like(parameter(t.beta)) and t.alpha == parameter(t.alpha)) or