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