$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] Request for Interest in several Modules
From: Roland Bock (rbock_at_[hidden])
Date: 2012-01-11 15:11:40
On 01/11/2012 03:06 PM, Mateusz Loskot wrote:
> On 11 January 2012 12:29, Roland Bock <rbock_at_[hidden]> wrote:
>> On 01/10/2012 04:11 PM, Artyom Beilis wrote:
>>> - CppDB Sql Connectivity
>> Taking an example from your documentation:
>>
>> cppdb::statement <http://cppcms.sourceforge.net/sql/cppdb/classcppdb_1_1statement.html> st=sql.prepare("DELETE FROM users WHERE age<? AND role<>?");
>> st.bind <http://cppcms.sourceforge.net/sql/cppdb/classcppdb_1_1statement.html#add4e469140ddd77aadc5d6c8cfb8ba11>(1,13);
>> st.bind <http://cppcms.sourceforge.net/sql/cppdb/classcppdb_1_1statement.html#add4e469140ddd77aadc5d6c8cfb8ba11>(2,"moderator");
>>
>>
>> In our company we have combination of code generator and template
>> library which allows to do the following
>>
>> TabUsers tab;
>> tab.remove(tab.age<13 and role!="moderator");
>>
>> The compiler can then ensure correct names for tables and columns,
>> typesafety and correct syntax. This makes database programming much
>> easier because there is much less room for stupid mistakes.
> Sounds similar to http://www.codesynthesis.com/products/odb/
>
> Best regards,
Thanks for the link!
As far as I can tell from a few minutes of reading, their approach uses
the same idea, but starts from C++ classes, where we start from SQL
table definitions. I wonder how changes in the data model look like
(e.g. adding a new column)? We can migrate the database, dump the new
table structure and generate the code.
I'll keep on reading! Thanks again!
Regards,
Roland