aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-03-05 11:59:00 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-03-05 11:59:00 +0200
commitcd44a367fd73293b1c8edc36aa61667ca020a2eb (patch)
tree1e4ce550a525e23fb7c8c29f18ddda31b61bf066 /doc
parent2528431334b0c8aa07c85ec798be5fc9eb5b2add (diff)
Add support for generating schema creation code into separate C++ file
Diffstat (limited to 'doc')
-rw-r--r--doc/manual.xhtml20
-rw-r--r--doc/odb-prologue.17
-rw-r--r--doc/odb-prologue.xhtml5
3 files changed, 20 insertions, 12 deletions
diff --git a/doc/manual.xhtml b/doc/manual.xhtml
index 347c8ef..5060268 100644
--- a/doc/manual.xhtml
+++ b/doc/manual.xhtml
@@ -2394,16 +2394,16 @@ auto_ptr&lt;odb::database> db (
<p>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 (<code>--generate-schema</code> option). The ODB
- compiler can generate the schema either as a standalone SQL file or
- embedded into the generated C++ code (<code>--schema-format</code>
- 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.</p>
-
- <p>Alternatively, the schema can be embedded directly into the generated
- code and we can use the <code>odb::schema_catalog</code> class to
- create it in the database from within our application,
- for example:</p>
+ compiler can generate the schema as a standalone SQL file,
+ embedded into the generated C++ code, or as a separate C++ source file
+ (<code>--schema-format</code> 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.</p>
+
+ <p>Alternatively, if the schema is embedded directly into the generated
+ code or produced as a separate C++ source file, then we can use the
+ <code>odb::schema_catalog</code> class to create it in the database
+ from within our application, for example:</p>
<pre class="c++">
#include &lt;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 <code><b>--generate-schema</b></code> option is
specified and the <code><b>sql</b></code> schema format is requested,
- the <code><b>name.sql</b></code> database schema file is generated.</p>
+ the <code><b>name.sql</b></code> database schema file is generated. If
+ the <code><b>separate</b></code> schema format is requested, the database
+ creation code is generated into the separate
+ <code><b>name-schema.cxx</b></code> file.</p>
<h1>OPTIONS</h1>