From cd44a367fd73293b1c8edc36aa61667ca020a2eb Mon Sep 17 00:00:00 2001
From: Boris Kolpackov There are several ways to create the database schema. The easiest is to
instruct the ODB compiler to generate the corresponding schema from the
persistent classes ( Alternatively, the schema can be embedded directly into the generated
- code and we can use the --generate-schema
option). The ODB
- compiler can generate the schema either as a standalone SQL file or
- embedded into the generated C++ code (--schema-format
- option). If we are using the SQL file to create the database schema, then
- this file should be executed, normally only once, before the application
- is started.odb::schema_catalog
class to
- create it in the database from within our application,
- for example:--schema-format
option). If we are using the SQL file
+ to create the database schema, then this file should be executed,
+ normally only once, before the application is started.
Alternatively, if the schema is embedded directly into the generated
+ code or produced as a separate C++ source file, then we can use the
+ odb::schema_catalog
class to create it in the database
+ from within our application, for example:
#include <odb/schema-catalog.hxx> diff --git a/doc/odb-prologue.1 b/doc/odb-prologue.1 index ca9d079..78d95c4 100644 --- a/doc/odb-prologue.1 +++ b/doc/odb-prologue.1 @@ -53,7 +53,12 @@ option is specified and the .B sql schema format is requested, the .B name.sql -database schema file is generated. +database schema file is generated. If the +.B separate +schema format is requested, the database creation code is generated into +the separate +.B name-schema.cxx +file. .\" .\" .\" diff --git a/doc/odb-prologue.xhtml b/doc/odb-prologue.xhtml index 79a06eb..46d6e3f 100644 --- a/doc/odb-prologue.xhtml +++ b/doc/odb-prologue.xhtml @@ -75,6 +75,9 @@ Additionally, if the--generate-schema
option is specified and thesql
schema format is requested, - thename.sql
database schema file is generated. + thename.sql
database schema file is generated. If + theseparate
schema format is requested, the database + creation code is generated into the separate +name-schema.cxx
file.OPTIONS
-- cgit v1.1