aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-02-21 11:27:27 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-02-21 11:27:27 +0200
commitea422fe75321b1b1613107915e47c2ef9532cd3a (patch)
tree788ed3b67e4ff99b4f6b65eade5d672c86d4b1e3
parentef3669ce2b3c8bfe1c7351f818b2247d804cf322 (diff)
Handle operations other than 'eq' and 'and' in dynamic queries
-rw-r--r--odb/query-dynamic.cxx21
1 files changed, 19 insertions, 2 deletions
diff --git a/odb/query-dynamic.cxx b/odb/query-dynamic.cxx
index 9c3493f..4050c90 100644
--- a/odb/query-dynamic.cxx
+++ b/odb/query-dynamic.cxx
@@ -76,13 +76,30 @@ namespace odb
d.data = strings_.size () - 1;
break;
}
- case clause_part::op_eq:
+ case clause_part::op_add:
+
case clause_part::op_and:
+ case clause_part::op_or:
+
+ case clause_part::op_eq:
+ case clause_part::op_ne:
+ case clause_part::op_lt:
+ case clause_part::op_gt:
+ case clause_part::op_le:
+ case clause_part::op_ge:
{
d.data += delta;
break;
}
- default:
+ // Do not use default here to remember to handle new op codes.
+ //
+ case clause_part::kind_column:
+ case clause_part::kind_true:
+ case clause_part::kind_false:
+ case clause_part::op_not:
+ case clause_part::op_null:
+ case clause_part::op_not_null:
+ case clause_part::op_in:
break;
}
}