From f8677f8bfaa68e6714f4af7b030d0f365e60b918 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 29 Oct 2012 10:03:36 +0200 Subject: Add support for database prefixes in command line interface --- odb/option-functions.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'odb/option-functions.cxx') 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 f; + set& 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. // { -- cgit v1.1