| Holyrel Library Reference Manual |
|---|
RestrictRestrict — Restrict. |
#include <libhrel/relation.h>
HRelationRestrict;
gboolean (*HTuplePredFunc) (HTuple *tuple,
gpointer user_data);
HRelation* h_relation_restrict (HRelation *relation,
HTuplePredFunc predicate_func,
gpointer user_data);
HRelation* h_relation_restrict_attrs (HRelation *relation,
...);
typedef struct _HRelationRestrict HRelationRestrict;
A HRelation representing a restricted relation.
gboolean (*HTuplePredFunc) (HTuple *tuple, gpointer user_data);
A HTuple predicate function.
tuple : |
a HTuple |
user_data : |
user data |
| Returns : | either TRUE or FALSE |
HRelation* h_relation_restrict (HRelation *relation, HTuplePredFunc predicate_func, gpointer user_data);
Restricts relation to the set of tuples evaluating to TRUE with
predicate_func.
HRelation* h_relation_restrict_attrs (HRelation *relation, ...);
Restricts relation to the set of tuples which contain the
attribute values listed.
relation : |
relation to restrict |
... : |
name and value of an attribute, followed by another and so
on, then a NULL.
|
| Returns : | restricted relation |
| << Base Relation | Sorting >> |