Xmlb.QueryContext

Fields

Name

Type

Access

Description

dummy0

int

r

dummy1

int

r

dummy2

Xmlb.ValueBindings

r

dummy3

[object]

r

Methods

clear ()

copy ()

free ()

get_bindings ()

get_flags ()

get_limit ()

init ()

set_flags (flags)

set_limit (limit)

Details

class Xmlb.QueryContext

An opaque struct which contains context for executing a query in, such as the number of results to return, or values to bind to query placeholders.

New in version 0.3.0.

clear()

Clear an Xmlb.QueryContext, freeing any allocated memory it points to.

After this function has been called, the contents of the Xmlb.QueryContext are undefined, and it’s only safe to call Xmlb.QueryContext.init() on it.

New in version 0.3.0.

copy()
Returns:

a copy of self

Return type:

Xmlb.QueryContext

Copy self into a new heap-allocated Xmlb.QueryContext instance.

New in version 0.3.0.

free()

Free a heap-allocated Xmlb.QueryContext instance. This should be used on Xmlb.QueryContext instances created with Xmlb.QueryContext.copy().

For stack-allocated instances, Xmlb.QueryContext.clear() should be used instead.

New in version 0.3.0.

get_bindings()
Returns:

bindings

Return type:

Xmlb.ValueBindings

Get the Xmlb.ValueBindings for this query context.

New in version 0.3.0.

get_flags()
Returns:

query flags

Return type:

Xmlb.QueryFlags

Get the flags set on the context. See Xmlb.QueryContext.set_flags().

New in version 0.3.0.

get_limit()
Returns:

limit on results, or 0 if unlimited

Return type:

int

Get the limit on the number of query results. See Xmlb.QueryContext.set_limit().

New in version 0.3.0.

init()

Initialise a stack-allocated Xmlb.QueryContext struct so it can be used.

Stack-allocated Xmlb.QueryContext instances should be freed once finished with, using Xmlb.QueryContext.clear() (or g_auto(XbQueryContext), which is equivalent).

New in version 0.3.0.

set_flags(flags)
Parameters:

flags (Xmlb.QueryFlags) – query flags, or Xmlb.QueryFlags.NONE for none

Set flags which affect the behaviour of the query.

New in version 0.3.0.

set_limit(limit)
Parameters:

limit (int) – number of query results to return, or 0 for unlimited

Set the limit on the number of results to return from the query.

New in version 0.3.0.