mirror of
https://github.com/rbock/sqlpp11.git
synced 2026-01-04 04:00:39 -06:00
Interpret works for parameters now
Also, paramters inherit the operators they need
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "TabSample.h"
|
||||
#include "MockDb.h"
|
||||
#include <sqlpp11/select.h>
|
||||
#include <sqlpp11/functions.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@@ -40,7 +41,6 @@ int main()
|
||||
interpret(t.alpha, printer).flush();
|
||||
interpret(t.alpha = 7, printer).flush();
|
||||
interpret(t.alpha == 7, printer).flush();
|
||||
sqlpp::text_operand o = {"kaesekuchen"};
|
||||
interpret(t.beta + "kaesekuchen", printer).flush();
|
||||
|
||||
interpret(select(sqlpp::distinct, t.alpha, t.beta), printer).flush();
|
||||
@@ -51,5 +51,8 @@ int main()
|
||||
interpret(select(sqlpp::distinct, t.alpha, t.beta).from(t).where(t.alpha == 3).group_by(t.gamma).having(t.beta.like("%kuchen")).order_by(t.beta.asc()), printer).flush();
|
||||
interpret(select(sqlpp::distinct, t.alpha, t.beta).from(t).where(t.alpha == 3).group_by(t.gamma).having(t.beta.like("%kuchen")).order_by(t.beta.asc()).limit(17).offset(3), printer).flush();
|
||||
|
||||
interpret(parameter(t.alpha), printer).flush();
|
||||
interpret(t.alpha == parameter(t.alpha), printer).flush();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user