XbQuery

XbQuery

Functions

XbQuery * xb_query_new ()
const gchar * xb_query_get_xpath ()
guint xb_query_get_limit ()
void xb_query_set_limit ()
gboolean xb_query_bind_str ()
gboolean xb_query_bind_val ()

Types and Values

#define XB_TYPE_QUERY
struct XbQueryClass
  XbQuery

Description

Functions

xb_query_new ()

XbQuery *
xb_query_new (XbSilo *silo,
              const gchar *xpath,
              GError **error);

Creates a query to be used by silo . It may be quicker to create a query manually and re-use it multiple times.

Parameters

silo

a XbSilo

 

xpath

The XPath query

 

Returns

a XbQuery.

[transfer full]

Since: 0.1.4


xb_query_get_xpath ()

const gchar *
xb_query_get_xpath (XbQuery *self);

Gets the XPath string that created the query.

Parameters

self

a XbQuery

 

Returns

string

Since: 0.1.4


xb_query_get_limit ()

guint
xb_query_get_limit (XbQuery *self);

Gets the results limit on this query, where 0 is 'all'.

Parameters

self

a XbQuery

 

Returns

integer, default 0

Since: 0.1.4


xb_query_set_limit ()

void
xb_query_set_limit (XbQuery *self,
                    guint limit);

Sets the results limit on this query, where 0 is 'all'.

Parameters

self

a XbQuery

 

limit

integer

 

Since: 0.1.4


xb_query_bind_str ()

gboolean
xb_query_bind_str (XbQuery *self,
                   guint idx,
                   const gchar *str,
                   GError **error);

Assigns a string to a bound value specified using ?.

Parameters

self

a XbQuery

 

idx

an integer index

 

str

string to assign to the bound variable

 

error

a GError, or NULL

 

Returns

TRUE if the idx existed

Since: 0.1.4


xb_query_bind_val ()

gboolean
xb_query_bind_val (XbQuery *self,
                   guint idx,
                   guint32 val,
                   GError **error);

Assigns a string to a bound value specified using ?.

Parameters

self

a XbQuery

 

idx

an integer index

 

val

value to assign to the bound variable

 

error

a GError, or NULL

 

Returns

TRUE if the idx existed

Since: 0.1.4

Types and Values

XB_TYPE_QUERY

#define             XB_TYPE_QUERY

struct XbQueryClass

struct XbQueryClass {
	GObjectClass			 parent_class;
};

XbQuery

typedef struct _XbQuery XbQuery;