qofquerycore.h File Reference


Detailed Description

API for providing core Query data types.

Author:
Copyright (C) 2002 Derek Atkins <warlord@MIT.EDU>

Definition in file qofquerycore.h.

#include "gnc-numeric.h"
#include "gnc-date.h"
#include "kvp_frame.h"
#include "qofclass.h"

Go to the source code of this file.

Data Structures

struct  _QofQueryPredData

Core Data Type Predicates

QofQueryPredDataqof_query_string_predicate (QofQueryCompare how, const gchar *str, QofStringMatch options, gboolean is_regex)
QofQueryPredDataqof_query_date_predicate (QofQueryCompare how, QofDateMatch options, Timespec date)
QofQueryPredDataqof_query_numeric_predicate (QofQueryCompare how, QofNumericMatch options, gnc_numeric value)
QofQueryPredDataqof_query_guid_predicate (QofGuidMatch options, GList *guids)
QofQueryPredDataqof_query_int32_predicate (QofQueryCompare how, gint32 val)
QofQueryPredDataqof_query_int64_predicate (QofQueryCompare how, gint64 val)
QofQueryPredDataqof_query_double_predicate (QofQueryCompare how, double val)
QofQueryPredDataqof_query_boolean_predicate (QofQueryCompare how, gboolean val)
QofQueryPredDataqof_query_char_predicate (QofCharMatch options, const gchar *chars)
QofQueryPredDataqof_query_collect_predicate (QofGuidMatch options, QofCollection *coll)
QofQueryPredDataqof_query_choice_predicate (QofGuidMatch options, GList *guids)
QofQueryPredDataqof_query_kvp_predicate (QofQueryCompare how, GSList *path, const KvpValue *value)
QofQueryPredDataqof_query_kvp_predicate_path (QofQueryCompare how, const gchar *path, const KvpValue *value)
QofQueryPredDataqof_query_core_predicate_copy (QofQueryPredData *pdata)
void qof_query_core_predicate_free (QofQueryPredData *pdata)
gboolean qof_query_date_predicate_get_date (QofQueryPredData *pd, Timespec *date)
char * qof_query_core_to_string (QofType, gpointer object, QofParam *getter)

Typedefs

typedef _QofQueryPredData QofQueryPredData

Enumerations

enum  QofQueryCompare {
  QOF_COMPARE_LT = 1, QOF_COMPARE_LTE, QOF_COMPARE_EQUAL, QOF_COMPARE_GT,
  QOF_COMPARE_GTE, QOF_COMPARE_NEQ
}
enum  QofStringMatch { QOF_STRING_MATCH_NORMAL = 1, QOF_STRING_MATCH_CASEINSENSITIVE }
enum  QofDateMatch { QOF_DATE_MATCH_NORMAL = 1, QOF_DATE_MATCH_DAY }
enum  QofNumericMatch { QOF_NUMERIC_MATCH_DEBIT = 1, QOF_NUMERIC_MATCH_CREDIT, QOF_NUMERIC_MATCH_ANY }
enum  QofGuidMatch {
  QOF_GUID_MATCH_ANY = 1, QOF_GUID_MATCH_NONE, QOF_GUID_MATCH_NULL, QOF_GUID_MATCH_ALL,
  QOF_GUID_MATCH_LIST_ANY
}
enum  QofCharMatch { QOF_CHAR_MATCH_ANY = 1, QOF_CHAR_MATCH_NONE }


Function Documentation

QofQueryPredData* qof_query_core_predicate_copy QofQueryPredData pdata  ) 
 

Copy a predicate.

Definition at line 1843 of file qofquerycore.c.

void qof_query_core_predicate_free QofQueryPredData pdata  ) 
 

Destroy a predicate.

Definition at line 1831 of file qofquerycore.c.

char* qof_query_core_to_string QofType  ,
gpointer  object,
QofParam getter
 

Return a printable string for a core data object. Caller needs to g_free() the returned string.

Definition at line 1855 of file qofquerycore.c.

gboolean qof_query_date_predicate_get_date QofQueryPredData pd,
Timespec date
 

Retrieve a predicate.

Definition at line 403 of file qofquerycore.c.

00411                           {

QofQueryPredData* qof_query_kvp_predicate QofQueryCompare  how,
GSList *  path,
const KvpValue value
 

The qof_query_kvp_predicate() matches the object that has the value 'value' located at the path 'path'. In a certain sense, the 'path' is handled as if it were a paramter.

Definition at line 1259 of file qofquerycore.c.

01267   {
01268     spath = g_slist_append (spath, p);
01269     p = strchr (p, '/');
01270     if (p) { *p = 0; p++; }
01271   }
01272 
01273   pd = qof_query_kvp_predicate (how, spath, value);
01274   g_free (str);
01275   return pd;
01276 }

QofQueryPredData* qof_query_kvp_predicate_path QofQueryCompare  how,
const gchar *  path,
const KvpValue value
 

Same predicate as above, except that 'path' is assumed to be a string containing slash-separated pathname.


Generated on Fri May 12 18:00:35 2006 for QOF by  doxygen 1.4.4