]> git.proxmox.com Git - mirror_ovs.git/blame - lib/ovsdb-condition.h
ovsdb-idl: Fix iteration over tracked rows with no actual data.
[mirror_ovs.git] / lib / ovsdb-condition.h
CommitLineData
16ebb90e
LS
1/* Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16#ifndef OVSDB_LIB_CONDITION_H
17#define OVSDB_LIB_CONDITION_H 1
18
19/* These list is ordered first with boolean functions and then in
20 * ascending order of the fraction of tables row that they are
21 * (heuristically) expected to leave in query results. */
22#define OVSDB_FUNCTIONS \
23 OVSDB_FUNCTION(OVSDB_F_FALSE, "false") \
24 OVSDB_FUNCTION(OVSDB_F_TRUE, "true") \
25 OVSDB_FUNCTION(OVSDB_F_EQ, "==") \
26 OVSDB_FUNCTION(OVSDB_F_INCLUDES, "includes") \
27 OVSDB_FUNCTION(OVSDB_F_LE, "<=") \
28 OVSDB_FUNCTION(OVSDB_F_LT, "<") \
29 OVSDB_FUNCTION(OVSDB_F_GE, ">=") \
30 OVSDB_FUNCTION(OVSDB_F_GT, ">") \
31 OVSDB_FUNCTION(OVSDB_F_EXCLUDES, "excludes") \
32 OVSDB_FUNCTION(OVSDB_F_NE, "!=")
33
34enum ovsdb_function {
35#define OVSDB_FUNCTION(ENUM, NAME) ENUM,
36 OVSDB_FUNCTIONS
37#undef OVSDB_FUNCTION
38 OVSDB_F_LAST = OVSDB_F_NE
39};
40
41struct ovsdb_error * ovsdb_function_from_string(const char *name,
42 enum ovsdb_function *function);
43const char * ovsdb_function_to_string(enum ovsdb_function function);
44
45#endif /* ovsdb-condition.h */