Top |
#define | XB_QUERY_CONTEXT_INIT |
void | xb_query_context_init () |
void | xb_query_context_clear () |
XbQueryContext * | xb_query_context_copy () |
void | xb_query_context_free () |
XbValueBindings * | xb_query_context_get_bindings () |
guint | xb_query_context_get_limit () |
void | xb_query_context_set_limit () |
XbQueryFlags | xb_query_context_get_flags () |
void | xb_query_context_set_flags () |
#define XB_QUERY_CONTEXT_INIT()
Static initialiser for XbQueryContext so it can be used on the stack.
Use it in association with g_auto()
, to ensure the bindings are freed once
finished with:
1 2 3 |
g_auto(XbQueryContext) context = XB_QUERY_CONTEXT_INIT (); xb_query_context_set_limit (&context, 0); |
Since: 0.3.0
void
xb_query_context_init (XbQueryContext *self
);
Initialise a stack-allocated XbQueryContext struct so it can be used.
Stack-allocated XbQueryContext instances should be freed once finished
with, using xb_query_context_clear()
(or g_auto(XbQueryContext)
, which is
equivalent).
Since: 0.3.0
void
xb_query_context_clear (XbQueryContext *self
);
Clear an XbQueryContext, freeing any allocated memory it points to.
After this function has been called, the contents of the XbQueryContext are
undefined, and it’s only safe to call xb_query_context_init()
on it.
Since: 0.3.0
XbQueryContext *
xb_query_context_copy (XbQueryContext *self
);
Copy self
into a new heap-allocated XbQueryContext instance.
Since: 0.3.0
void
xb_query_context_free (XbQueryContext *self
);
Free a heap-allocated XbQueryContext instance. This should be used on
XbQueryContext instances created with xb_query_context_copy()
.
For stack-allocated instances, xb_query_context_clear()
should be used
instead.
Since: 0.3.0
XbValueBindings *
xb_query_context_get_bindings (XbQueryContext *self
);
Get the XbValueBindings for this query context.
Since: 0.3.0
guint
xb_query_context_get_limit (XbQueryContext *self
);
Get the limit on the number of query results. See
xb_query_context_set_limit()
.
Since: 0.3.0
void xb_query_context_set_limit (XbQueryContext *self
,guint limit
);
Set the limit on the number of results to return from the query.
Since: 0.3.0
XbQueryFlags
xb_query_context_get_flags (XbQueryContext *self
);
Get the flags set on the context. See xb_query_context_set_flags()
.
Since: 0.3.0
void xb_query_context_set_flags (XbQueryContext *self
,XbQueryFlags flags
);
Set flags which affect the behaviour of the query.
Since: 0.3.0