aboutsummaryrefslogtreecommitdiff
path: root/odb/options.cli
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-03-01 11:56:33 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-03-01 11:56:33 +0200
commitfe69d94f3d2dcb37d69ac2d7a0f88ad5fce2ad5c (patch)
treed93f7ea21f66e9fe416c48766b99f987ad7b3804 /odb/options.cli
parent6c97eb68924e7f9ea5b0d859182562ec8f812a1e (diff)
Add support for embedded database schemas
New options: --schema-format, --default-schema. New example: schema/embedded.
Diffstat (limited to 'odb/options.cli')
-rw-r--r--odb/options.cli40
1 files changed, 34 insertions, 6 deletions
diff --git a/odb/options.cli b/odb/options.cli
index 562daa6..bb21095 100644
--- a/odb/options.cli
+++ b/odb/options.cli
@@ -3,10 +3,11 @@
// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
// license : GNU GPL v3; see accompanying LICENSE file
-include <string>;
+include <set>;
include <vector>;
+include <string>;
-include <odb/database.hxx>;
+include <odb/option-types.hxx>;
class options
{
@@ -59,10 +60,37 @@ class options
bool --generate-schema
{
- "Generate database schema. The resulting SQL file creates database
- tables required to store classes defined in the file being compiled.
- Note that all the existing information stored in such tables will be
- lost."
+ "Generate the database schema. The database schema contains SQL
+ statements that create database tables necessary to store persistent
+ classes defined in the file being compiled. Note that by applying
+ this schema, all the existing information stored in such tables will
+ be lost.
+
+ Depending on the database being used (\cb{--database} option), the
+ schema is generated either as a standalone SQL file or embedded into
+ the generated C++ code. By default the SQL file is generated for
+ the MySQL database and the schema is embedded into the C++ code for
+ the SQLite database. Use the \cb{--schema-format} option to alter
+ the default schema format."
+ };
+
+ std::set< ::schema_format> --schema-format
+ {
+ "<format>",
+ "Generate the database schema in the specified format. Pass \cb{sql} as
+ <format> to generate the database schema as a standalone SQL file or
+ pass \cb{embedded} to embed the schema into the generated C++ code.
+ Repeat this option to generate the same database schema in multiple
+ formats."
+ };
+
+ std::string --default-schema = ""
+ {
+ "<name>",
+ "Use <name> as the default database schema name. Schema names are
+ primarily used for distinguishing between multiple embedded schemas in
+ the schema catalog. If this option is not specified, the empty name,
+ which corresponds to the default schema, is used."
};
std::string --default-pointer = "*"