diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-10-29 10:03:36 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-10-29 10:03:36 +0200 |
commit | f8677f8bfaa68e6714f4af7b030d0f365e60b918 (patch) | |
tree | 5f64e69bd7261348d966b80d0433f6bd34be76f2 /odb/option-functions.cxx | |
parent | 938d136b09b868f633574c722d48c2953dde1be4 (diff) |
Add support for database prefixes in command line interface
Diffstat (limited to 'odb/option-functions.cxx')
-rw-r--r-- | odb/option-functions.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/odb/option-functions.cxx b/odb/option-functions.cxx index aca4943..b0b2523 100644 --- a/odb/option-functions.cxx +++ b/odb/option-functions.cxx @@ -22,9 +22,9 @@ process_options (options& o) // Set the default schema format depending on the database. // - if (o.generate_schema () && o.schema_format ().empty ()) + if (o.generate_schema () && o.schema_format ()[db].empty ()) { - set<schema_format> f; + set<schema_format>& f (o.schema_format ()[db]); switch (db) { @@ -46,10 +46,13 @@ process_options (options& o) break; } } - - o.schema_format (f); } + // Set default --schema-name value. + // + if (o.schema_name ().count (db) == 0) + o.schema_name ()[db] = ""; + // Set default --*--file-suffix values. // { |