![]() |
![]() |
![]() |
Holyrel Library Reference Manual | ![]() |
---|
Sorted RelationSorted Relation — Sorted relation. |
#include <libhrel/relation.h> HRelationSort; GType h_relation_sort_get_type (void); HRelation* h_relation_sort (HRelation *relation, GCompareDataFunc compare_func, gpointer user_data); HRelation* h_relation_sort_by_attrs (HRelation *relation, ...);
Strictly speaking, tuples in a relation are by definition unordered. While RelationSort is a Relation due to inheritance (note the capitalization), it does not represent a relation.
GType h_relation_sort_get_type (void);
Returns the Glib type ID of HRelationSort.
Returns : | type ID |
HRelation* h_relation_sort (HRelation *relation, GCompareDataFunc compare_func, gpointer user_data);
Creates a sorted HRelation.
relation : |
a HRelation to sort |
compare_func : |
function to compare a pair of tuples in relation
|
user_data : |
Custom data passed to compare_func
|
Returns : | a HRelationSort |
HRelation* h_relation_sort_by_attrs (HRelation *relation, ...);
Creates a HRelation sorted by attributes.
relation : |
a HRelation to sort |
... : |
List of names of attributes to compare in order, ending with
NULL .
|
Returns : | a HRelationSort |
<< Restricted Relation | Miscellaneous >> |