Boost logo

Boost :

From: Nicola Musatti (Nicola.Musatti_at_[hidden])
Date: 2006-10-06 09:02:31

Steve Hutton <shutton <at>> writes:
> I think it would be good practice to keep both queries and their related
> TypeConversions in the same header file. But of course even this isn't
> enough to ensure queries don't break - the database itself can always
> change But using select * is another precaution that gives some
> added protection from database changes.

This is the reason why it's important that libraries such as SOCI provide a
dynamic interface to query composition and navigable, explicitly
meta-represented result sets.

Those who want (or, rather, can afford) type safety should build it above the
dynamic interface. For them code generation is an effective solution, especially
considering that parsing SQL DDL (as opposed to C++ class definitions) is rather

Nicola Musatti

Boost list run by bdawes at, gregod at, cpdaniel at, john at