4 #include <TupleSchema.h>
7 struct query_callbacks;
10 * A query is an implementation of a generic ABI over relations. It's
11 * more or less a "virtual Relation" representing a logical composite
12 * access of actual relations, and as such its active part is held in
13 * a separate \ref querytype record similar to how \ref ItemKeyFun
14 * records define valye types.
17 struct query_callbacks *def;
21 * \brief Creates an assignment query.
23 * \param arity is the assignment tuple arity.
25 * \param names is the (char*) names to assign.
27 * \param values is the (void*) values to asign.
29 * The two tuples must have the same arity for assigning names[i] to
30 * values[i]. This query makes the given names have the given values,
31 * once for each (*next) call following a (*reset) call.
35 extern query *query_assign(int arity,tuple *names,tuple *values);
47 * \brief Create a lookup_query record for lookup data in a Relation.
49 extern query *query_lookup(Relation *r,...);