diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-01-23 15:19:07 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-01-23 16:32:52 +0100 |
commit | 22fef9910ecfcbbd7bd4c4c8268be2c4b4a5a96a (patch) | |
tree | 0defd227a7fcf270ed9d2fc3e05e5c8b2eb257ca /connectivity/inc | |
parent | 7dbcd6e6926b0162ecc48f36bfe70bdf5f06d929 (diff) |
Make UNKNOWN_RULE the default value of connectivity::OSQLParseNode::Rule
Change-Id: I4e56da8820d5c92d3b6e2ff2c749bdc0cef46d73
Diffstat (limited to 'connectivity/inc')
-rw-r--r-- | connectivity/inc/connectivity/sqlnode.hxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/connectivity/inc/connectivity/sqlnode.hxx b/connectivity/inc/connectivity/sqlnode.hxx index e21e06e31515..4082375051fb 100644 --- a/connectivity/inc/connectivity/sqlnode.hxx +++ b/connectivity/inc/connectivity/sqlnode.hxx @@ -130,7 +130,10 @@ namespace connectivity public: enum Rule { - select_statement = 0, + UNKNOWN_RULE = 0, // ID indicating that a node is no rule with a matching Rule-enum value (see getKnownRuleID) + // we make sure it is 0 so that it is the default-constructor value of this enum + // and std::map<foo,Rule>::operator[](bar) default-inserts UNKNOWN_RULE rather than select_statement (!) + select_statement, table_exp, table_ref_commalist, table_ref, @@ -229,8 +232,7 @@ namespace connectivity other_like_predicate_part_2, between_predicate_part_2, cast_spec, - rule_count, // last value - UNKNOWN_RULE = -1 // ID indicating that a node is no rule with a matching Rule-enum value (see getKnownRuleID) + rule_count // last value }; // must be ascii encoding for the value |