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/include.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'odb/include.cxx') diff --git a/odb/include.cxx b/odb/include.cxx index c842010..a921451 100644 --- a/odb/include.cxx +++ b/odb/include.cxx @@ -169,6 +169,7 @@ namespace { string f (file); size_t n (f.size ()); + database db (options_.database ()[0]); // Check if we have a synthesized prologue/epilogue fragment. // @@ -201,18 +202,18 @@ namespace size_t size (options_.odb_prologue ().size ()); if (n < size) - ss << options_.odb_prologue ()[n]; + ss << options_.odb_prologue ()[db][n]; else - f = options_.odb_prologue_file ()[n - size]; + f = options_.odb_prologue_file ()[db][n - size]; } else { size_t size (options_.odb_epilogue ().size ()); if (n < size) - ss << options_.odb_epilogue ()[n]; + ss << options_.odb_epilogue ()[db][n]; else - f = options_.odb_epilogue_file ()[n - size]; + f = options_.odb_epilogue_file ()[db][n - size]; } if (f.empty ()) -- cgit v1.1