aboutsummaryrefslogtreecommitdiff
path: root/odb/option-types.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-12-12 11:26:44 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-12-12 11:26:44 +0200
commita5f24411433aeb61ad015129354a664820affab0 (patch)
tree25fb5a97c0c070b78c9318f1da3dcbc484785918 /odb/option-types.cxx
parent2ad2e5500dd075db421a516502c9e522fdc34ee0 (diff)
Add support for SQL name transformations
Diffstat (limited to 'odb/option-types.cxx')
-rw-r--r--odb/option-types.cxx23
1 files changed, 23 insertions, 0 deletions
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
//