From d1ad30f7a517e69bc87d1347224f1c9ab38493b3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 25 Oct 2012 10:35:36 +0200 Subject: Static multi-database support Add new options (--multi-database, --default-database). Generate common code to -odb.?xx files and database-specific to -odb-.?xx. --- odb/options.cli | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'odb/options.cli') 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 { "", "Generate code for the 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 + { + "", + "Enable multi-database support and specify its type. Valid values + for this option are \cb{static} and \cb{dynamic}." + }; + + ::database --default-database + { + "", + "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 --odb-file-suffix { "", "Use instead of the default \cb{-odb} to construct the names of the generated C++ files." }; - std::string --schema-file-suffix = "-schema" + database_map --sql-file-suffix + { + "", + "Use to construct the name of the generated schema SQL file. + By default no suffix is used." + }; + + database_map --schema-file-suffix { "", "Use instead of the default \cb{-schema} to construct the name -- cgit v1.1