diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-10-25 10:35:36 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-10-25 10:35:36 +0200 |
commit | d1ad30f7a517e69bc87d1347224f1c9ab38493b3 (patch) | |
tree | 95189ae91fcce6366f0a121f67b483f3c1b962e7 /odb/options.cli | |
parent | 7fc555e53f0a03c93fe31ad9850b1e5d885c44f6 (diff) |
Static multi-database support
Add new options (--multi-database, --default-database). Generate common
code to -odb.?xx files and database-specific to -odb-<db>.?xx.
Diffstat (limited to 'odb/options.cli')
-rw-r--r-- | odb/options.cli | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/odb/options.cli b/odb/options.cli index cad5db7..61d8371 100644 --- a/odb/options.cli +++ b/odb/options.cli @@ -45,11 +45,26 @@ class options // // Plugin options. // - ::database --database | -d + std::vector< ::database > --database | -d { "<db>", "Generate code for the <db> database. Valid values are \cb{mssql}, - \cb{mysql}, \cb{oracle}, \cb{pgsql}, and \cb{sqlite}." + \cb{mysql}, \cb{oracle}, \cb{pgsql}, \cb{sqlite}, and \cb{common}." + }; + + ::multi_database --multi-database | -m = ::multi_database::disabled + { + "<type>", + "Enable multi-database support and specify its type. Valid values + for this option are \cb{static} and \cb{dynamic}." + }; + + ::database --default-database + { + "<db>", + "When static multi-database support is used, specify the database that + should be made the default. When dynamic multi-database support is used, + \cb{common} is always made the default database." }; bool --generate-query | -q @@ -239,14 +254,21 @@ class options generated files." }; - std::string --odb-file-suffix = "-odb" + database_map<std::string> --odb-file-suffix { "<suffix>", "Use <suffix> instead of the default \cb{-odb} to construct the names of the generated C++ files." }; - std::string --schema-file-suffix = "-schema" + database_map<std::string> --sql-file-suffix + { + "<suffix>", + "Use <suffix> to construct the name of the generated schema SQL file. + By default no suffix is used." + }; + + database_map<std::string> --schema-file-suffix { "<suffix>", "Use <suffix> instead of the default \cb{-schema} to construct the name |