further camelcase fixing
[rrq/rrqmisc.git] / vector / Query.h
1 #ifndef Query_H
2 #define Query_H
3
4 #include <TupleSchema.h>
5 #include <Relation.h>
6
7 struct QueryCallbacks;
8
9 /**
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.
15  */
16 typedef struct {
17     struct QueryCallbacks *def;
18 } Query;
19
20 /**
21  * \brief Creates an assignment Query.
22  *
23  * \param arity is the assignment tuple arity.
24  *
25  * \param names is the (char*) names to assign.
26  *
27  * \param values is the (void*) values to asign.
28  *
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.
32  *
33  * \related Query
34  */
35 extern Query *Query_assign(int arity,tuple *names,tuple *values);
36
37 /**
38  * \brief Create a lookup_Query record for lookup data in a Relation.
39  */
40 extern Query *Query_lookup(Relation *r,...);
41
42
43
44 #endif