![]() |
![]() |
![]() |
Xesam GLib Reference Manual | ![]() |
---|---|---|---|---|
XesamGQueryPrivate; XesamGQuery; const gchar* xesam_g_query_get_xml (XesamGQuery *query); XesamGQuery* xesam_g_query_new_from_text (const gchar *search_text); XesamGQuery* xesam_g_query_new_from_textf (const gchar *format, ...); XesamGQuery* xesam_g_query_new_from_xml (const gchar *query_xml); XesamGQuery* xesam_g_query_new_steal_xml (gchar *query_xml);
In Xesam terminology a 'query' is formatted string prepared for the search engine. A 'search' is the opaque representation of a query that has been accepted and is executing on the search engine.
XesamGQuery is available since 1.0
const gchar* xesam_g_query_get_xml (XesamGQuery *query);
Get an XML representation of a query. The XML will be cached until the query is changed. The query string should not be freed or modified.
|
Query object to get XML representation for |
Returns : |
A string encoding the query in the XESAM Query Language |
XesamGQuery* xesam_g_query_new_from_text (const gchar *search_text);
Create a new query based on a user supplied string conforming to the XESAM User Search Language Spec.
In contrast to xesam_g_query_new_from_textf this method is safe to use on user supplied input.
|
A string in the XESAM User Search Langauge |
Returns : |
A newly allocated query object |
XesamGQuery* xesam_g_query_new_from_textf (const gchar *format, ...);
Create a new query based on a printf-style argument. The formatted result must conform to the XESAM User Search Language Spec.
WARNING: Be cautious if you use this method on user supplied input. Any formatting characters should be escaped.
|
A string in the XESAM User Search Language. The string may contain printf-like escapes. |
|
Values for the format string |
Returns : |
A newly allocated query object |
XesamGQuery* xesam_g_query_new_from_xml (const gchar *query_xml);
Create a new query containing the raw xml supplied in the constructor. The xml should conform to the XESAM Query Language specification, although this will not be checked on construction time.
|
A string encoded in the XESAM Query Languge |
Returns : |
A newly allocated query object |
XesamGQuery* xesam_g_query_new_steal_xml (gchar *query_xml);
Create a new query containing the raw xml supplied in the constructor. The xml should conform to the XESAM Query Language specification, although this will not be checked on construction time.
The query object will assume ownership of query_xml
.
This method is especially handy in conjunction with a XesamGXmlQueryBuilder
to avoid the extra string duplication of the XML query returned by
xesam_g_xml_query_builder_get_xml()
. If not using
xesam_g_xml_query_builder_get_query()
directly.
|
A string encoded in the XESAM Query Languge |
Returns : |
A newly allocated query object |