
11 Jan
2012
11 Jan
'12
6:31 p.m.
Den 11-01-2012 13:29, Roland Bock skrev:
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.
Maybe we can get 90% of it by something as simple as class Users { BOOST_DECLARE_SQL_CLASS( "USERS" ); BOOST_SQL_VAR( int, "column_age", age ); BOOST_SQL_VAR( std::string, "column_role", role ); ... }; -Thorsten