From 690028fb84b509f663d5f4cadb6e522d12544bb5 Mon Sep 17 00:00:00 2001 From: rbock Date: Sun, 24 Apr 2016 10:30:06 +0200 Subject: [PATCH] Added test to prepare statement with zero parameters --- tests/Prepared.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/Prepared.cpp b/tests/Prepared.cpp index e8796b02..637c030a 100644 --- a/tests/Prepared.cpp +++ b/tests/Prepared.cpp @@ -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