diff options
author | Ben Pfaff <blp@ovn.org> | 2017-04-27 13:54:53 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-05-03 08:31:13 -0700 |
commit | a0b02897cfe33aa2c40620707f2e42cf716abf72 (patch) | |
tree | 1d4ada4743ef1e61cbc707f1c1d83dbdf6968382 /lib/db-ctl-base.h | |
parent | 5d476f28b7c537889b671bd985a1722bf5e1850e (diff) | |
download | openvswitch-a0b02897cfe33aa2c40620707f2e42cf716abf72.tar.gz |
db-ctl-base: Drop redundant 'table' field from struct ctl_row_id.
The 'table' field is redundant because the required 'column' field
implies the table that the column is a part of.
This simplifies the users and makes it harder to get these things wrong.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
Diffstat (limited to 'lib/db-ctl-base.h')
-rw-r--r-- | lib/db-ctl-base.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/db-ctl-base.h b/lib/db-ctl-base.h index 6e34ded2c..e89140982 100644 --- a/lib/db-ctl-base.h +++ b/lib/db-ctl-base.h @@ -237,8 +237,17 @@ void ctl_context_init(struct ctl_context *, struct ctl_command *, void ctl_context_done_command(struct ctl_context *, struct ctl_command *); void ctl_context_done(struct ctl_context *, struct ctl_command *); +/* A way to identify a particular row in the database based on a user-provided + * string. If all fields are NULL, the struct is ignored. Otherwise, + * 'name_column' designates a column whose table is searched for rows that + * match with the user string. If a matching row is found, then: + * + * - If 'uuid_column' is NULL, the matching row is the final row. + * + * - Otherwise 'uuid_column' must designate a UUID-typed column whose value + * refers to exactly one row, which is the final row. + */ struct ctl_row_id { - const struct ovsdb_idl_table_class *table; const struct ovsdb_idl_column *name_column; const struct ovsdb_idl_column *uuid_column; }; |