* add gncQueryAddBooleanMatch() convenience function

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7112 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins 2002-07-10 21:04:44 +00:00
parent 5266dcf818
commit 6cc1fe88c1
3 changed files with 15 additions and 0 deletions

View File

@ -4,6 +4,8 @@
* save these flags only if the entry is attached to a Bill.
* add a Billable column to Bill register
* add gncQueryAddBooleanMatch() convenience function
2002-07-09 Derek Atkins <derek@ihftp.com>
* "global-replace for-each-in-order for-each" because the former

View File

@ -1040,6 +1040,16 @@ void gncQuerySetBook (QueryNew *q, GNCBook *book)
gnc_book_get_guid(book), QUERY_AND);
}
void gncQueryAddBooleanMatch (QueryNew *q, GSList *param_list, gboolean value,
QueryOp op)
{
QueryPredData_t pdata;
if (!q || !param_list) return;
pdata = gncQueryBooleanPredicate (COMPARE_EQUAL, value);
gncQueryAddTerm (q, param_list, pdata, op);
}
/**********************************************************************/
/* PRIVATE PUBLISHED API FUNCTIONS */

View File

@ -72,6 +72,9 @@ void gncQueryAddGUIDListMatch (QueryNew *q, GSList *param_list,
GList *guid_list, guid_match_t options,
QueryOp op);
void gncQueryAddBooleanMatch (QueryNew *q, GSList *param_list, gboolean value,
QueryOp op);
/* Run the query: */
GList * gncQueryRun (QueryNew *query);