Subject: [boost] [rdb] 0.1.00 - prepared statements
From: Jean-Louis Leroy (jl_at_[hidden])
Date: 2009-10-11 15:38:49
I have uploaded version 0.1.0 to the vault. It introduces prepared
statements and placeholders. No doc on this yet but it's easy to use, e.g.
BOOST_AUTO(st, db.prepare(insert_into(p)(p.id, p.first_name, p.name,
p.age).values(_, _, _, _)));
st.execute(3, "Bart", "Simpson", 9);
st.execute(4, "Lisa", "Simpson", 7);
st.execute(5, "Maggie", "Simpson", 0);
It also works with update, delete and select. Placeholders are allowed
in predicates as well. Parameters are type-safe, if they don't agree
with the type of their corresponding placeholder (as deduced by the
context in which it is used), you will get a compilation error.
More examples in the test file here :
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk