[odb-users] Generate DDL and DML methods in separate output files.

Boris Kolpackov boris at codesynthesis.com
Mon Feb 27 08:38:28 EST 2012

Hi Paul,

Stath, Paul <pstath at axxcelera.com> writes:

> Separate the DDL and DML methods generated by ODB into separate source 
> modules.

Yes, I agree this can be useful, especially for embedded systems. I
believe just generating the implementation of the create_schema() 
functions and the catalog registration code into a separate source
file (e.g., foo-schema.cxx or foo-odb-schema.cxx) will do the trick
here. Do you see any issues with this approach in your use-case?

We are planning to build a beta for the upcoming 1.9.0 release later
in the week. If you are interested, I could implement this feature
before then so that you could give it a try.

BTW, another option to handle this would be to generate the schema
as a separate SQL file (--schema-format sql). Then you could use
the sqlite3 driver to initialize the database, for example:

sqlite3 foo.db '.read foo.sql'


More information about the odb-users mailing list