QOF  0.8.7
qofquery-p.h
1 /********************************************************************\
2  * qofquery-p.h -- internal/private API for finding objects *
3  * Copyright (C) 2002 Derek Atkins <warlord@MIT.EDU> *
4  * Copyright (C) 2006 Neil Williams <linux@codehelp.co.uk> *
5  * *
6  * This program is free software; you can redistribute it and/or *
7  * modify it under the terms of the GNU General Public License as *
8  * published by the Free Software Foundation; either version 2 of *
9  * the License, or (at your option) any later version. *
10  * *
11  * This program is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License*
17  * along with this program; if not, contact: *
18  * *
19  * Free Software Foundation Voice: +1-617-542-5942 *
20  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
21  * Boston, MA 02110-1301, USA gnu@gnu.org *
22  * *
23 \********************************************************************/
24 
25 #ifndef QOF_QUERY_P_H
26 #define QOF_QUERY_P_H
27 
28 #include "qofquery.h"
29 
30 typedef struct _QofQueryTerm QofQueryTerm;
31 typedef struct _QofQuerySort QofQuerySort;
32 
33 /* Functions to get Query information */
34 gint
35 qof_query_get_max_results (QofQuery * q);
36 
37 /* Functions to get and look at QueryTerms */
38 
39 /* This returns a List of List of Query Terms. Each list of Query
40  * Terms are ANDed together, and each list of ANDed terms are ORed
41  * together. So, what is returned is the 'or' list of 'and' lists
42  * of query term objects.
43  *
44  * Note that you should NOT modify this list in any way. It belongs
45  * to the query.
46  */
47 GList *qof_query_get_terms (QofQuery * q);
48 
49 GSList *
50 qof_query_term_get_param_path (QofQueryTerm * queryterm);
52 qof_query_term_get_pred_data (QofQueryTerm * queryterm);
53 gboolean
54 qof_query_term_is_inverted (QofQueryTerm * queryterm);
55 
56 /* Functions to get and look at QuerySorts */
57 
58 /* This function returns the primary, secondary, and tertiary sorts.
59  * These are part of the query and should NOT be changed!
60  */
61 void
62 qof_query_get_sorts (QofQuery * q, QofQuerySort ** primary,
63  QofQuerySort ** secondary,
64  QofQuerySort ** tertiary);
65 
66 GSList *
67 qof_query_sort_get_param_path (QofQuerySort * querysort);
68 gint
69 qof_query_sort_get_sort_options (QofQuerySort * querysort);
70 gboolean
71 qof_query_sort_get_increasing (QofQuerySort * querysort);
72 
79 void qof_query_print (QofQuery * query);
80 
81 #endif /* QOF_QUERY_P_H */
struct _QofQuery QofQuery
Definition: qofquery.h:85
find objects that match a certain expression.