diff --git a/tests/Ppgen.cpp b/tests/Ppgen.cpp index 296187e1..70332796 100644 --- a/tests/Ppgen.cpp +++ b/tests/Ppgen.cpp @@ -52,6 +52,7 @@ SQLPP_DECLARE_TABLE( (id , int , SQLPP_PRIMARY_KEY) (name , varchar(255), SQLPP_NOT_NULL ) (feature, int , SQLPP_NOT_NULL ) + (age , int_unsigned, SQLPP_NOT_NULL ) (level , real , SQLPP_NOT_NULL ) ) @@ -77,20 +78,28 @@ int Ppgen(int, char* []) db(insert_into(f).default_values()); - auto i = insert_into(p).columns(p.name, p.feature, p.level); - i.values.add(p.name = "Roland", p.feature = 1, p.level = 3.14); - i.values.add(p.name = "Zaphod", p.feature = sqlpp::default_value, p.level = 3.14*2); + auto i = insert_into(p).columns(p.name, p.feature, p.age, p.level); + i.values.add(p.name = "Roland" + , p.feature = 1 + , p.age = static_cast(32) + , p.level = 3.14); + i.values.add(p.name = "Zaphod" + , p.feature = sqlpp::default_value + , p.age = static_cast(16) + , p.level = 3.14*2); db(i); auto pi = db.prepare( insert_into(p).set( p.name = parameter(f.name) ,p.feature = parameter(p.feature) + ,p.age = parameter(p.age) ,p.level = parameter(p.level) ) ); pi.params.name = "likes java"; pi.params.feature = 2; + pi.params.age = 21; pi.params.level = 3.14; db(pi);