From a5f24411433aeb61ad015129354a664820affab0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 12 Dec 2012 11:26:44 +0200 Subject: Add support for SQL name transformations --- odb/option-types.cxx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'odb/option-types.cxx') diff --git a/odb/option-types.cxx b/odb/option-types.cxx index 8efb061..60fea73 100644 --- a/odb/option-types.cxx +++ b/odb/option-types.cxx @@ -195,6 +195,29 @@ operator<< (ostream& os, schema_format sf) } // +// name_case +// + +istream& +operator>> (istream& is, name_case& v) +{ + string s; + is >> s; + + if (!is.fail ()) + { + if (s == "upper") + v = name_case::upper; + else if (s == "lower") + v = name_case::lower; + else + is.setstate (istream::failbit); + } + + return is; +} + +// // oracle_version // -- cgit v1.1