summaryrefslogtreecommitdiff
path: root/odb/context.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/context.cxx')
-rw-r--r--odb/context.cxx27
1 files changed, 17 insertions, 10 deletions
diff --git a/odb/context.cxx b/odb/context.cxx
index 099b10b..fbab993 100644
--- a/odb/context.cxx
+++ b/odb/context.cxx
@@ -386,8 +386,13 @@ create_context (ostream& os,
{
auto_ptr<context> r;
- switch (ops.database ())
+ switch (ops.database ()[0])
{
+ case database::common:
+ {
+ r.reset (new context (os, unit, ops, f));
+ break;
+ }
case database::mssql:
{
r.reset (new relational::mssql::context (os, unit, ops, f, m));
@@ -436,15 +441,17 @@ context (ostream& os_,
unit (u),
options (ops),
features (f),
- db (options.database ()),
+ db (options.database ()[0]),
keyword_set (data_->keyword_set_),
include_regex (data_->include_regex_),
accessor_regex (data_->accessor_regex_),
modifier_regex (data_->modifier_regex_),
- embedded_schema (ops.generate_schema () &&
- ops.schema_format ().count (schema_format::embedded)),
- separate_schema (ops.generate_schema () &&
- ops.schema_format ().count (schema_format::separate)),
+ embedded_schema (
+ ops.generate_schema () &&
+ ops.schema_format ()[db].count (schema_format::embedded)),
+ separate_schema (
+ ops.generate_schema () &&
+ ops.schema_format ()[db].count (schema_format::separate)),
top_object (data_->top_object_),
cur_object (data_->cur_object_)
{
@@ -1141,9 +1148,9 @@ schema (semantics::scope& s) const
// If we are still not fully qualified, add the schema that was
// specified on the command line.
//
- if (!r.fully_qualified () && options.schema_specified ())
+ if (!r.fully_qualified () && options.schema ().count (db) != 0)
{
- qname n (options.schema ());
+ qname n (options.schema ()[db]);
n.append (r);
n.swap (r);
}
@@ -1184,8 +1191,8 @@ table_name_prefix (semantics::scope& s) const
// Add the prefix that was specified on the command line.
//
- if (options.table_prefix_specified ())
- r = options.table_prefix () + r;
+ if (options.table_prefix ().count (db) != 0)
+ r = options.table_prefix ()[db] + r;
s.set ("table-prefix", r);
return r;