[odb-users] SQLite not creating table?
Boris Kolpackov
boris at codesynthesis.com
Fri Jul 5 03:39:45 EDT 2013
Hi Rafal,
Rafal Gm <grasmanek94 at gmail.com> writes:
> Well after I switched from MySQL to SQlite at my surprise there was no
> generated .sql file to be used when the following command is issued:
>
> odb -d sqlite -I../Database/libodb-2.2.3 --std c++11 --generate-schema
> --generate-query "C:/path_to_file/classes/user.hxx"
For SQLite, by default, the schema is embedded into the generated C++
code so that you can create the tables programmatically from within
your application (this is normally the preferred way when using an
embedded database like SQLite).
If you still want the .sql file, then you can add the following option
to your ODB command line:
--schema-format sql
For more information on how to use embedded schemas, see Section 3.4,
"Database" in the ODB manual.
Boris
More information about the odb-users
mailing list