From ea422fe75321b1b1613107915e47c2ef9532cd3a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 21 Feb 2013 11:27:27 +0200 Subject: Handle operations other than 'eq' and 'and' in dynamic queries --- odb/query-dynamic.cxx | 21 +++++++++++++++++++-- 1 file 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; } } -- cgit v1.1