<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" 
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="rasqal-rasqal">
<refmeta>
<refentrytitle role="top_of_page" id="rasqal-rasqal.top_of_page">rasqal</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>RASQAL Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>rasqal</refname>
<refpurpose></refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

<refsynopsisdiv id="rasqal-rasqal.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>
#define             <link linkend="RASQAL-API:CAPS">RASQAL_API</link>
#define             <link linkend="RASQAL-DEPRECATED:CAPS">RASQAL_DEPRECATED</link>
extern              const unsigned int <link linkend="rasqal-version-major">rasqal_version_major</link>;
extern              const unsigned int <link linkend="rasqal-version-minor">rasqal_version_minor</link>;
extern              const unsigned int <link linkend="rasqal-version-release">rasqal_version_release</link>;
extern              const unsigned int <link linkend="rasqal-version-decimal">rasqal_version_decimal</link>;
#define             <link linkend="RASQAL-WORLD-DECLARED:CAPS">RASQAL_WORLD_DECLARED</link>
typedef             <link linkend="rasqal-world">rasqal_world</link>;
typedef             <link linkend="rasqal-query">rasqal_query</link>;
typedef             <link linkend="rasqal-query-results">rasqal_query_results</link>;
#define             <link linkend="RASQAL-QUERY-RESULTS-FORMATTER-DECLARED:CAPS">RASQAL_QUERY_RESULTS_FORMATTER_DECLARED</link>
typedef             <link linkend="rasqal-query-results-formatter">rasqal_query_results_formatter</link>;
typedef             <link linkend="rasqal-literal">rasqal_literal</link>;
typedef             <link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link>;
enum                <link linkend="rasqal-feature">rasqal_feature</link>;
                    <link linkend="rasqal-prefix">rasqal_prefix</link>;
enum                <link linkend="rasqal-variable-type">rasqal_variable_type</link>;
struct              <link linkend="rasqal-expression-s">rasqal_expression_s</link>;
                    <link linkend="rasqal-variable">rasqal_variable</link>;
enum                <link linkend="rasqal-data-graph-flags">rasqal_data_graph_flags</link>;
                    <link linkend="rasqal-data-graph">rasqal_data_graph</link>;
enum                <link linkend="rasqal-literal-type">rasqal_literal_type</link>;
typedef             <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link>;
enum                <link linkend="rasqal-op">rasqal_op</link>;
typedef             <link linkend="rasqal-expression">rasqal_expression</link>;
enum                <link linkend="rasqal-triple-flags">rasqal_triple_flags</link>;
                    <link linkend="rasqal-triple">rasqal_triple</link>;
enum                <link linkend="rasqal-pattern-flags">rasqal_pattern_flags</link>;
enum                <link linkend="rasqal-query-verb">rasqal_query_verb</link>;
enum                <link linkend="rasqal-graph-pattern-operator">rasqal_graph_pattern_operator</link>;
<link linkend="int">int</link>                 (<link linkend="rasqal-graph-pattern-visit-fn">*rasqal_graph_pattern_visit_fn</link>)    (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *gp,
                                                         <link linkend="void">void</link> *user_data);
<link linkend="rasqal-world">rasqal_world</link>*       <link linkend="rasqal-new-world">rasqal_new_world</link>                    (void);
<link linkend="void">void</link>                <link linkend="rasqal-free-world">rasqal_free_world</link>                   (<link linkend="rasqal-world">rasqal_world</link> *);
<link linkend="int">int</link>                 <link linkend="rasqal-features-enumerate">rasqal_features_enumerate</link>           (const <link linkend="rasqal-feature">rasqal_feature</link> feature,
                                                         const <link linkend="char">char</link> **name,
                                                         <link linkend="raptor-uri">raptor_uri</link> **uri,
                                                         const <link linkend="char">char</link> **label);
unsigned <link linkend="int">int</link>        <link linkend="rasqal-get-feature-count">rasqal_get_feature_count</link>            (void);
<link linkend="rasqal-feature">rasqal_feature</link>      <link linkend="rasqal-feature-from-uri">rasqal_feature_from_uri</link>             (<link linkend="raptor-uri">raptor_uri</link> *uri);
<link linkend="int">int</link>                 <link linkend="rasqal-feature-value-type">rasqal_feature_value_type</link>           (const <link linkend="rasqal-feature">rasqal_feature</link> feature);
<link linkend="int">int</link>                 <link linkend="rasqal-languages-enumerate">rasqal_languages_enumerate</link>          (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         unsigned <link linkend="int">int</link> counter,
                                                         const <link linkend="char">char</link> **name,
                                                         const <link linkend="char">char</link> **label,
                                                         unsigned <link linkend="char">char</link> **uri_string);
<link linkend="int">int</link>                 <link linkend="rasqal-language-name-check">rasqal_language_name_check</link>          (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         const <link linkend="char">char</link> *name);
<link linkend="rasqal-query">rasqal_query</link>*       <link linkend="rasqal-new-query">rasqal_new_query</link>                    (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         const <link linkend="char">char</link> *name,
                                                         unsigned <link linkend="char">char</link> *uri);
<link linkend="void">void</link>                <link linkend="rasqal-free-query">rasqal_free_query</link>                   (<link linkend="rasqal-query">rasqal_query</link> *query);
const <link linkend="char">char</link>*         <link linkend="rasqal-query-get-name">rasqal_query_get_name</link>               (<link linkend="rasqal-query">rasqal_query</link> *query);
const <link linkend="char">char</link>*         <link linkend="rasqal-query-get-label">rasqal_query_get_label</link>              (<link linkend="rasqal-query">rasqal_query</link> *query);
<link linkend="void">void</link>                <link linkend="rasqal-query-set-fatal-error-handler">rasqal_query_set_fatal_error_handler</link>
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="void">void</link> *user_data,
                                                         <link linkend="raptor-message-handler">raptor_message_handler</link> handler);
<link linkend="void">void</link>                <link linkend="rasqal-query-set-error-handler">rasqal_query_set_error_handler</link>      (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="void">void</link> *user_data,
                                                         <link linkend="raptor-message-handler">raptor_message_handler</link> handler);
<link linkend="void">void</link>                <link linkend="rasqal-query-set-warning-handler">rasqal_query_set_warning_handler</link>    (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="void">void</link> *user_data,
                                                         <link linkend="raptor-message-handler">raptor_message_handler</link> handler);
<link linkend="int">int</link>                 <link linkend="rasqal-query-set-feature">rasqal_query_set_feature</link>            (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="rasqal-feature">rasqal_feature</link> feature,
                                                         <link linkend="int">int</link> value);
<link linkend="int">int</link>                 <link linkend="rasqal-query-set-feature-string">rasqal_query_set_feature_string</link>     (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="rasqal-feature">rasqal_feature</link> feature,
                                                         unsigned <link linkend="char">char</link> *value);
<link linkend="int">int</link>                 <link linkend="rasqal-query-get-feature">rasqal_query_get_feature</link>            (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="rasqal-feature">rasqal_feature</link> feature);
const unsigned <link linkend="char">char</link>* <link linkend="rasqal-query-get-feature-string">rasqal_query_get_feature_string</link>    (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="rasqal-feature">rasqal_feature</link> feature);
<link linkend="void">void</link>                <link linkend="rasqal-query-set-default-generate-bnodeid-parameters">rasqal_query_set_default_generate_bnodeid_parameters</link>
                                                        (<link linkend="rasqal-query">rasqal_query</link> *rdf_query,
                                                         <link linkend="char">char</link> *prefix,
                                                         <link linkend="int">int</link> base);
<link linkend="void">void</link>                <link linkend="rasqal-query-set-generate-bnodeid-handler">rasqal_query_set_generate_bnodeid_handler</link>
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="void">void</link> *user_data,
                                                         <link linkend="rasqal-generate-bnodeid-handler">rasqal_generate_bnodeid_handler</link> handler);
<link linkend="rasqal-query-verb">rasqal_query_verb</link>   <link linkend="rasqal-query-get-verb">rasqal_query_get_verb</link>               (<link linkend="rasqal-query">rasqal_query</link> *query);
<link linkend="int">int</link>                 <link linkend="rasqal-query-get-wildcard">rasqal_query_get_wildcard</link>           (<link linkend="rasqal-query">rasqal_query</link> *query);
<link linkend="int">int</link>                 <link linkend="rasqal-query-get-distinct">rasqal_query_get_distinct</link>           (<link linkend="rasqal-query">rasqal_query</link> *query);
<link linkend="void">void</link>                <link linkend="rasqal-query-set-distinct">rasqal_query_set_distinct</link>           (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> distinct_mode);
<link linkend="int">int</link>                 <link linkend="rasqal-query-get-explain">rasqal_query_get_explain</link>            (<link linkend="rasqal-query">rasqal_query</link> *query);
<link linkend="void">void</link>                <link linkend="rasqal-query-set-explain">rasqal_query_set_explain</link>            (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> is_explain);
<link linkend="int">int</link>                 <link linkend="rasqal-query-get-limit">rasqal_query_get_limit</link>              (<link linkend="rasqal-query">rasqal_query</link> *query);
<link linkend="void">void</link>                <link linkend="rasqal-query-set-limit">rasqal_query_set_limit</link>              (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> limit);
<link linkend="int">int</link>                 <link linkend="rasqal-query-get-offset">rasqal_query_get_offset</link>             (<link linkend="rasqal-query">rasqal_query</link> *query);
<link linkend="void">void</link>                <link linkend="rasqal-query-set-offset">rasqal_query_set_offset</link>             (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> offset);
<link linkend="int">int</link>                 <link linkend="rasqal-query-add-data-graph">rasqal_query_add_data_graph</link>         (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="raptor-uri">raptor_uri</link> *uri,
                                                         <link linkend="raptor-uri">raptor_uri</link> *name_uri,
                                                         <link linkend="int">int</link> flags);
<link linkend="raptor-sequence">raptor_sequence</link>*    <link linkend="rasqal-query-get-data-graph-sequence">rasqal_query_get_data_graph_sequence</link>
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query);
<link linkend="rasqal-data-graph">rasqal_data_graph</link>*  <link linkend="rasqal-query-get-data-graph">rasqal_query_get_data_graph</link>         (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> idx);
<link linkend="int">int</link>                 <link linkend="rasqal-query-add-variable">rasqal_query_add_variable</link>           (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="rasqal-variable">rasqal_variable</link> *var);
<link linkend="raptor-sequence">raptor_sequence</link>*    <link linkend="rasqal-query-get-bound-variable-sequence">rasqal_query_get_bound_variable_sequence</link>
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query);
<link linkend="raptor-sequence">raptor_sequence</link>*    <link linkend="rasqal-query-get-anonymous-variable-sequence">rasqal_query_get_anonymous_variable_sequence</link>
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query);
<link linkend="raptor-sequence">raptor_sequence</link>*    <link linkend="rasqal-query-get-all-variable-sequence">rasqal_query_get_all_variable_sequence</link>
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query);
<link linkend="rasqal-variable">rasqal_variable</link>*    <link linkend="rasqal-query-get-variable">rasqal_query_get_variable</link>           (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> idx);
<link linkend="int">int</link>                 <link linkend="rasqal-query-has-variable">rasqal_query_has_variable</link>           (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         unsigned <link linkend="char">char</link> *name);
<link linkend="int">int</link>                 <link linkend="rasqal-query-set-variable">rasqal_query_set_variable</link>           (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         unsigned <link linkend="char">char</link> *name,
                                                         <link linkend="rasqal-literal">rasqal_literal</link> *value);
<link linkend="raptor-sequence">raptor_sequence</link>*    <link linkend="rasqal-query-get-triple-sequence">rasqal_query_get_triple_sequence</link>    (<link linkend="rasqal-query">rasqal_query</link> *query);
<link linkend="rasqal-triple">rasqal_triple</link>*      <link linkend="rasqal-query-get-triple">rasqal_query_get_triple</link>             (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> idx);
<link linkend="int">int</link>                 <link linkend="rasqal-query-add-prefix">rasqal_query_add_prefix</link>             (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="rasqal-prefix">rasqal_prefix</link> *prefix);
<link linkend="raptor-sequence">raptor_sequence</link>*    <link linkend="rasqal-query-get-prefix-sequence">rasqal_query_get_prefix_sequence</link>    (<link linkend="rasqal-query">rasqal_query</link> *query);
<link linkend="rasqal-prefix">rasqal_prefix</link>*      <link linkend="rasqal-query-get-prefix">rasqal_query_get_prefix</link>             (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> idx);
<link linkend="raptor-sequence">raptor_sequence</link>*    <link linkend="rasqal-query-get-order-conditions-sequence">rasqal_query_get_order_conditions_sequence</link>
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query);
<link linkend="rasqal-expression">rasqal_expression</link>*  <link linkend="rasqal-query-get-order-condition">rasqal_query_get_order_condition</link>    (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> idx);
<link linkend="raptor-sequence">raptor_sequence</link>*    <link linkend="rasqal-query-get-group-conditions-sequence">rasqal_query_get_group_conditions_sequence</link>
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query);
<link linkend="rasqal-expression">rasqal_expression</link>*  <link linkend="rasqal-query-get-group-condition">rasqal_query_get_group_condition</link>    (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> idx);
<link linkend="raptor-sequence">raptor_sequence</link>*    <link linkend="rasqal-query-get-construct-triples-sequence">rasqal_query_get_construct_triples_sequence</link>
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query);
<link linkend="rasqal-triple">rasqal_triple</link>*      <link linkend="rasqal-query-get-construct-triple">rasqal_query_get_construct_triple</link>   (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> idx);
<link linkend="void">void</link>                <link linkend="rasqal-query-graph-pattern-visit">rasqal_query_graph_pattern_visit</link>    (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="rasqal-graph-pattern-visit-fn">rasqal_graph_pattern_visit_fn</link> visit_fn,
                                                         <link linkend="void">void</link> *data);
<link linkend="int">int</link>                 <link linkend="rasqal-query-write">rasqal_query_write</link>                  (<link linkend="raptor-iostream">raptor_iostream</link> *iostr,
                                                         <link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="raptor-uri">raptor_uri</link> *format_uri,
                                                         <link linkend="raptor-uri">raptor_uri</link> *base_uri);
<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link>* <link linkend="rasqal-query-get-query-graph-pattern">rasqal_query_get_query_graph_pattern</link>
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query);
<link linkend="raptor-sequence">raptor_sequence</link>*    <link linkend="rasqal-query-get-graph-pattern-sequence">rasqal_query_get_graph_pattern_sequence</link>
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query);
<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link>* <link linkend="rasqal-query-get-graph-pattern">rasqal_query_get_graph_pattern</link>    (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> idx);
<link linkend="int">int</link>                 <link linkend="rasqal-graph-pattern-add-sub-graph-pattern">rasqal_graph_pattern_add_sub_graph_pattern</link>
                                                        (<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *graph_pattern,
                                                         <link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *sub_graph_pattern);
<link linkend="rasqal-triple">rasqal_triple</link>*      <link linkend="rasqal-graph-pattern-get-triple">rasqal_graph_pattern_get_triple</link>     (<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *graph_pattern,
                                                         <link linkend="int">int</link> idx);
<link linkend="raptor-sequence">raptor_sequence</link>*    <link linkend="rasqal-graph-pattern-get-sub-graph-pattern-sequence">rasqal_graph_pattern_get_sub_graph_pattern_sequence</link>
                                                        (<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *graph_pattern);
<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link>* <link linkend="rasqal-graph-pattern-get-sub-graph-pattern">rasqal_graph_pattern_get_sub_graph_pattern</link>
                                                        (<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *graph_pattern,
                                                         <link linkend="int">int</link> idx);
<link linkend="rasqal-graph-pattern-operator">rasqal_graph_pattern_operator</link> <link linkend="rasqal-graph-pattern-get-operator">rasqal_graph_pattern_get_operator</link>
                                                        (<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *graph_pattern);
const <link linkend="char">char</link>*         <link linkend="rasqal-graph-pattern-operator-as-string">rasqal_graph_pattern_operator_as_string</link>
                                                        (<link linkend="rasqal-graph-pattern-operator">rasqal_graph_pattern_operator</link> op);
<link linkend="void">void</link>                <link linkend="rasqal-graph-pattern-print">rasqal_graph_pattern_print</link>          (<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *gp,
                                                         <link linkend="FILE:CAPS">FILE</link> *fh);
<link linkend="int">int</link>                 <link linkend="rasqal-graph-pattern-add-constraint">rasqal_graph_pattern_add_constraint</link> (<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *gp,
                                                         <link linkend="rasqal-expression">rasqal_expression</link> *expr);
<link linkend="raptor-sequence">raptor_sequence</link>*    <link linkend="rasqal-graph-pattern-get-constraint-sequence">rasqal_graph_pattern_get_constraint_sequence</link>
                                                        (<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *gp);
<link linkend="rasqal-expression">rasqal_expression</link>*  <link linkend="rasqal-graph-pattern-get-constraint">rasqal_graph_pattern_get_constraint</link> (<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *gp,
                                                         <link linkend="int">int</link> idx);
<link linkend="int">int</link>                 <link linkend="rasqal-graph-pattern-visit">rasqal_graph_pattern_visit</link>          (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *gp,
                                                         <link linkend="rasqal-graph-pattern-visit-fn">rasqal_graph_pattern_visit_fn</link> fn,
                                                         <link linkend="void">void</link> *user_data);
<link linkend="int">int</link>                 <link linkend="rasqal-graph-pattern-get-index">rasqal_graph_pattern_get_index</link>      (<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *gp);
const <link linkend="char">char</link>*         <link linkend="rasqal-query-verb-as-string">rasqal_query_verb_as_string</link>         (<link linkend="rasqal-query-verb">rasqal_query_verb</link> verb);
<link linkend="void">void</link>                <link linkend="rasqal-query-print">rasqal_query_print</link>                  (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="FILE:CAPS">FILE</link> *fh);
<link linkend="int">int</link>                 <link linkend="rasqal-query-prepare">rasqal_query_prepare</link>                (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         unsigned <link linkend="char">char</link> *query_string,
                                                         <link linkend="raptor-uri">raptor_uri</link> *base_uri);
<link linkend="rasqal-query-results">rasqal_query_results</link>* <link linkend="rasqal-query-execute">rasqal_query_execute</link>              (<link linkend="rasqal-query">rasqal_query</link> *query);
<link linkend="void">void</link>*               <link linkend="rasqal-query-get-user-data">rasqal_query_get_user_data</link>          (<link linkend="rasqal-query">rasqal_query</link> *query);
<link linkend="void">void</link>                <link linkend="rasqal-query-set-user-data">rasqal_query_set_user_data</link>          (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="void">void</link> *user_data);
<link linkend="void">void</link>                <link linkend="rasqal-free-query-results">rasqal_free_query_results</link>           (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);
<link linkend="int">int</link>                 <link linkend="rasqal-query-results-is-bindings">rasqal_query_results_is_bindings</link>    (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);
<link linkend="int">int</link>                 <link linkend="rasqal-query-results-get-count">rasqal_query_results_get_count</link>      (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);
<link linkend="int">int</link>                 <link linkend="rasqal-query-results-next">rasqal_query_results_next</link>           (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);
<link linkend="int">int</link>                 <link linkend="rasqal-query-results-finished">rasqal_query_results_finished</link>       (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);
<link linkend="int">int</link>                 <link linkend="rasqal-query-results-get-bindings">rasqal_query_results_get_bindings</link>   (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results,
                                                         unsigned <link linkend="char">char</link> ***names,
                                                         <link linkend="rasqal-literal">rasqal_literal</link> ***values);
<link linkend="rasqal-literal">rasqal_literal</link>*     <link linkend="rasqal-query-results-get-binding-value">rasqal_query_results_get_binding_value</link>
                                                        (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results,
                                                         <link linkend="int">int</link> offset);
const unsigned <link linkend="char">char</link>* <link linkend="rasqal-query-results-get-binding-name">rasqal_query_results_get_binding_name</link>
                                                        (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results,
                                                         <link linkend="int">int</link> offset);
<link linkend="rasqal-literal">rasqal_literal</link>*     <link linkend="rasqal-query-results-get-binding-value-by-name">rasqal_query_results_get_binding_value_by_name</link>
                                                        (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results,
                                                         unsigned <link linkend="char">char</link> *name);
<link linkend="int">int</link>                 <link linkend="rasqal-query-results-get-bindings-count">rasqal_query_results_get_bindings_count</link>
                                                        (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);
<link linkend="int">int</link>                 <link linkend="rasqal-query-results-is-boolean">rasqal_query_results_is_boolean</link>     (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);
<link linkend="int">int</link>                 <link linkend="rasqal-query-results-get-boolean">rasqal_query_results_get_boolean</link>    (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);
<link linkend="int">int</link>                 <link linkend="rasqal-query-results-is-graph">rasqal_query_results_is_graph</link>       (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);
<link linkend="raptor-statement">raptor_statement</link>*   <link linkend="rasqal-query-results-get-triple">rasqal_query_results_get_triple</link>     (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);
<link linkend="int">int</link>                 <link linkend="rasqal-query-results-next-triple">rasqal_query_results_next_triple</link>    (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);
<link linkend="int">int</link>                 <link linkend="rasqal-query-results-is-syntax">rasqal_query_results_is_syntax</link>      (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);
<link linkend="int">int</link>                 <link linkend="rasqal-query-results-write">rasqal_query_results_write</link>          (<link linkend="raptor-iostream">raptor_iostream</link> *iostr,
                                                         <link linkend="rasqal-query-results">rasqal_query_results</link> *results,
                                                         <link linkend="raptor-uri">raptor_uri</link> *format_uri,
                                                         <link linkend="raptor-uri">raptor_uri</link> *base_uri);
<link linkend="int">int</link>                 <link linkend="rasqal-query-results-read">rasqal_query_results_read</link>           (<link linkend="raptor-iostream">raptor_iostream</link> *iostr,
                                                         <link linkend="rasqal-query-results">rasqal_query_results</link> *results,
                                                         <link linkend="raptor-uri">raptor_uri</link> *format_uri,
                                                         <link linkend="raptor-uri">raptor_uri</link> *base_uri);
#define             <link linkend="RASQAL-QUERY-RESULTS-FORMAT-FLAG-READER:CAPS">RASQAL_QUERY_RESULTS_FORMAT_FLAG_READER</link>
#define             <link linkend="RASQAL-QUERY-RESULTS-FORMAT-FLAG-WRITER:CAPS">RASQAL_QUERY_RESULTS_FORMAT_FLAG_WRITER</link>
<link linkend="int">int</link>                 <link linkend="rasqal-query-results-formats-enumerate">rasqal_query_results_formats_enumerate</link>
                                                        (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         unsigned <link linkend="int">int</link> counter,
                                                         const <link linkend="char">char</link> **name,
                                                         const <link linkend="char">char</link> **label,
                                                         unsigned <link linkend="char">char</link> **uri_string,
                                                         const <link linkend="char">char</link> **mime_type,
                                                         <link linkend="int">int</link> *flags);
<link linkend="int">int</link>                 <link linkend="rasqal-query-results-formats-check">rasqal_query_results_formats_check</link>  (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         const <link linkend="char">char</link> *name,
                                                         <link linkend="raptor-uri">raptor_uri</link> *uri,
                                                         const <link linkend="char">char</link> *mime_type);
<link linkend="rasqal-query-results-formatter">rasqal_query_results_formatter</link>* <link linkend="rasqal-new-query-results-formatter">rasqal_new_query_results_formatter</link>
                                                        (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         const <link linkend="char">char</link> *name,
                                                         <link linkend="raptor-uri">raptor_uri</link> *format_uri);
<link linkend="rasqal-query-results-formatter">rasqal_query_results_formatter</link>* <link linkend="rasqal-new-query-results-formatter-by-mime-type">rasqal_new_query_results_formatter_by_mime_type</link>
                                                        (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         const <link linkend="char">char</link> *mime_type);
<link linkend="void">void</link>                <link linkend="rasqal-free-query-results-formatter">rasqal_free_query_results_formatter</link> (<link linkend="rasqal-query-results-formatter">rasqal_query_results_formatter</link> *formatter);
<link linkend="int">int</link>                 <link linkend="rasqal-query-results-formatter-write">rasqal_query_results_formatter_write</link>
                                                        (<link linkend="raptor-iostream">raptor_iostream</link> *iostr,
                                                         <link linkend="rasqal-query-results-formatter">rasqal_query_results_formatter</link> *formatter,
                                                         <link linkend="rasqal-query-results">rasqal_query_results</link> *results,
                                                         <link linkend="raptor-uri">raptor_uri</link> *base_uri);
<link linkend="int">int</link>                 <link linkend="rasqal-query-results-formatter-read">rasqal_query_results_formatter_read</link> (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         <link linkend="raptor-iostream">raptor_iostream</link> *iostr,
                                                         <link linkend="rasqal-query-results-formatter">rasqal_query_results_formatter</link> *formatter,
                                                         <link linkend="rasqal-query-results">rasqal_query_results</link> *results,
                                                         <link linkend="raptor-uri">raptor_uri</link> *base_uri);
const <link linkend="char">char</link>*         <link linkend="rasqal-query-results-formatter-get-mime-type">rasqal_query_results_formatter_get_mime_type</link>
                                                        (<link linkend="rasqal-query-results-formatter">rasqal_query_results_formatter</link> *formatter);
<link linkend="int">int</link>                 <link linkend="rasqal-query-iostream-write-escaped-counted-string">rasqal_query_iostream_write_escaped_counted_string</link>
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="raptor-iostream">raptor_iostream</link> *iostr,
                                                         unsigned <link linkend="char">char</link> *string,
                                                         <link linkend="size-t">size_t</link> len);
unsigned <link linkend="char">char</link>*      <link linkend="rasqal-query-escape-counted-string">rasqal_query_escape_counted_string</link>  (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         unsigned <link linkend="char">char</link> *string,
                                                         <link linkend="size-t">size_t</link> len,
                                                         <link linkend="size-t">size_t</link> *output_len_p);
<link linkend="rasqal-data-graph">rasqal_data_graph</link>*  <link linkend="rasqal-new-data-graph">rasqal_new_data_graph</link>               (<link linkend="raptor-uri">raptor_uri</link> *uri,
                                                         <link linkend="raptor-uri">raptor_uri</link> *name_uri,
                                                         <link linkend="int">int</link> flags);
<link linkend="void">void</link>                <link linkend="rasqal-free-data-graph">rasqal_free_data_graph</link>              (<link linkend="rasqal-data-graph">rasqal_data_graph</link> *dg);
<link linkend="void">void</link>                <link linkend="rasqal-data-graph-print">rasqal_data_graph_print</link>             (<link linkend="rasqal-data-graph">rasqal_data_graph</link> *dg,
                                                         <link linkend="FILE:CAPS">FILE</link> *fh);
enum                <link linkend="rasqal-compare-flags">rasqal_compare_flags</link>;
<link linkend="rasqal-expression">rasqal_expression</link>*  <link linkend="rasqal-new-0op-expression">rasqal_new_0op_expression</link>           (<link linkend="rasqal-op">rasqal_op</link> op);
<link linkend="rasqal-expression">rasqal_expression</link>*  <link linkend="rasqal-new-1op-expression">rasqal_new_1op_expression</link>           (<link linkend="rasqal-op">rasqal_op</link> op,
                                                         <link linkend="rasqal-expression">rasqal_expression</link> *arg);
<link linkend="rasqal-expression">rasqal_expression</link>*  <link linkend="rasqal-new-2op-expression">rasqal_new_2op_expression</link>           (<link linkend="rasqal-op">rasqal_op</link> op,
                                                         <link linkend="rasqal-expression">rasqal_expression</link> *arg1,
                                                         <link linkend="rasqal-expression">rasqal_expression</link> *arg2);
<link linkend="rasqal-expression">rasqal_expression</link>*  <link linkend="rasqal-new-3op-expression">rasqal_new_3op_expression</link>           (<link linkend="rasqal-op">rasqal_op</link> op,
                                                         <link linkend="rasqal-expression">rasqal_expression</link> *arg1,
                                                         <link linkend="rasqal-expression">rasqal_expression</link> *arg2,
                                                         <link linkend="rasqal-expression">rasqal_expression</link> *arg3);
<link linkend="rasqal-expression">rasqal_expression</link>*  <link linkend="rasqal-new-string-op-expression">rasqal_new_string_op_expression</link>     (<link linkend="rasqal-op">rasqal_op</link> op,
                                                         <link linkend="rasqal-expression">rasqal_expression</link> *arg1,
                                                         <link linkend="rasqal-literal">rasqal_literal</link> *literal);
<link linkend="rasqal-expression">rasqal_expression</link>*  <link linkend="rasqal-new-literal-expression">rasqal_new_literal_expression</link>       (<link linkend="rasqal-literal">rasqal_literal</link> *literal);
<link linkend="rasqal-expression">rasqal_expression</link>*  <link linkend="rasqal-new-function-expression">rasqal_new_function_expression</link>      (<link linkend="raptor-uri">raptor_uri</link> *name,
                                                         <link linkend="raptor-sequence">raptor_sequence</link> *args);
<link linkend="rasqal-expression">rasqal_expression</link>*  <link linkend="rasqal-new-cast-expression">rasqal_new_cast_expression</link>          (<link linkend="raptor-uri">raptor_uri</link> *name,
                                                         <link linkend="rasqal-expression">rasqal_expression</link> *value);
<link linkend="rasqal-expression">rasqal_expression</link>*  <link linkend="rasqal-new-expression-from-expression">rasqal_new_expression_from_expression</link>
                                                        (<link linkend="rasqal-expression">rasqal_expression</link> *e);
<link linkend="void">void</link>                <link linkend="rasqal-free-expression">rasqal_free_expression</link>              (<link linkend="rasqal-expression">rasqal_expression</link> *e);
<link linkend="void">void</link>                <link linkend="rasqal-expression-print-op">rasqal_expression_print_op</link>          (<link linkend="rasqal-expression">rasqal_expression</link> *e,
                                                         <link linkend="FILE:CAPS">FILE</link> *fh);
<link linkend="void">void</link>                <link linkend="rasqal-expression-print">rasqal_expression_print</link>             (<link linkend="rasqal-expression">rasqal_expression</link> *e,
                                                         <link linkend="FILE:CAPS">FILE</link> *fh);
<link linkend="rasqal-literal">rasqal_literal</link>*     <link linkend="rasqal-expression-evaluate">rasqal_expression_evaluate</link>          (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="rasqal-expression">rasqal_expression</link> *e,
                                                         <link linkend="int">int</link> flags);
<link linkend="int">int</link>                 (<link linkend="rasqal-expression-visit-fn">*rasqal_expression_visit_fn</link>)       (<link linkend="void">void</link> *user_data,
                                                         <link linkend="rasqal-expression">rasqal_expression</link> *e);
<link linkend="int">int</link>                 <link linkend="rasqal-expression-visit">rasqal_expression_visit</link>             (<link linkend="rasqal-expression">rasqal_expression</link> *e,
                                                         <link linkend="rasqal-expression-visit-fn">rasqal_expression_visit_fn</link> fn,
                                                         <link linkend="void">void</link> *user_data);
<link linkend="rasqal-literal">rasqal_literal</link>*     <link linkend="rasqal-new-integer-literal">rasqal_new_integer_literal</link>          (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         <link linkend="rasqal-literal-type">rasqal_literal_type</link> type,
                                                         <link linkend="int">int</link> integer);
<link linkend="rasqal-literal">rasqal_literal</link>*     <link linkend="rasqal-new-typed-literal">rasqal_new_typed_literal</link>            (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         <link linkend="rasqal-literal-type">rasqal_literal_type</link> type,
                                                         unsigned <link linkend="char">char</link> *string);
<link linkend="rasqal-literal">rasqal_literal</link>*     <link linkend="rasqal-new-double-literal">rasqal_new_double_literal</link>           (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         <link linkend="double">double</link> d);
<link linkend="rasqal-literal">rasqal_literal</link>*     <link linkend="rasqal-new-float-literal">rasqal_new_float_literal</link>            (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         <link linkend="float">float</link> f);
<link linkend="rasqal-literal">rasqal_literal</link>*     <link linkend="rasqal-new-uri-literal">rasqal_new_uri_literal</link>              (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         <link linkend="raptor-uri">raptor_uri</link> *uri);
<link linkend="rasqal-literal">rasqal_literal</link>*     <link linkend="rasqal-new-pattern-literal">rasqal_new_pattern_literal</link>          (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         unsigned <link linkend="char">char</link> *pattern,
                                                         const <link linkend="char">char</link> *flags);
<link linkend="rasqal-literal">rasqal_literal</link>*     <link linkend="rasqal-new-string-literal">rasqal_new_string_literal</link>           (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         unsigned <link linkend="char">char</link> *string,
                                                         const <link linkend="char">char</link> *language,
                                                         <link linkend="raptor-uri">raptor_uri</link> *datatype,
                                                         unsigned <link linkend="char">char</link> *datatype_qname);
<link linkend="rasqal-literal">rasqal_literal</link>*     <link linkend="rasqal-new-simple-literal">rasqal_new_simple_literal</link>           (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         <link linkend="rasqal-literal-type">rasqal_literal_type</link> type,
                                                         unsigned <link linkend="char">char</link> *string);
<link linkend="rasqal-literal">rasqal_literal</link>*     <link linkend="rasqal-new-boolean-literal">rasqal_new_boolean_literal</link>          (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         <link linkend="int">int</link> value);
<link linkend="rasqal-literal">rasqal_literal</link>*     <link linkend="rasqal-new-variable-literal">rasqal_new_variable_literal</link>         (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         <link linkend="rasqal-variable">rasqal_variable</link> *variable);
<link linkend="rasqal-literal">rasqal_literal</link>*     <link linkend="rasqal-new-decimal-literal">rasqal_new_decimal_literal</link>          (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         unsigned <link linkend="char">char</link> *string);
<link linkend="rasqal-literal">rasqal_literal</link>*     <link linkend="rasqal-new-decimal-literal-from-decimal">rasqal_new_decimal_literal_from_decimal</link>
                                                        (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         unsigned <link linkend="char">char</link> *string,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *decimal);
<link linkend="rasqal-literal">rasqal_literal</link>*     <link linkend="rasqal-new-literal-from-literal">rasqal_new_literal_from_literal</link>     (<link linkend="rasqal-literal">rasqal_literal</link> *l);
<link linkend="void">void</link>                <link linkend="rasqal-free-literal">rasqal_free_literal</link>                 (<link linkend="rasqal-literal">rasqal_literal</link> *l);
<link linkend="void">void</link>                <link linkend="rasqal-literal-print">rasqal_literal_print</link>                (<link linkend="rasqal-literal">rasqal_literal</link> *l,
                                                         <link linkend="FILE:CAPS">FILE</link> *fh);
<link linkend="void">void</link>                <link linkend="rasqal-literal-print-type">rasqal_literal_print_type</link>           (<link linkend="rasqal-literal">rasqal_literal</link> *l,
                                                         <link linkend="FILE:CAPS">FILE</link> *fh);
<link linkend="rasqal-variable">rasqal_variable</link>*    <link linkend="rasqal-literal-as-variable">rasqal_literal_as_variable</link>          (<link linkend="rasqal-literal">rasqal_literal</link> *l);
const unsigned <link linkend="char">char</link>* <link linkend="rasqal-literal-as-string">rasqal_literal_as_string</link>           (<link linkend="rasqal-literal">rasqal_literal</link> *l);
const unsigned <link linkend="char">char</link>* <link linkend="rasqal-literal-as-string-flags">rasqal_literal_as_string_flags</link>     (<link linkend="rasqal-literal">rasqal_literal</link> *l,
                                                         <link linkend="int">int</link> flags,
                                                         <link linkend="int">int</link> *error);
<link linkend="rasqal-literal">rasqal_literal</link>*     <link linkend="rasqal-literal-as-node">rasqal_literal_as_node</link>              (<link linkend="rasqal-literal">rasqal_literal</link> *l);
<link linkend="raptor-uri">raptor_uri</link>*         <link linkend="rasqal-literal-datatype">rasqal_literal_datatype</link>             (<link linkend="rasqal-literal">rasqal_literal</link> *l);
<link linkend="rasqal-literal">rasqal_literal</link>*     <link linkend="rasqal-literal-value">rasqal_literal_value</link>                (<link linkend="rasqal-literal">rasqal_literal</link> *l);
<link linkend="int">int</link>                 <link linkend="rasqal-literal-compare">rasqal_literal_compare</link>              (<link linkend="rasqal-literal">rasqal_literal</link> *l1,
                                                         <link linkend="rasqal-literal">rasqal_literal</link> *l2,
                                                         <link linkend="int">int</link> flags,
                                                         <link linkend="int">int</link> *error);
<link linkend="int">int</link>                 <link linkend="rasqal-literal-equals">rasqal_literal_equals</link>               (<link linkend="rasqal-literal">rasqal_literal</link> *l1,
                                                         <link linkend="rasqal-literal">rasqal_literal</link> *l2);
<link linkend="rasqal-prefix">rasqal_prefix</link>*      <link linkend="rasqal-new-prefix">rasqal_new_prefix</link>                   (unsigned <link linkend="char">char</link> *prefix,
                                                         <link linkend="raptor-uri">raptor_uri</link> *uri);
<link linkend="void">void</link>                <link linkend="rasqal-free-prefix">rasqal_free_prefix</link>                  (<link linkend="rasqal-prefix">rasqal_prefix</link> *p);
<link linkend="void">void</link>                <link linkend="rasqal-prefix-print">rasqal_prefix_print</link>                 (<link linkend="rasqal-prefix">rasqal_prefix</link> *p,
                                                         <link linkend="FILE:CAPS">FILE</link> *fh);
<link linkend="rasqal-triple">rasqal_triple</link>*      <link linkend="rasqal-new-triple">rasqal_new_triple</link>                   (<link linkend="rasqal-literal">rasqal_literal</link> *subject,
                                                         <link linkend="rasqal-literal">rasqal_literal</link> *predicate,
                                                         <link linkend="rasqal-literal">rasqal_literal</link> *object);
<link linkend="rasqal-triple">rasqal_triple</link>*      <link linkend="rasqal-new-triple-from-triple">rasqal_new_triple_from_triple</link>       (<link linkend="rasqal-triple">rasqal_triple</link> *t);
<link linkend="void">void</link>                <link linkend="rasqal-free-triple">rasqal_free_triple</link>                  (<link linkend="rasqal-triple">rasqal_triple</link> *t);
<link linkend="void">void</link>                <link linkend="rasqal-triple-print">rasqal_triple_print</link>                 (<link linkend="rasqal-triple">rasqal_triple</link> *t,
                                                         <link linkend="FILE:CAPS">FILE</link> *fh);
<link linkend="void">void</link>                <link linkend="rasqal-triple-set-origin">rasqal_triple_set_origin</link>            (<link linkend="rasqal-triple">rasqal_triple</link> *t,
                                                         <link linkend="rasqal-literal">rasqal_literal</link> *l);
<link linkend="rasqal-literal">rasqal_literal</link>*     <link linkend="rasqal-triple-get-origin">rasqal_triple_get_origin</link>            (<link linkend="rasqal-triple">rasqal_triple</link> *t);
<link linkend="rasqal-variable">rasqal_variable</link>*    <link linkend="rasqal-new-variable-typed">rasqal_new_variable_typed</link>           (<link linkend="rasqal-query">rasqal_query</link> *rq,
                                                         <link linkend="rasqal-variable-type">rasqal_variable_type</link> type,
                                                         unsigned <link linkend="char">char</link> *name,
                                                         <link linkend="rasqal-literal">rasqal_literal</link> *value);
<link linkend="rasqal-variable">rasqal_variable</link>*    <link linkend="rasqal-new-variable">rasqal_new_variable</link>                 (<link linkend="rasqal-query">rasqal_query</link> *rq,
                                                         unsigned <link linkend="char">char</link> *name,
                                                         <link linkend="rasqal-literal">rasqal_literal</link> *value);
<link linkend="rasqal-variable">rasqal_variable</link>*    <link linkend="rasqal-new-variable-from-variable">rasqal_new_variable_from_variable</link>   (<link linkend="rasqal-variable">rasqal_variable</link> *v);
<link linkend="void">void</link>                <link linkend="rasqal-free-variable">rasqal_free_variable</link>                (<link linkend="rasqal-variable">rasqal_variable</link> *v);
<link linkend="void">void</link>                <link linkend="rasqal-variable-print">rasqal_variable_print</link>               (<link linkend="rasqal-variable">rasqal_variable</link> *v,
                                                         <link linkend="FILE:CAPS">FILE</link> *fh);
<link linkend="void">void</link>                <link linkend="rasqal-variable-set-value">rasqal_variable_set_value</link>           (<link linkend="rasqal-variable">rasqal_variable</link> *v,
                                                         <link linkend="rasqal-literal">rasqal_literal</link> *l);
<link linkend="void">void</link>                <link linkend="rasqal-free-memory">rasqal_free_memory</link>                  (<link linkend="void">void</link> *ptr);
<link linkend="void">void</link>*               <link linkend="rasqal-alloc-memory">rasqal_alloc_memory</link>                 (<link linkend="size-t">size_t</link> size);
<link linkend="void">void</link>*               <link linkend="rasqal-calloc-memory">rasqal_calloc_memory</link>                (<link linkend="size-t">size_t</link> nmemb,
                                                         <link linkend="size-t">size_t</link> size);
<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link>* <link linkend="rasqal-new-xsd-decimal">rasqal_new_xsd_decimal</link>              (void);
<link linkend="void">void</link>                <link linkend="rasqal-free-xsd-decimal">rasqal_free_xsd_decimal</link>             (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *dec);
<link linkend="int">int</link>                 <link linkend="rasqal-xsd-decimal-set-string">rasqal_xsd_decimal_set_string</link>       (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *dec,
                                                         const <link linkend="char">char</link> *string);
<link linkend="double">double</link>              <link linkend="rasqal-xsd-decimal-get-double">rasqal_xsd_decimal_get_double</link>       (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *dec);
<link linkend="char">char</link>*               <link linkend="rasqal-xsd-decimal-as-string">rasqal_xsd_decimal_as_string</link>        (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *dec);
<link linkend="char">char</link>*               <link linkend="rasqal-xsd-decimal-as-counted-string">rasqal_xsd_decimal_as_counted_string</link>
                                                        (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *dec,
                                                         <link linkend="size-t">size_t</link> *len_p);
<link linkend="int">int</link>                 <link linkend="rasqal-xsd-decimal-set-long">rasqal_xsd_decimal_set_long</link>         (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *dec,
                                                         long <link linkend="l">l</link> );
<link linkend="int">int</link>                 <link linkend="rasqal-xsd-decimal-set-double">rasqal_xsd_decimal_set_double</link>       (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *dec,
                                                         <link linkend="double">double</link> d);
<link linkend="int">int</link>                 <link linkend="rasqal-xsd-decimal-print">rasqal_xsd_decimal_print</link>            (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *dec,
                                                         <link linkend="FILE:CAPS">FILE</link> *stream);
<link linkend="int">int</link>                 <link linkend="rasqal-xsd-decimal-add">rasqal_xsd_decimal_add</link>              (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *result,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *a,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *b);
<link linkend="int">int</link>                 <link linkend="rasqal-xsd-decimal-subtract">rasqal_xsd_decimal_subtract</link>         (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *result,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *a,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *b);
<link linkend="int">int</link>                 <link linkend="rasqal-xsd-decimal-multiply">rasqal_xsd_decimal_multiply</link>         (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *result,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *a,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *b);
<link linkend="int">int</link>                 <link linkend="rasqal-xsd-decimal-divide">rasqal_xsd_decimal_divide</link>           (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *result,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *a,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *b);
<link linkend="int">int</link>                 <link linkend="rasqal-xsd-decimal-negate">rasqal_xsd_decimal_negate</link>           (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *result,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *a);
<link linkend="int">int</link>                 <link linkend="rasqal-xsd-decimal-compare">rasqal_xsd_decimal_compare</link>          (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *a,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *b);
<link linkend="int">int</link>                 <link linkend="rasqal-xsd-decimal-equals">rasqal_xsd_decimal_equals</link>           (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *a,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *b);
<link linkend="int">int</link>                 <link linkend="rasqal-xsd-decimal-is-zero">rasqal_xsd_decimal_is_zero</link>          (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *d);
enum                <link linkend="rasqal-triple-parts">rasqal_triple_parts</link>;
<link linkend="rasqal-triple-parts">rasqal_triple_parts</link> <link linkend="bind-match">bind_match</link>                          (<link linkend="struct-rasqal-triples-match-s">struct rasqal_triples_match_s</link> *,
                                                         <link linkend="void">void</link> *user_data,
                                                         <link linkend="rasqal-variable">rasqal_variable</link> *bindings[4],
                                                         <link linkend="rasqal-triple-parts">rasqal_triple_parts</link> parts);
<link linkend="void">void</link>                <link linkend="next-match">next_match</link>                          (<link linkend="struct-rasqal-triples-match-s">struct rasqal_triples_match_s</link> *,
                                                         <link linkend="void">void</link> *user_data);
<link linkend="int">int</link>                 <link linkend="is-end">is_end</link>                              (<link linkend="struct-rasqal-triples-match-s">struct rasqal_triples_match_s</link> *,
                                                         <link linkend="void">void</link> *user_data);
<link linkend="void">void</link>                <link linkend="finish">finish</link>                              (<link linkend="struct-rasqal-triples-match-s">struct rasqal_triples_match_s</link> *,
                                                         <link linkend="void">void</link> *user_data);
typedef             <link linkend="rasqal-triples-match">rasqal_triples_match</link>;
                    <link linkend="rasqal-triple-meta">rasqal_triple_meta</link>;
<link linkend="int">int</link>                 <link linkend="init-triples-match">init_triples_match</link>                  (<link linkend="rasqal-triples-match">rasqal_triples_match</link> *rtm,
                                                         <link linkend="struct-rasqal-triples-source-s">struct rasqal_triples_source_s</link> *rts,
                                                         <link linkend="void">void</link> *user_data,
                                                         <link linkend="rasqal-triple-meta">rasqal_triple_meta</link> *m,
                                                         <link linkend="rasqal-triple">rasqal_triple</link> *t);
<link linkend="int">int</link>                 <link linkend="triple-present">triple_present</link>                      (<link linkend="struct-rasqal-triples-source-s">struct rasqal_triples_source_s</link> *rts,
                                                         <link linkend="void">void</link> *user_data,
                                                         <link linkend="rasqal-triple">rasqal_triple</link> *t);
<link linkend="void">void</link>                <link linkend="free-triples-source">free_triples_source</link>                 (<link linkend="void">void</link> *user_data);
typedef             <link linkend="rasqal-triples-source">rasqal_triples_source</link>;
                    <link linkend="rasqal-triples-source-factory">rasqal_triples_source_factory</link>;
<link linkend="void">void</link>                <link linkend="rasqal-set-triples-source-factory">rasqal_set_triples_source_factory</link>   (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         <link linkend="void">void</link> (register_fnrasqal_triples_source_factory *factory) (),
                                                         <link linkend="void">void</link> *user_data);
</synopsis>
</refsynopsisdiv>









<refsect1 id="rasqal-rasqal.description" role="desc">
<title role="desc.title">Description</title>
<para>

</para>
</refsect1>

<refsect1 id="rasqal-rasqal.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="RASQAL-API:CAPS" role="macro">
<title>RASQAL_API</title>
<indexterm zone="RASQAL-API:CAPS"><primary>RASQAL_API</primary></indexterm><programlisting>#define             RASQAL_API</programlisting>
<para>
Macro for wrapping API function call declarations.</para>
<para>

</para></refsect2>
<refsect2 id="RASQAL-DEPRECATED:CAPS" role="macro">
<title>RASQAL_DEPRECATED</title>
<indexterm zone="RASQAL-DEPRECATED:CAPS"><primary>RASQAL_DEPRECATED</primary></indexterm><programlisting>#define             RASQAL_DEPRECATED</programlisting>
<para>
When defined before a function, indicates that the function
has been deprecated and may be replaced in a future release.
With some versions of gcc this may give a compilation warning.
</para></refsect2>
<refsect2 id="rasqal-version-major" role="variable">
<title>rasqal_version_major</title>
<indexterm zone="rasqal-version-major"><primary>rasqal_version_major</primary></indexterm><programlisting>extern const unsigned int rasqal_version_major;
</programlisting>
<para>
Library major version number as a decimal integer.</para>
<para>

</para></refsect2>
<refsect2 id="rasqal-version-minor" role="variable">
<title>rasqal_version_minor</title>
<indexterm zone="rasqal-version-minor"><primary>rasqal_version_minor</primary></indexterm><programlisting>extern const unsigned int rasqal_version_minor;
</programlisting>
<para>
Library minor version number as a decimal integer.</para>
<para>

</para></refsect2>
<refsect2 id="rasqal-version-release" role="variable">
<title>rasqal_version_release</title>
<indexterm zone="rasqal-version-release"><primary>rasqal_version_release</primary></indexterm><programlisting>extern const unsigned int rasqal_version_release;
</programlisting>
<para>
Library release version number as a decimal integer.</para>
<para>

</para></refsect2>
<refsect2 id="rasqal-version-decimal" role="variable">
<title>rasqal_version_decimal</title>
<indexterm zone="rasqal-version-decimal"><primary>rasqal_version_decimal</primary></indexterm><programlisting>extern const unsigned int rasqal_version_decimal;
</programlisting>
<para>
Library full version as a decimal integer.
</para>
<para>
See also <link linkend="rasqal-version-string"><type>rasqal_version_string</type></link>.</para>
<para>

</para></refsect2>
<refsect2 id="RASQAL-WORLD-DECLARED:CAPS" role="macro">
<title>RASQAL_WORLD_DECLARED</title>
<indexterm zone="RASQAL-WORLD-DECLARED:CAPS"><primary>RASQAL_WORLD_DECLARED</primary></indexterm><programlisting>#define RASQAL_WORLD_DECLARED 1
</programlisting>
<para>

</para></refsect2>
<refsect2 id="rasqal-world" role="typedef">
<title>rasqal_world</title>
<indexterm zone="rasqal-world"><primary>rasqal_world</primary></indexterm><programlisting>typedef struct rasqal_world_s rasqal_world;
</programlisting>
<para>
Rasqal world class.</para>
<para>

</para></refsect2>
<refsect2 id="rasqal-query" role="typedef">
<title>rasqal_query</title>
<indexterm zone="rasqal-query"><primary>rasqal_query</primary></indexterm><programlisting>typedef struct rasqal_query_s rasqal_query;
</programlisting>
<para>
Rasqal query class.</para>
<para>

</para></refsect2>
<refsect2 id="rasqal-query-results" role="typedef">
<title>rasqal_query_results</title>
<indexterm zone="rasqal-query-results"><primary>rasqal_query_results</primary></indexterm><programlisting>typedef struct rasqal_query_results_s rasqal_query_results;
</programlisting>
<para>
Rasqal query results class.</para>
<para>

</para></refsect2>
<refsect2 id="RASQAL-QUERY-RESULTS-FORMATTER-DECLARED:CAPS" role="macro">
<title>RASQAL_QUERY_RESULTS_FORMATTER_DECLARED</title>
<indexterm zone="RASQAL-QUERY-RESULTS-FORMATTER-DECLARED:CAPS"><primary>RASQAL_QUERY_RESULTS_FORMATTER_DECLARED</primary></indexterm><programlisting>#define RASQAL_QUERY_RESULTS_FORMATTER_DECLARED 1
</programlisting>
<para>

</para></refsect2>
<refsect2 id="rasqal-query-results-formatter" role="typedef">
<title>rasqal_query_results_formatter</title>
<indexterm zone="rasqal-query-results-formatter"><primary>rasqal_query_results_formatter</primary></indexterm><programlisting>typedef struct rasqal_query_results_formatter_s rasqal_query_results_formatter;
</programlisting>
<para>
Rasqal query results formatter class.</para>
<para>

</para></refsect2>
<refsect2 id="rasqal-literal" role="typedef">
<title>rasqal_literal</title>
<indexterm zone="rasqal-literal"><primary>rasqal_literal</primary></indexterm><programlisting>typedef struct rasqal_literal_s rasqal_literal;
</programlisting>
<para>
Rasqal literal class.</para>
<para>

</para></refsect2>
<refsect2 id="rasqal-graph-pattern" role="typedef">
<title>rasqal_graph_pattern</title>
<indexterm zone="rasqal-graph-pattern"><primary>rasqal_graph_pattern</primary></indexterm><programlisting>typedef struct rasqal_graph_pattern_s rasqal_graph_pattern;
</programlisting>
<para>
Rasqal graph pattern class.</para>
<para>

</para></refsect2>
<refsect2 id="rasqal-feature" role="enum">
<title>enum rasqal_feature</title>
<indexterm zone="rasqal-feature"><primary>rasqal_feature</primary></indexterm><programlisting>typedef enum {
  RASQAL_FEATURE_NO_NET,
  RASQAL_FEATURE_LAST = RASQAL_FEATURE_NO_NET
} rasqal_feature;
</programlisting>
<para>
Query features.
</para>
<para>
None currently defined.</para>
<para>

</para><variablelist role="enum">
<varlistentry id="RASQAL-FEATURE-NO-NET:CAPS" role="constant">
<term><literal>RASQAL_FEATURE_NO_NET</literal></term>
<listitem><simpara> Deny network requests.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-FEATURE-LAST:CAPS" role="constant">
<term><literal>RASQAL_FEATURE_LAST</literal></term>
<listitem><simpara> Internal.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-prefix" role="struct">
<title>rasqal_prefix</title>
<indexterm zone="rasqal-prefix"><primary>rasqal_prefix</primary></indexterm><programlisting>typedef struct {
  const unsigned char *prefix;
  raptor_uri* uri;
  int declared;
  int depth;
} rasqal_prefix;
</programlisting>
<para>
Namespace (prefix, uri) pair.
</para>
<para>
Includes internal flags used for marking when prefixes are
declared and at what XML element depth when used in XML formats.</para>
<para>

</para><variablelist role="struct">
<varlistentry>
<term><link linkend="raptor-uri">raptor_uri</link>&nbsp;*<structfield>uri</structfield>;</term>
<listitem><simpara> URI associated with the prefix.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="int">int</link>&nbsp;<structfield>declared</structfield>;</term>
<listitem><simpara> Internal flag.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="int">int</link>&nbsp;<structfield>depth</structfield>;</term>
<listitem><simpara> Internal flag.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-variable-type" role="enum">
<title>enum rasqal_variable_type</title>
<indexterm zone="rasqal-variable-type"><primary>rasqal_variable_type</primary></indexterm><programlisting>typedef enum {
  RASQAL_VARIABLE_TYPE_UNKNOWN   = 0,
  RASQAL_VARIABLE_TYPE_NORMAL    = 1,
  RASQAL_VARIABLE_TYPE_ANONYMOUS = 2
} rasqal_variable_type;
</programlisting>
<para>
Rasqal variable types.
</para>
<para>
ANONYMOUS can be used in queries but cannot be returned in a
result.</para>
<para>

</para><variablelist role="enum">
<varlistentry id="RASQAL-VARIABLE-TYPE-UNKNOWN:CAPS" role="constant">
<term><literal>RASQAL_VARIABLE_TYPE_UNKNOWN</literal></term>
<listitem><simpara> Internal.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-VARIABLE-TYPE-NORMAL:CAPS" role="constant">
<term><literal>RASQAL_VARIABLE_TYPE_NORMAL</literal></term>
<listitem><simpara> The regular variable type.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-VARIABLE-TYPE-ANONYMOUS:CAPS" role="constant">
<term><literal>RASQAL_VARIABLE_TYPE_ANONYMOUS</literal></term>
<listitem><simpara> Anonymous variable type.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-expression-s" role="struct">
<title>struct rasqal_expression_s</title>
<indexterm zone="rasqal-expression-s"><primary>rasqal_expression_s</primary></indexterm><programlisting>struct rasqal_expression_s;</programlisting>
<para>
Internal - see <link linkend="rasqal-expression"><type>rasqal_expression</type></link>.</para>
<para>

</para><variablelist role="struct">
</variablelist></refsect2>
<refsect2 id="rasqal-variable" role="struct">
<title>rasqal_variable</title>
<indexterm zone="rasqal-variable"><primary>rasqal_variable</primary></indexterm><programlisting>typedef struct {
  const unsigned char *name;
  rasqal_literal* value;
  int offset;
  rasqal_variable_type type;
  struct rasqal_expression_s* expression;
} rasqal_variable;
</programlisting>
<para>
Binding between a variable name and a value.
</para>
<para>
Includes internal field <parameter>offset</parameter> for recording the offset into the
(internal) rasqal_query variables array.</para>
<para>

</para><variablelist role="struct">
<varlistentry>
<term><link linkend="rasqal-literal">rasqal_literal</link>&nbsp;*<structfield>value</structfield>;</term>
<listitem><simpara> Variable value or NULL if unbound.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="int">int</link>&nbsp;<structfield>offset</structfield>;</term>
<listitem><simpara> Internal.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="rasqal-variable-type">rasqal_variable_type</link>&nbsp;<structfield>type</structfield>;</term>
<listitem><simpara> Variable type.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term>struct&nbsp;<link linkend="rasqal-expression-s">rasqal_expression_s</link>&nbsp;*<structfield>expression</structfield>;</term>
<listitem><simpara> Expression when the variable is a computed SELECT expression 
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-data-graph-flags" role="enum">
<title>enum rasqal_data_graph_flags</title>
<indexterm zone="rasqal-data-graph-flags"><primary>rasqal_data_graph_flags</primary></indexterm><programlisting>typedef enum {
  RASQAL_DATA_GRAPH_NONE  = 0,
  RASQAL_DATA_GRAPH_NAMED = 1,
  RASQAL_DATA_GRAPH_BACKGROUND = 2,
} rasqal_data_graph_flags;
</programlisting>
<para>
Flags for the type of <link linkend="rasqal-data-graph"><type>rasqal_data_graph</type></link>.
</para>
<para>
These are used by <link linkend="rasqal-query-add-data-graph"><function>rasqal_query_add_data_graph()</function></link>. See <link linkend="rasqal-data-graph"><type>rasqal_data_graph</type></link>.</para>
<para>

</para><variablelist role="enum">
<varlistentry id="RASQAL-DATA-GRAPH-NONE:CAPS" role="constant">
<term><literal>RASQAL_DATA_GRAPH_NONE</literal></term>
<listitem><simpara> Internal.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-DATA-GRAPH-NAMED:CAPS" role="constant">
<term><literal>RASQAL_DATA_GRAPH_NAMED</literal></term>
<listitem><simpara> Graphs with a source and name.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-DATA-GRAPH-BACKGROUND:CAPS" role="constant">
<term><literal>RASQAL_DATA_GRAPH_BACKGROUND</literal></term>
<listitem><simpara> Graphs with a source only.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-data-graph" role="struct">
<title>rasqal_data_graph</title>
<indexterm zone="rasqal-data-graph"><primary>rasqal_data_graph</primary></indexterm><programlisting>typedef struct {
  raptor_uri* uri;
  raptor_uri* name_uri;
  int flags;
} rasqal_data_graph;
</programlisting>
<para>
A source of RDF data for querying. 
</para>
<para>
The <link linkend="uri"><type>uri</type></link> is the original source (base URI) of the content.  It may
also have an additional name <parameter>name_uri</parameter> as long as <parameter>flags</parameter> is
<link linkend="RASQAL-DATA-NAMED:CAPS"><literal>RASQAL_DATA_NAMED</literal></link></para>
<para>

</para><variablelist role="struct">
<varlistentry>
<term><link linkend="raptor-uri">raptor_uri</link>&nbsp;*<structfield>uri</structfield>;</term>
<listitem><simpara> source URI
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="raptor-uri">raptor_uri</link>&nbsp;*<structfield>name_uri</structfield>;</term>
<listitem><simpara> name of graph for <link linkend="RASQAL-DATA-NAMED:CAPS"><literal>RASQAL_DATA_NAMED</literal></link>
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="int">int</link>&nbsp;<structfield>flags</structfield>;</term>
<listitem><simpara> <link linkend="RASQAL-DATA-GRAPH-NAMED:CAPS"><literal>RASQAL_DATA_GRAPH_NAMED</literal></link> or <link linkend="RASQAL-DATA-GRAPH-BACKGROUND:CAPS"><literal>RASQAL_DATA_GRAPH_BACKGROUND</literal></link>
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-literal-type" role="enum">
<title>enum rasqal_literal_type</title>
<indexterm zone="rasqal-literal-type"><primary>rasqal_literal_type</primary></indexterm><programlisting>typedef enum {
  /* internal */
  RASQAL_LITERAL_UNKNOWN,
  RASQAL_LITERAL_BLANK,
  RASQAL_LITERAL_URI,
  RASQAL_LITERAL_STRING,
  RASQAL_LITERAL_BOOLEAN,
  RASQAL_LITERAL_INTEGER,
  RASQAL_LITERAL_DOUBLE,
  RASQAL_LITERAL_FLOAT,
  RASQAL_LITERAL_DECIMAL,
  RASQAL_LITERAL_DATETIME,
  /* internal */
  RASQAL_LITERAL_FIRST_XSD = RASQAL_LITERAL_STRING,
  /* internal */
  RASQAL_LITERAL_LAST_XSD = RASQAL_LITERAL_DATETIME,
  RASQAL_LITERAL_PATTERN,
  RASQAL_LITERAL_QNAME,
  RASQAL_LITERAL_VARIABLE,
  /* internal */
  RASQAL_LITERAL_LAST= RASQAL_LITERAL_VARIABLE
} rasqal_literal_type;
</programlisting>
<para>
Types of literal.
</para>
<para>
The order in the enumeration is significant as it encodes
the SPARQL term ordering conditions:
</para>
<para>
  Blank Nodes &lt;&lt; IRIS &lt;&lt; RDF literals &lt;&lt; typed literals
</para>
<para>
which coresponds to in enum values
</para>
<para>
  BLANK &lt;&lt; URI &lt;&lt; STRING &lt;&lt; 
    (BOOLEAN | INTEGER | DOUBLE | FLOAT | DECIMAL | DATETIME)
    (RASQAL_LITERAL_FIRST_XSD ... RASQAL_LITERAL_LAST_XSD)
</para>
<para>
Not used (internal): PATTERN, QNAME, VARIABLE
</para>
<para>
See <link linkend="rasqal-literal-compare"><function>rasqal_literal_compare()</function></link> when used with flags
<link linkend="RASQAL-COMPARE-XQUERY:CAPS"><literal>RASQAL_COMPARE_XQUERY</literal></link></para>
<para>

</para><variablelist role="enum">
<varlistentry id="RASQAL-LITERAL-UNKNOWN:CAPS" role="constant">
<term><literal>RASQAL_LITERAL_UNKNOWN</literal></term>
<listitem><simpara> Internal.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-LITERAL-BLANK:CAPS" role="constant">
<term><literal>RASQAL_LITERAL_BLANK</literal></term>
<listitem><simpara> RDF blank node literal (SPARQL r:bNode)
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-LITERAL-URI:CAPS" role="constant">
<term><literal>RASQAL_LITERAL_URI</literal></term>
<listitem><simpara> RDF URI Literal (SPARQL r:URI)
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-LITERAL-STRING:CAPS" role="constant">
<term><literal>RASQAL_LITERAL_STRING</literal></term>
<listitem><simpara> RDF Literal / xsd:string (SPARQL r:Literal)
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-LITERAL-BOOLEAN:CAPS" role="constant">
<term><literal>RASQAL_LITERAL_BOOLEAN</literal></term>
<listitem><simpara> Boolean literal xsd:boolean.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-LITERAL-INTEGER:CAPS" role="constant">
<term><literal>RASQAL_LITERAL_INTEGER</literal></term>
<listitem><simpara> Integer literal xsd:integer.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-LITERAL-DOUBLE:CAPS" role="constant">
<term><literal>RASQAL_LITERAL_DOUBLE</literal></term>
<listitem><simpara> Double floating point literal xsd:double.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-LITERAL-FLOAT:CAPS" role="constant">
<term><literal>RASQAL_LITERAL_FLOAT</literal></term>
<listitem><simpara> Floating point literal xsd:float.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-LITERAL-DECIMAL:CAPS" role="constant">
<term><literal>RASQAL_LITERAL_DECIMAL</literal></term>
<listitem><simpara> Decimal integer xsd:decimal.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-LITERAL-DATETIME:CAPS" role="constant">
<term><literal>RASQAL_LITERAL_DATETIME</literal></term>
<listitem><simpara> Date/Time literal xsd:dateTime.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-LITERAL-FIRST-XSD:CAPS" role="constant">
<term><literal>RASQAL_LITERAL_FIRST_XSD</literal></term>
<listitem><simpara> Internal.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-LITERAL-LAST-XSD:CAPS" role="constant">
<term><literal>RASQAL_LITERAL_LAST_XSD</literal></term>
<listitem><simpara> Internal.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-LITERAL-PATTERN:CAPS" role="constant">
<term><literal>RASQAL_LITERAL_PATTERN</literal></term>
<listitem><simpara> Pattern literal for a regex.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-LITERAL-QNAME:CAPS" role="constant">
<term><literal>RASQAL_LITERAL_QNAME</literal></term>
<listitem><simpara> XML Qname literal.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-LITERAL-VARIABLE:CAPS" role="constant">
<term><literal>RASQAL_LITERAL_VARIABLE</literal></term>
<listitem><simpara> Variable literal.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-LITERAL-LAST:CAPS" role="constant">
<term><literal>RASQAL_LITERAL_LAST</literal></term>
<listitem><simpara> Internal.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-xsd-decimal" role="typedef">
<title>rasqal_xsd_decimal</title>
<indexterm zone="rasqal-xsd-decimal"><primary>rasqal_xsd_decimal</primary></indexterm><programlisting>typedef struct rasqal_xsd_decimal_s rasqal_xsd_decimal;
</programlisting>
<para>
Rasqal XSD Decimal class.</para>
<para>

</para></refsect2>
<refsect2 id="rasqal-op" role="enum">
<title>enum rasqal_op</title>
<indexterm zone="rasqal-op"><primary>rasqal_op</primary></indexterm><programlisting>typedef enum {
  /* internal */
  RASQAL_EXPR_UNKNOWN,
  RASQAL_EXPR_AND,
  RASQAL_EXPR_OR,
  RASQAL_EXPR_EQ,
  RASQAL_EXPR_NEQ,
  RASQAL_EXPR_LT,
  RASQAL_EXPR_GT,
  RASQAL_EXPR_LE,
  RASQAL_EXPR_GE,
  RASQAL_EXPR_UMINUS,
  RASQAL_EXPR_PLUS,
  RASQAL_EXPR_MINUS,
  RASQAL_EXPR_STAR,
  RASQAL_EXPR_SLASH,
  RASQAL_EXPR_REM,
  RASQAL_EXPR_STR_EQ,
  RASQAL_EXPR_STR_NEQ,
  RASQAL_EXPR_STR_MATCH,
  RASQAL_EXPR_STR_NMATCH,
  RASQAL_EXPR_TILDE,
  RASQAL_EXPR_BANG,
  RASQAL_EXPR_LITERAL,
  RASQAL_EXPR_FUNCTION,
  RASQAL_EXPR_BOUND,
  RASQAL_EXPR_STR,
  RASQAL_EXPR_LANG,
  RASQAL_EXPR_DATATYPE,
  RASQAL_EXPR_ISURI,
  RASQAL_EXPR_ISBLANK,
  RASQAL_EXPR_ISLITERAL,
  RASQAL_EXPR_CAST,
  RASQAL_EXPR_ORDER_COND_ASC,
  RASQAL_EXPR_ORDER_COND_DESC,
  RASQAL_EXPR_LANGMATCHES,
  RASQAL_EXPR_REGEX,
  RASQAL_EXPR_GROUP_COND_ASC,
  RASQAL_EXPR_GROUP_COND_DESC,
  RASQAL_EXPR_COUNT,
  RASQAL_EXPR_VARSTAR,
  RASQAL_EXPR_SAMETERM,
  /* internal */
  RASQAL_EXPR_LAST= RASQAL_EXPR_SAMETERM
} rasqal_op;
</programlisting>
<para>
Rasqal expression operators.  A mixture of unary, binary and
tertiary operators (string matches).  Also includes casting and
two ordering operators from ORDER BY in SPARQL.</para>
<para>

</para><variablelist role="enum">
<varlistentry id="RASQAL-EXPR-UNKNOWN:CAPS" role="constant">
<term><literal>RASQAL_EXPR_UNKNOWN</literal></term>
<listitem><simpara> Internal
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-AND:CAPS" role="constant">
<term><literal>RASQAL_EXPR_AND</literal></term>
<listitem><simpara> Expression for AND(A, B)
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-OR:CAPS" role="constant">
<term><literal>RASQAL_EXPR_OR</literal></term>
<listitem><simpara> Expression for OR(A, B)
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-EQ:CAPS" role="constant">
<term><literal>RASQAL_EXPR_EQ</literal></term>
<listitem><simpara> Expression for A equals B
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-NEQ:CAPS" role="constant">
<term><literal>RASQAL_EXPR_NEQ</literal></term>
<listitem><simpara> Expression for A not equals B.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-LT:CAPS" role="constant">
<term><literal>RASQAL_EXPR_LT</literal></term>
<listitem><simpara> Expression for A less than B.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-GT:CAPS" role="constant">
<term><literal>RASQAL_EXPR_GT</literal></term>
<listitem><simpara> Expression for A greather than B.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-LE:CAPS" role="constant">
<term><literal>RASQAL_EXPR_LE</literal></term>
<listitem><simpara> Expression for A less than or equal to B.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-GE:CAPS" role="constant">
<term><literal>RASQAL_EXPR_GE</literal></term>
<listitem><simpara> Expression for A greater than or equal to B.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-UMINUS:CAPS" role="constant">
<term><literal>RASQAL_EXPR_UMINUS</literal></term>
<listitem><simpara> Expression for -A.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-PLUS:CAPS" role="constant">
<term><literal>RASQAL_EXPR_PLUS</literal></term>
<listitem><simpara> Expression for +A.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-MINUS:CAPS" role="constant">
<term><literal>RASQAL_EXPR_MINUS</literal></term>
<listitem><simpara> Expression for A-B.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-STAR:CAPS" role="constant">
<term><literal>RASQAL_EXPR_STAR</literal></term>
<listitem><simpara> Expression for A*B.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-SLASH:CAPS" role="constant">
<term><literal>RASQAL_EXPR_SLASH</literal></term>
<listitem><simpara> Expression for A/B.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-REM:CAPS" role="constant">
<term><literal>RASQAL_EXPR_REM</literal></term>
<listitem><simpara> Expression for A/B remainder.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-STR-EQ:CAPS" role="constant">
<term><literal>RASQAL_EXPR_STR_EQ</literal></term>
<listitem><simpara> Expression for A string equals B.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-STR-NEQ:CAPS" role="constant">
<term><literal>RASQAL_EXPR_STR_NEQ</literal></term>
<listitem><simpara> Expression for A string not-equals B.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-STR-MATCH:CAPS" role="constant">
<term><literal>RASQAL_EXPR_STR_MATCH</literal></term>
<listitem><simpara> Expression for string A matches literal regex B with flags.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-STR-NMATCH:CAPS" role="constant">
<term><literal>RASQAL_EXPR_STR_NMATCH</literal></term>
<listitem><simpara> Expression for string A not-matches literal regex B with flags.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-TILDE:CAPS" role="constant">
<term><literal>RASQAL_EXPR_TILDE</literal></term>
<listitem><simpara> Expression for binary not A.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-BANG:CAPS" role="constant">
<term><literal>RASQAL_EXPR_BANG</literal></term>
<listitem><simpara> Expression for logical not A.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-LITERAL:CAPS" role="constant">
<term><literal>RASQAL_EXPR_LITERAL</literal></term>
<listitem><simpara> Expression for a <link linkend="rasqal-literal"><type>rasqal_literal</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-FUNCTION:CAPS" role="constant">
<term><literal>RASQAL_EXPR_FUNCTION</literal></term>
<listitem><simpara> Expression for a function A with arguments (B...).
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-BOUND:CAPS" role="constant">
<term><literal>RASQAL_EXPR_BOUND</literal></term>
<listitem><simpara> Expression for SPARQL ISBOUND(A).
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-STR:CAPS" role="constant">
<term><literal>RASQAL_EXPR_STR</literal></term>
<listitem><simpara> Expression for SPARQL STR(A).
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-LANG:CAPS" role="constant">
<term><literal>RASQAL_EXPR_LANG</literal></term>
<listitem><simpara> Expression for SPARQL LANG(A).
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-DATATYPE:CAPS" role="constant">
<term><literal>RASQAL_EXPR_DATATYPE</literal></term>
<listitem><simpara> Expression for SPARQL DATATYPE(A).
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-ISURI:CAPS" role="constant">
<term><literal>RASQAL_EXPR_ISURI</literal></term>
<listitem><simpara> Expression for SPARQL ISURI(A).
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-ISBLANK:CAPS" role="constant">
<term><literal>RASQAL_EXPR_ISBLANK</literal></term>
<listitem><simpara> Expression for SPARQL ISBLANK(A).
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-ISLITERAL:CAPS" role="constant">
<term><literal>RASQAL_EXPR_ISLITERAL</literal></term>
<listitem><simpara> Expression for SPARQL ISLITERAL(A).
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-CAST:CAPS" role="constant">
<term><literal>RASQAL_EXPR_CAST</literal></term>
<listitem><simpara> Expression for cast literal A to type B.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-ORDER-COND-ASC:CAPS" role="constant">
<term><literal>RASQAL_EXPR_ORDER_COND_ASC</literal></term>
<listitem><simpara> Expression for SPARQL order condition ascending.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-ORDER-COND-DESC:CAPS" role="constant">
<term><literal>RASQAL_EXPR_ORDER_COND_DESC</literal></term>
<listitem><simpara> Expression for SPARQL order condition descending.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-LANGMATCHES:CAPS" role="constant">
<term><literal>RASQAL_EXPR_LANGMATCHES</literal></term>
<listitem><simpara> Expression for SPARQL LANGMATCHES(A, B).
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-REGEX:CAPS" role="constant">
<term><literal>RASQAL_EXPR_REGEX</literal></term>
<listitem><simpara> Expression for string A matches expression regex B with flags.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-GROUP-COND-ASC:CAPS" role="constant">
<term><literal>RASQAL_EXPR_GROUP_COND_ASC</literal></term>
<listitem><simpara> Expression for LAQRS group condition ascending.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-GROUP-COND-DESC:CAPS" role="constant">
<term><literal>RASQAL_EXPR_GROUP_COND_DESC</literal></term>
<listitem><simpara> Expression for LAQRS group condition descending.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-COUNT:CAPS" role="constant">
<term><literal>RASQAL_EXPR_COUNT</literal></term>
<listitem><simpara> Expression for LAQRS select <link linkend="COUNT:CAPS"><function>COUNT()</function></link>
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-VARSTAR:CAPS" role="constant">
<term><literal>RASQAL_EXPR_VARSTAR</literal></term>
<listitem><simpara> Expression for LAQRS select Variable *
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-SAMETERM:CAPS" role="constant">
<term><literal>RASQAL_EXPR_SAMETERM</literal></term>
<listitem><simpara> Expression for SPARQL sameTerm
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-EXPR-LAST:CAPS" role="constant">
<term><literal>RASQAL_EXPR_LAST</literal></term>
<listitem><simpara> Internal
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-expression" role="typedef">
<title>rasqal_expression</title>
<indexterm zone="rasqal-expression"><primary>rasqal_expression</primary></indexterm><programlisting>typedef struct rasqal_expression_s rasqal_expression;
</programlisting>
<para>
expression (arg1), unary op (arg1), binary op (arg1,arg2),
literal or variable</para>
<para>

</para></refsect2>
<refsect2 id="rasqal-triple-flags" role="enum">
<title>enum rasqal_triple_flags</title>
<indexterm zone="rasqal-triple-flags"><primary>rasqal_triple_flags</primary></indexterm><programlisting>typedef enum {

  /* Not used - was only used internally in the execution engine */
  RASQAL_TRIPLE_FLAGS_EXACT=1,

  /* Not used - this is now a property of a graph pattern */
  RASQAL_TRIPLE_FLAGS_OPTIONAL=2,

  RASQAL_TRIPLE_FLAGS_LAST=RASQAL_TRIPLE_FLAGS_OPTIONAL
} rasqal_triple_flags;
</programlisting>
<para>
Flags for triple patterns.</para>
<para>

</para><variablelist role="enum">
<varlistentry id="RASQAL-TRIPLE-FLAGS-EXACT:CAPS" role="constant">
<term><literal>RASQAL_TRIPLE_FLAGS_EXACT</literal></term>
<listitem><simpara> Not used.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-TRIPLE-FLAGS-OPTIONAL:CAPS" role="constant">
<term><literal>RASQAL_TRIPLE_FLAGS_OPTIONAL</literal></term>
<listitem><simpara> Not used.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-TRIPLE-FLAGS-LAST:CAPS" role="constant">
<term><literal>RASQAL_TRIPLE_FLAGS_LAST</literal></term>
<listitem><simpara> Internal.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-triple" role="struct">
<title>rasqal_triple</title>
<indexterm zone="rasqal-triple"><primary>rasqal_triple</primary></indexterm><programlisting>typedef struct {
  rasqal_literal* subject;
  rasqal_literal* predicate;
  rasqal_literal* object;
  rasqal_literal* origin;
  unsigned int flags;
} rasqal_triple;
</programlisting>
<para>
A triple pattern or RDF triple.
</para>
<para>
This is used as a triple pattern in queries and
an RDF triple when generating RDF triples such as with SPARQL CONSTRUCT.</para>
<para>

</para><variablelist role="struct">
<varlistentry>
<term><link linkend="rasqal-literal">rasqal_literal</link>&nbsp;*<structfield>subject</structfield>;</term>
<listitem><simpara> Triple subject.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="rasqal-literal">rasqal_literal</link>&nbsp;*<structfield>predicate</structfield>;</term>
<listitem><simpara> Triple predicate.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="rasqal-literal">rasqal_literal</link>&nbsp;*<structfield>object</structfield>;</term>
<listitem><simpara> Triple object.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="rasqal-literal">rasqal_literal</link>&nbsp;*<structfield>origin</structfield>;</term>
<listitem><simpara> Triple origin.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term>unsigned&nbsp;<link linkend="int">int</link>&nbsp;<structfield>flags</structfield>;</term>
<listitem><simpara> Or of enum <link linkend="rasqal-triple-flags"><type>rasqal_triple_flags</type></link> bits.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-pattern-flags" role="enum">
<title>enum rasqal_pattern_flags</title>
<indexterm zone="rasqal-pattern-flags"><primary>rasqal_pattern_flags</primary></indexterm><programlisting>typedef enum {
  RASQAL_PATTERN_FLAGS_OPTIONAL=1,

  RASQAL_PATTERN_FLAGS_LAST=RASQAL_PATTERN_FLAGS_OPTIONAL
} rasqal_pattern_flags;
</programlisting>
<para>
Flags for <link linkend="rasqal-graph-pattern"><type>rasqal_graph_pattern</type></link>.</para>
<para>

</para><variablelist role="enum">
<varlistentry id="RASQAL-PATTERN-FLAGS-OPTIONAL:CAPS" role="constant">
<term><literal>RASQAL_PATTERN_FLAGS_OPTIONAL</literal></term>
<listitem><simpara> True when the graph pattern is an optional match.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-PATTERN-FLAGS-LAST:CAPS" role="constant">
<term><literal>RASQAL_PATTERN_FLAGS_LAST</literal></term>
<listitem><simpara> Internal
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-verb" role="enum">
<title>enum rasqal_query_verb</title>
<indexterm zone="rasqal-query-verb"><primary>rasqal_query_verb</primary></indexterm><programlisting>typedef enum {
  /* internal */
  RASQAL_QUERY_VERB_UNKNOWN   = 0,
  RASQAL_QUERY_VERB_SELECT    = 1,
  RASQAL_QUERY_VERB_CONSTRUCT = 2,
  RASQAL_QUERY_VERB_DESCRIBE  = 3,
  RASQAL_QUERY_VERB_ASK       = 4,
  RASQAL_QUERY_VERB_DELETE    = 5,
  RASQAL_QUERY_VERB_INSERT    = 6,

  /* internal */
  RASQAL_QUERY_VERB_LAST=RASQAL_QUERY_VERB_INSERT
} rasqal_query_verb;
</programlisting>
<para>
Query main operation verbs describing the major type of query
being performed.</para>
<para>

</para><variablelist role="enum">
<varlistentry id="RASQAL-QUERY-VERB-UNKNOWN:CAPS" role="constant">
<term><literal>RASQAL_QUERY_VERB_UNKNOWN</literal></term>
<listitem><simpara> Internal
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-QUERY-VERB-SELECT:CAPS" role="constant">
<term><literal>RASQAL_QUERY_VERB_SELECT</literal></term>
<listitem><simpara> RDQL/SPARQL query select verb. 
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-QUERY-VERB-CONSTRUCT:CAPS" role="constant">
<term><literal>RASQAL_QUERY_VERB_CONSTRUCT</literal></term>
<listitem><simpara> SPARQL query construct verb.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-QUERY-VERB-DESCRIBE:CAPS" role="constant">
<term><literal>RASQAL_QUERY_VERB_DESCRIBE</literal></term>
<listitem><simpara> SPARQL query describe verb.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-QUERY-VERB-ASK:CAPS" role="constant">
<term><literal>RASQAL_QUERY_VERB_ASK</literal></term>
<listitem><simpara> SPARQL query ask verb.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-QUERY-VERB-DELETE:CAPS" role="constant">
<term><literal>RASQAL_QUERY_VERB_DELETE</literal></term>
<listitem><simpara> LAQRS query delete verb.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-QUERY-VERB-INSERT:CAPS" role="constant">
<term><literal>RASQAL_QUERY_VERB_INSERT</literal></term>
<listitem><simpara> LAQRS query insert verb.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-QUERY-VERB-LAST:CAPS" role="constant">
<term><literal>RASQAL_QUERY_VERB_LAST</literal></term>
<listitem><simpara> Internal
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-graph-pattern-operator" role="enum">
<title>enum rasqal_graph_pattern_operator</title>
<indexterm zone="rasqal-graph-pattern-operator"><primary>rasqal_graph_pattern_operator</primary></indexterm><programlisting>typedef enum {
  RASQAL_GRAPH_PATTERN_OPERATOR_UNKNOWN   = 0,
  RASQAL_GRAPH_PATTERN_OPERATOR_BASIC     = 1,
  RASQAL_GRAPH_PATTERN_OPERATOR_OPTIONAL  = 2,
  RASQAL_GRAPH_PATTERN_OPERATOR_UNION     = 3,
  RASQAL_GRAPH_PATTERN_OPERATOR_GROUP     = 4,
  RASQAL_GRAPH_PATTERN_OPERATOR_GRAPH     = 5,

  RASQAL_GRAPH_PATTERN_OPERATOR_LAST=RASQAL_GRAPH_PATTERN_OPERATOR_GRAPH
} rasqal_graph_pattern_operator;
</programlisting>
<para>
Graph pattern operators</para>
<para>

</para><variablelist role="enum">
<varlistentry id="RASQAL-GRAPH-PATTERN-OPERATOR-UNKNOWN:CAPS" role="constant">
<term><literal>RASQAL_GRAPH_PATTERN_OPERATOR_UNKNOWN</literal></term>
<listitem><simpara> Internal.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-GRAPH-PATTERN-OPERATOR-BASIC:CAPS" role="constant">
<term><literal>RASQAL_GRAPH_PATTERN_OPERATOR_BASIC</literal></term>
<listitem><simpara> Just triple patterns and constraints.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-GRAPH-PATTERN-OPERATOR-OPTIONAL:CAPS" role="constant">
<term><literal>RASQAL_GRAPH_PATTERN_OPERATOR_OPTIONAL</literal></term>
<listitem><simpara> Set of graph patterns (ANDed) and constraints.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-GRAPH-PATTERN-OPERATOR-UNION:CAPS" role="constant">
<term><literal>RASQAL_GRAPH_PATTERN_OPERATOR_UNION</literal></term>
<listitem><simpara> Set of graph patterns (UNIONed) and constraints.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-GRAPH-PATTERN-OPERATOR-GROUP:CAPS" role="constant">
<term><literal>RASQAL_GRAPH_PATTERN_OPERATOR_GROUP</literal></term>
<listitem><simpara> Set of graph patterns (ANDed) and constraints.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-GRAPH-PATTERN-OPERATOR-GRAPH:CAPS" role="constant">
<term><literal>RASQAL_GRAPH_PATTERN_OPERATOR_GRAPH</literal></term>
<listitem><simpara> A graph term + a graph pattern and constraints.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-GRAPH-PATTERN-OPERATOR-LAST:CAPS" role="constant">
<term><literal>RASQAL_GRAPH_PATTERN_OPERATOR_LAST</literal></term>
<listitem><simpara> Internal.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-graph-pattern-visit-fn" role="function">
<title>rasqal_graph_pattern_visit_fn ()</title>
<indexterm zone="rasqal-graph-pattern-visit-fn"><primary>rasqal_graph_pattern_visit_fn</primary></indexterm><programlisting><link linkend="int">int</link>                 (*rasqal_graph_pattern_visit_fn)    (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *gp,
                                                         <link linkend="void">void</link> *user_data);</programlisting>
<para>
User function to visit an graph_pattern and operate on it with
<link linkend="rasqal-graph-pattern-visit"><function>rasqal_graph_pattern_visit()</function></link> or <link linkend="rasqal-query-graph-pattern-visit"><function>rasqal_query_graph_pattern_visit()</function></link></para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> containing the graph pattern
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gp</parameter>&nbsp;:</term>
<listitem><simpara> current graph_pattern
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara> user data passed in
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> 0 to truncate the visit
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-world" role="function">
<title>rasqal_new_world ()</title>
<indexterm zone="rasqal-new-world"><primary>rasqal_new_world</primary></indexterm><programlisting><link linkend="rasqal-world">rasqal_world</link>*       rasqal_new_world                    (void);</programlisting>
<para>
Initialise the rasqal library.
</para>
<para>
Creates a rasqal_world object and initializes it.
</para>
<para>
The returned world object is used with subsequent rasqal API calls.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> rasqal_world object or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-free-world" role="function">
<title>rasqal_free_world ()</title>
<indexterm zone="rasqal-free-world"><primary>rasqal_free_world</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_free_world                   (<link linkend="rasqal-world">rasqal_world</link> *);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-features-enumerate" role="function">
<title>rasqal_features_enumerate ()</title>
<indexterm zone="rasqal-features-enumerate"><primary>rasqal_features_enumerate</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_features_enumerate           (const <link linkend="rasqal-feature">rasqal_feature</link> feature,
                                                         const <link linkend="char">char</link> **name,
                                                         <link linkend="raptor-uri">raptor_uri</link> **uri,
                                                         const <link linkend="char">char</link> **label);</programlisting>
<para>
Get list of rasqal features.
</para>
<para>
If uri is not NULL, a pointer to a new raptor_uri is returned
that must be freed by the caller with <link linkend="raptor-free-uri"><function>raptor_free_uri()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>feature</parameter>&nbsp;:</term>
<listitem><simpara> feature enumeration (0+)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> pointer to store feature short name (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> pointer to store feature URI (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>label</parameter>&nbsp;:</term>
<listitem><simpara> pointer to feature label (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> 0 on success, &lt;0 on failure, &gt;0 if feature is unknown
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-get-feature-count" role="function">
<title>rasqal_get_feature_count ()</title>
<indexterm zone="rasqal-get-feature-count"><primary>rasqal_get_feature_count</primary></indexterm><programlisting>unsigned <link linkend="int">int</link>        rasqal_get_feature_count            (void);</programlisting>
<para>
Get the count of features defined.
</para>
<para>
This is prefered to the compile time-only symbol <link linkend="RASQAL-FEATURE-LAST:CAPS"><type>RASQAL_FEATURE_LAST</type></link>
and returns a count of the number of features which is
<link linkend="RASQAL-FEATURE-LAST:CAPS"><type>RASQAL_FEATURE_LAST</type></link>+1.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> count of features in the <link linkend="rasqal-feature"><type>rasqal_feature</type></link> enumeration
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-feature-from-uri" role="function">
<title>rasqal_feature_from_uri ()</title>
<indexterm zone="rasqal-feature-from-uri"><primary>rasqal_feature_from_uri</primary></indexterm><programlisting><link linkend="rasqal-feature">rasqal_feature</link>      rasqal_feature_from_uri             (<link linkend="raptor-uri">raptor_uri</link> *uri);</programlisting>
<para>
Turn a feature URI into an feature enum.
</para>
<para>
The allowed feature URIs are available via <link linkend="rasqal-features-enumerate"><function>rasqal_features_enumerate()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> feature URI
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> &lt; 0 if the feature is unknown
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-feature-value-type" role="function">
<title>rasqal_feature_value_type ()</title>
<indexterm zone="rasqal-feature-value-type"><primary>rasqal_feature_value_type</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_feature_value_type           (const <link linkend="rasqal-feature">rasqal_feature</link> feature);</programlisting>
<para>
Get the type of a features.
</para>
<para>
The type of the <parameter>feature</parameter> is 0=integer , 1=string.  Other values are
undefined.  Most features are integer values and use
rasqal_query_set_feature <link linkend="rasqal-query-get-feature"><function>rasqal_query_get_feature()</function></link></para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>feature</parameter>&nbsp;:</term>
<listitem><simpara> rasqal query feature
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the type of the feature or &lt;0 if <parameter>feature</parameter> is unknown
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-languages-enumerate" role="function">
<title>rasqal_languages_enumerate ()</title>
<indexterm zone="rasqal-languages-enumerate"><primary>rasqal_languages_enumerate</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_languages_enumerate          (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         unsigned <link linkend="int">int</link> counter,
                                                         const <link linkend="char">char</link> **name,
                                                         const <link linkend="char">char</link> **label,
                                                         unsigned <link linkend="char">char</link> **uri_string);</programlisting>
<para>
Get information on query languages.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>counter</parameter>&nbsp;:</term>
<listitem><simpara> index into the list of syntaxes
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> pointer to store the name of the syntax (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>label</parameter>&nbsp;:</term>
<listitem><simpara> pointer to store syntax readable label (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uri_string</parameter>&nbsp;:</term>
<listitem><simpara> pointer to store syntax URI string (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non 0 on failure of if counter is out of range
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-language-name-check" role="function">
<title>rasqal_language_name_check ()</title>
<indexterm zone="rasqal-language-name-check"><primary>rasqal_language_name_check</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_language_name_check          (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         const <link linkend="char">char</link> *name);</programlisting>
<para>
Check name of a query language.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> the query language name
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non 0 if name is a known query language
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-query" role="function">
<title>rasqal_new_query ()</title>
<indexterm zone="rasqal-new-query"><primary>rasqal_new_query</primary></indexterm><programlisting><link linkend="rasqal-query">rasqal_query</link>*       rasqal_new_query                    (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         const <link linkend="char">char</link> *name,
                                                         unsigned <link linkend="char">char</link> *uri);</programlisting>
<para>
Constructor - create a new rasqal_query object.
</para>
<para>
A query language can be named or identified by a URI, either
of which is optional.  The default query language will be used
if both are NULL.  rasqal_languages_enumerate returns
information on the known names, labels and URIs.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> the query language name (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="raptor-uri"><type>raptor_uri</type></link> language uri (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="rasqal-query"><type>rasqal_query</type></link> object or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-free-query" role="function">
<title>rasqal_free_query ()</title>
<indexterm zone="rasqal-free-query"><primary>rasqal_free_query</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_free_query                   (<link linkend="rasqal-query">rasqal_query</link> *query);</programlisting>
<para>
Destructor - destroy a <link linkend="rasqal-query"><type>rasqal_query</type></link> object.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> object
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-name" role="function">
<title>rasqal_query_get_name ()</title>
<indexterm zone="rasqal-query-get-name"><primary>rasqal_query_get_name</primary></indexterm><programlisting>const <link linkend="char">char</link>*         rasqal_query_get_name               (<link linkend="rasqal-query">rasqal_query</link> *query);</programlisting>
<para>
Get a short name for the query language.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> shared string label value
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-label" role="function">
<title>rasqal_query_get_label ()</title>
<indexterm zone="rasqal-query-get-label"><primary>rasqal_query_get_label</primary></indexterm><programlisting>const <link linkend="char">char</link>*         rasqal_query_get_label              (<link linkend="rasqal-query">rasqal_query</link> *query);</programlisting>
<para>
Get a readable label for the query language.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> shared string label value
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-set-fatal-error-handler" role="function">
<title>rasqal_query_set_fatal_error_handler ()</title>
<indexterm zone="rasqal-query-set-fatal-error-handler"><primary>rasqal_query_set_fatal_error_handler</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_query_set_fatal_error_handler
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="void">void</link> *user_data,
                                                         <link linkend="raptor-message-handler">raptor_message_handler</link> handler);</programlisting>
<para>
Set the query error handling function.
</para>
<para>
The function will receive callbacks when the query fails.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> the query
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara> user data to pass to function
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>handler</parameter>&nbsp;:</term>
<listitem><simpara> pointer to the function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-set-error-handler" role="function">
<title>rasqal_query_set_error_handler ()</title>
<indexterm zone="rasqal-query-set-error-handler"><primary>rasqal_query_set_error_handler</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_query_set_error_handler      (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="void">void</link> *user_data,
                                                         <link linkend="raptor-message-handler">raptor_message_handler</link> handler);</programlisting>
<para>
Set the query error handling function.
</para>
<para>
The function will receive callbacks when the query fails.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> the query
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara> user data to pass to function
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>handler</parameter>&nbsp;:</term>
<listitem><simpara> pointer to the function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-set-warning-handler" role="function">
<title>rasqal_query_set_warning_handler ()</title>
<indexterm zone="rasqal-query-set-warning-handler"><primary>rasqal_query_set_warning_handler</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_query_set_warning_handler    (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="void">void</link> *user_data,
                                                         <link linkend="raptor-message-handler">raptor_message_handler</link> handler);</programlisting>
<para>
Set the query warning handling function.
</para>
<para>
The function will receive callbacks when the query gives a warning.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> the query
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara> user data to pass to function
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>handler</parameter>&nbsp;:</term>
<listitem><simpara> pointer to the function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-set-feature" role="function">
<title>rasqal_query_set_feature ()</title>
<indexterm zone="rasqal-query-set-feature"><primary>rasqal_query_set_feature</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_set_feature            (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="rasqal-feature">rasqal_feature</link> feature,
                                                         <link linkend="int">int</link> value);</programlisting>
<para>
Set various query features.
</para>
<para>
The allowed features are available via <link linkend="rasqal-features-enumerate"><function>rasqal_features_enumerate()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>feature</parameter>&nbsp;:</term>
<listitem><simpara> feature to set from enumerated <link linkend="rasqal-feature"><type>rasqal_feature</type></link> values
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&nbsp;:</term>
<listitem><simpara> integer feature value
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non 0 on failure or if the feature is unknown
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-set-feature-string" role="function">
<title>rasqal_query_set_feature_string ()</title>
<indexterm zone="rasqal-query-set-feature-string"><primary>rasqal_query_set_feature_string</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_set_feature_string     (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="rasqal-feature">rasqal_feature</link> feature,
                                                         unsigned <link linkend="char">char</link> *value);</programlisting>
<para>
Set query features with string values.
</para>
<para>
The allowed features are available via <link linkend="rasqal-features-enumerate"><function>rasqal_features_enumerate()</function></link>.
If the feature type is integer, the value is interpreted as an integer.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>feature</parameter>&nbsp;:</term>
<listitem><simpara> feature to set from enumerated <link linkend="rasqal-feature"><type>rasqal_feature</type></link> values
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&nbsp;:</term>
<listitem><simpara> feature value
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non 0 on failure or if the feature is unknown
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-feature" role="function">
<title>rasqal_query_get_feature ()</title>
<indexterm zone="rasqal-query-get-feature"><primary>rasqal_query_get_feature</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_get_feature            (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="rasqal-feature">rasqal_feature</link> feature);</programlisting>
<para>
Get various query features.
</para>
<para>
The allowed features are available via <link linkend="rasqal-features-enumerate"><function>rasqal_features_enumerate()</function></link>.
</para>
<para>
Note: no feature value is negative</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>feature</parameter>&nbsp;:</term>
<listitem><simpara> feature to get value
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> feature value or &lt; 0 for an illegal feature
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-feature-string" role="function">
<title>rasqal_query_get_feature_string ()</title>
<indexterm zone="rasqal-query-get-feature-string"><primary>rasqal_query_get_feature_string</primary></indexterm><programlisting>const unsigned <link linkend="char">char</link>* rasqal_query_get_feature_string    (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="rasqal-feature">rasqal_feature</link> feature);</programlisting>
<para>
Get query features with string values.
</para>
<para>
The allowed features are available via <link linkend="rasqal-features-enumerate"><function>rasqal_features_enumerate()</function></link>.
If a string is returned, it must be freed by the caller.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>feature</parameter>&nbsp;:</term>
<listitem><simpara> feature to get value
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> feature value or NULL for an illegal feature or no value
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-set-default-generate-bnodeid-parameters" role="function">
<title>rasqal_query_set_default_generate_bnodeid_parameters ()</title>
<indexterm zone="rasqal-query-set-default-generate-bnodeid-parameters"><primary>rasqal_query_set_default_generate_bnodeid_parameters</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_query_set_default_generate_bnodeid_parameters
                                                        (<link linkend="rasqal-query">rasqal_query</link> *rdf_query,
                                                         <link linkend="char">char</link> *prefix,
                                                         <link linkend="int">int</link> base);</programlisting>
<para>
Sets the parameters for the default algorithm used to generate
blank node IDs.  The default algorithm uses both <parameter>prefix</parameter> and <parameter>base</parameter>
to generate a new identifier.  The exact identifier generated is
not guaranteed to be a strict concatenation of <parameter>prefix</parameter> and <parameter>base</parameter>
but will use both parts.
</para>
<para>
For finer control of the generated identifiers, use
<link linkend="rasqal-set-default-generate-bnodeid-handler"><function>rasqal_set_default_generate_bnodeid_handler()</function></link>
</para>
<para>
If prefix is NULL, the default prefix is used (currently "bnodeid")
If base is less than 1, it is initialised to 1.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>rdf_query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>prefix</parameter>&nbsp;:</term>
<listitem><simpara> prefix string
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>base</parameter>&nbsp;:</term>
<listitem><simpara> integer base identifier
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-set-generate-bnodeid-handler" role="function">
<title>rasqal_query_set_generate_bnodeid_handler ()</title>
<indexterm zone="rasqal-query-set-generate-bnodeid-handler"><primary>rasqal_query_set_generate_bnodeid_handler</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_query_set_generate_bnodeid_handler
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="void">void</link> *user_data,
                                                         <link linkend="rasqal-generate-bnodeid-handler">rasqal_generate_bnodeid_handler</link> handler);</programlisting>
<para>
Set the generate blank node ID handler function for the query.
</para>
<para>
Sets the function to generate blank node IDs for the query.
The handler is called with a pointer to the rasqal_query, the
<parameter>user_data</parameter> pointer and a user_bnodeid which is the value of
a user-provided blank node identifier (may be NULL).
It can either be returned directly as the generated value when present or
modified.  The passed in value must be <link linkend="free"><function>free()</function></link>d if it is not used.
</para>
<para>
If handler is NULL, the default method is used</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara> user data pointer for callback
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>handler</parameter>&nbsp;:</term>
<listitem><simpara> generate blank ID callback function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-verb" role="function">
<title>rasqal_query_get_verb ()</title>
<indexterm zone="rasqal-query-get-verb"><primary>rasqal_query_get_verb</primary></indexterm><programlisting><link linkend="rasqal-query-verb">rasqal_query_verb</link>   rasqal_query_get_verb               (<link linkend="rasqal-query">rasqal_query</link> *query);</programlisting>
<para>
Get the query verb.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the operating verb of the query of type rasqal_query_verb
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-wildcard" role="function">
<title>rasqal_query_get_wildcard ()</title>
<indexterm zone="rasqal-query-get-wildcard"><primary>rasqal_query_get_wildcard</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_get_wildcard           (<link linkend="rasqal-query">rasqal_query</link> *query);</programlisting>
<para>
Get the query verb is wildcard flag.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 if the query verb was a wildcard (such as SELECT *)
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-distinct" role="function">
<title>rasqal_query_get_distinct ()</title>
<indexterm zone="rasqal-query-get-distinct"><primary>rasqal_query_get_distinct</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_get_distinct           (<link linkend="rasqal-query">rasqal_query</link> *query);</programlisting>
<para>
Get the query distinct mode
</para>
<para>
See <link linkend="rasqal-query-set-distinct"><function>rasqal_query_set_distinct()</function></link> for the distinct modes.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 if the results should be distinct
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-set-distinct" role="function">
<title>rasqal_query_set_distinct ()</title>
<indexterm zone="rasqal-query-set-distinct"><primary>rasqal_query_set_distinct</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_query_set_distinct           (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> distinct_mode);</programlisting>
<para>
Set the query distinct results mode.
</para>
<para>
The allowed <parameter>distinct_mode</parameter> values are:
0 if not given
1 if DISTINCT: ensure solutions are unique
2 if SPARQL REDUCED: permit elimination of some non-unique solutions</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>distinct_mode</parameter>&nbsp;:</term>
<listitem><simpara> distinct mode
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-explain" role="function">
<title>rasqal_query_get_explain ()</title>
<indexterm zone="rasqal-query-get-explain"><primary>rasqal_query_get_explain</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_get_explain            (<link linkend="rasqal-query">rasqal_query</link> *query);</programlisting>
<para>
Get the query explain results flag.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 if the results should be explain
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-set-explain" role="function">
<title>rasqal_query_set_explain ()</title>
<indexterm zone="rasqal-query-set-explain"><primary>rasqal_query_set_explain</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_query_set_explain            (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> is_explain);</programlisting>
<para>
Set the query explain results flag.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>is_explain</parameter>&nbsp;:</term>
<listitem><simpara> non-0 if explain
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-limit" role="function">
<title>rasqal_query_get_limit ()</title>
<indexterm zone="rasqal-query-get-limit"><primary>rasqal_query_get_limit</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_get_limit              (<link linkend="rasqal-query">rasqal_query</link> *query);</programlisting>
<para>
Get the query-specified limit on results.
</para>
<para>
This is the limit given in the query on the number of results allowed.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> integer &gt;=0 if a limit is given, otherwise &lt;0
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-set-limit" role="function">
<title>rasqal_query_set_limit ()</title>
<indexterm zone="rasqal-query-set-limit"><primary>rasqal_query_set_limit</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_query_set_limit              (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> limit);</programlisting>
<para>
Set the query-specified limit on results.
</para>
<para>
This is the limit given in the query on the number of results allowed.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>limit</parameter>&nbsp;:</term>
<listitem><simpara> the limit on results, &gt;=0 to set a limit, &lt;0 to have no limit
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-offset" role="function">
<title>rasqal_query_get_offset ()</title>
<indexterm zone="rasqal-query-get-offset"><primary>rasqal_query_get_offset</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_get_offset             (<link linkend="rasqal-query">rasqal_query</link> *query);</programlisting>
<para>
Get the query-specified offset on results.
</para>
<para>
This is the offset given in the query on the number of results allowed.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> integer &gt;=0 if a offset is given, otherwise &lt;0
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-set-offset" role="function">
<title>rasqal_query_set_offset ()</title>
<indexterm zone="rasqal-query-set-offset"><primary>rasqal_query_set_offset</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_query_set_offset             (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> offset);</programlisting>
<para>
Set the query-specified offset on results.
</para>
<para>
This is the offset given in the query on the number of results allowed.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>offset</parameter>&nbsp;:</term>
<listitem><simpara> offset for results, &gt;=0 to set an offset, &lt;0 to have no offset
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-add-data-graph" role="function">
<title>rasqal_query_add_data_graph ()</title>
<indexterm zone="rasqal-query-add-data-graph"><primary>rasqal_query_add_data_graph</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_add_data_graph         (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="raptor-uri">raptor_uri</link> *uri,
                                                         <link linkend="raptor-uri">raptor_uri</link> *name_uri,
                                                         <link linkend="int">int</link> flags);</programlisting>
<para>
Add a data graph to the query.
</para>
<para>
named_uri must be given if flags RASQAL_DATA_GRAPH_NAMED is set.
It is the name of the graph and also used as the base URI
when resolving any relative URIs for the graph in uri.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="raptor-uri"><type>raptor_uri</type></link> source uri for retrieval
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name_uri</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="raptor-uri"><type>raptor_uri</type></link> name uri (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&nbsp;:</term>
<listitem><simpara> RASQAL_DATA_GRAPH_NAMED or RASQAL_DATA_GRAPH_BACKGROUND
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-data-graph-sequence" role="function">
<title>rasqal_query_get_data_graph_sequence ()</title>
<indexterm zone="rasqal-query-get-data-graph-sequence"><primary>rasqal_query_get_data_graph_sequence</primary></indexterm><programlisting><link linkend="raptor-sequence">raptor_sequence</link>*    rasqal_query_get_data_graph_sequence
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query);</programlisting>
<para>
Get the sequence of data_graph URIs.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="raptor-sequence"><type>raptor_sequence</type></link> of <link linkend="raptor-uri"><type>raptor_uri</type></link> pointers.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-data-graph" role="function">
<title>rasqal_query_get_data_graph ()</title>
<indexterm zone="rasqal-query-get-data-graph"><primary>rasqal_query_get_data_graph</primary></indexterm><programlisting><link linkend="rasqal-data-graph">rasqal_data_graph</link>*  rasqal_query_get_data_graph         (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> idx);</programlisting>
<para>
Get a rasqal_data_graph* in the sequence of data_graphs.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>idx</parameter>&nbsp;:</term>
<listitem><simpara> index into the sequence (0 or larger)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="rasqal-data-graph"><type>rasqal_data_graph</type></link> pointer or NULL if out of the sequence range
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-add-variable" role="function">
<title>rasqal_query_add_variable ()</title>
<indexterm zone="rasqal-query-add-variable"><primary>rasqal_query_add_variable</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_add_variable           (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="rasqal-variable">rasqal_variable</link> *var);</programlisting>
<para>
Add a binding variable to the query.
</para>
<para>
See also rasqal_query_set_variable which assigns or removes a value to
a previously added variable in the query.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>var</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-variable"><type>rasqal_variable</type></link> variable
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-bound-variable-sequence" role="function">
<title>rasqal_query_get_bound_variable_sequence ()</title>
<indexterm zone="rasqal-query-get-bound-variable-sequence"><primary>rasqal_query_get_bound_variable_sequence</primary></indexterm><programlisting><link linkend="raptor-sequence">raptor_sequence</link>*    rasqal_query_get_bound_variable_sequence
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query);</programlisting>
<para>
Get the sequence of variables to bind in the query.
</para>
<para>
This returns the sequence of variables that are explicitly chosen
via SELECT in RDQL, SPARQL.  Or all variables mentioned with SELECT *</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="raptor-sequence"><type>raptor_sequence</type></link> of <link linkend="rasqal-variable"><type>rasqal_variable</type></link> pointers.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-anonymous-variable-sequence" role="function">
<title>rasqal_query_get_anonymous_variable_sequence ()</title>
<indexterm zone="rasqal-query-get-anonymous-variable-sequence"><primary>rasqal_query_get_anonymous_variable_sequence</primary></indexterm><programlisting><link linkend="raptor-sequence">raptor_sequence</link>*    rasqal_query_get_anonymous_variable_sequence
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query);</programlisting>
<para>
Get the sequence of anonymous variables mentioned in the query.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="raptor-sequence"><type>raptor_sequence</type></link> of <link linkend="rasqal-variable"><type>rasqal_variable</type></link> pointers.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-all-variable-sequence" role="function">
<title>rasqal_query_get_all_variable_sequence ()</title>
<indexterm zone="rasqal-query-get-all-variable-sequence"><primary>rasqal_query_get_all_variable_sequence</primary></indexterm><programlisting><link linkend="raptor-sequence">raptor_sequence</link>*    rasqal_query_get_all_variable_sequence
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query);</programlisting>
<para>
Get the sequence of all variables mentioned in the query.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="raptor-sequence"><type>raptor_sequence</type></link> of <link linkend="rasqal-variable"><type>rasqal_variable</type></link> pointers.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-variable" role="function">
<title>rasqal_query_get_variable ()</title>
<indexterm zone="rasqal-query-get-variable"><primary>rasqal_query_get_variable</primary></indexterm><programlisting><link linkend="rasqal-variable">rasqal_variable</link>*    rasqal_query_get_variable           (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> idx);</programlisting>
<para>
Get a variable in the sequence of variables to bind.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>idx</parameter>&nbsp;:</term>
<listitem><simpara> index into the sequence (0 or larger)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="rasqal-variable"><type>rasqal_variable</type></link> pointer or NULL if out of the sequence range
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-has-variable" role="function">
<title>rasqal_query_has_variable ()</title>
<indexterm zone="rasqal-query-has-variable"><primary>rasqal_query_has_variable</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_has_variable           (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         unsigned <link linkend="char">char</link> *name);</programlisting>
<para>
Find if the named variable is in the sequence of variables to bind.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> variable name
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 if the variable name was found.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-set-variable" role="function">
<title>rasqal_query_set_variable ()</title>
<indexterm zone="rasqal-query-set-variable"><primary>rasqal_query_set_variable</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_set_variable           (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         unsigned <link linkend="char">char</link> *name,
                                                         <link linkend="rasqal-literal">rasqal_literal</link> *value);</programlisting>
<para>
Add a binding variable to the query.
</para>
<para>
See also rasqal_query_add_variable which adds a new binding variable
and must be called before this method is invoked.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-variable"><type>rasqal_variable</type></link> variable
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-literal"><type>rasqal_literal</type></link> value to set or NULL
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-triple-sequence" role="function">
<title>rasqal_query_get_triple_sequence ()</title>
<indexterm zone="rasqal-query-get-triple-sequence"><primary>rasqal_query_get_triple_sequence</primary></indexterm><programlisting><link linkend="raptor-sequence">raptor_sequence</link>*    rasqal_query_get_triple_sequence    (<link linkend="rasqal-query">rasqal_query</link> *query);</programlisting>
<para>
Get the sequence of matching triples in the query.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="raptor-sequence"><type>raptor_sequence</type></link> of <link linkend="rasqal-triple"><type>rasqal_triple</type></link> pointers.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-triple" role="function">
<title>rasqal_query_get_triple ()</title>
<indexterm zone="rasqal-query-get-triple"><primary>rasqal_query_get_triple</primary></indexterm><programlisting><link linkend="rasqal-triple">rasqal_triple</link>*      rasqal_query_get_triple             (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> idx);</programlisting>
<para>
Get a triple in the sequence of matching triples in the query.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>idx</parameter>&nbsp;:</term>
<listitem><simpara> index into the sequence (0 or larger)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="rasqal-triple"><type>rasqal_triple</type></link> pointer or NULL if out of the sequence range
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-add-prefix" role="function">
<title>rasqal_query_add_prefix ()</title>
<indexterm zone="rasqal-query-add-prefix"><primary>rasqal_query_add_prefix</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_add_prefix             (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="rasqal-prefix">rasqal_prefix</link> *prefix);</programlisting>
<para>
Add a namespace prefix to the query.
</para>
<para>
If the prefix has already been used, the old URI will be overridden.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>prefix</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-prefix"><type>rasqal_prefix</type></link> namespace prefix, URI
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-prefix-sequence" role="function">
<title>rasqal_query_get_prefix_sequence ()</title>
<indexterm zone="rasqal-query-get-prefix-sequence"><primary>rasqal_query_get_prefix_sequence</primary></indexterm><programlisting><link linkend="raptor-sequence">raptor_sequence</link>*    rasqal_query_get_prefix_sequence    (<link linkend="rasqal-query">rasqal_query</link> *query);</programlisting>
<para>
Get the sequence of namespace prefixes in the query.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="raptor-sequence"><type>raptor_sequence</type></link> of <link linkend="rasqal-prefix"><type>rasqal_prefix</type></link> pointers.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-prefix" role="function">
<title>rasqal_query_get_prefix ()</title>
<indexterm zone="rasqal-query-get-prefix"><primary>rasqal_query_get_prefix</primary></indexterm><programlisting><link linkend="rasqal-prefix">rasqal_prefix</link>*      rasqal_query_get_prefix             (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> idx);</programlisting>
<para>
Get a prefix in the sequence of namespsace prefixes in the query.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>idx</parameter>&nbsp;:</term>
<listitem><simpara> index into the sequence (0 or larger)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="rasqal-prefix"><type>rasqal_prefix</type></link> pointer or NULL if out of the sequence range
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-order-conditions-sequence" role="function">
<title>rasqal_query_get_order_conditions_sequence ()</title>
<indexterm zone="rasqal-query-get-order-conditions-sequence"><primary>rasqal_query_get_order_conditions_sequence</primary></indexterm><programlisting><link linkend="raptor-sequence">raptor_sequence</link>*    rasqal_query_get_order_conditions_sequence
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query);</programlisting>
<para>
Get the sequence of query ordering conditions.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="raptor-sequence"><type>raptor_sequence</type></link> of <link linkend="rasqal-expression"><type>rasqal_expression</type></link> pointers.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-order-condition" role="function">
<title>rasqal_query_get_order_condition ()</title>
<indexterm zone="rasqal-query-get-order-condition"><primary>rasqal_query_get_order_condition</primary></indexterm><programlisting><link linkend="rasqal-expression">rasqal_expression</link>*  rasqal_query_get_order_condition    (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> idx);</programlisting>
<para>
Get a query ordering expression in the sequence of query ordering conditions.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>idx</parameter>&nbsp;:</term>
<listitem><simpara> index into the sequence (0 or larger)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="rasqal-expression"><type>rasqal_expression</type></link> pointer or NULL if out of the sequence range
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-group-conditions-sequence" role="function">
<title>rasqal_query_get_group_conditions_sequence ()</title>
<indexterm zone="rasqal-query-get-group-conditions-sequence"><primary>rasqal_query_get_group_conditions_sequence</primary></indexterm><programlisting><link linkend="raptor-sequence">raptor_sequence</link>*    rasqal_query_get_group_conditions_sequence
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query);</programlisting>
<para>
Get the sequence of query grouping conditions.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="raptor-sequence"><type>raptor_sequence</type></link> of <link linkend="rasqal-expression"><type>rasqal_expression</type></link> pointers.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-group-condition" role="function">
<title>rasqal_query_get_group_condition ()</title>
<indexterm zone="rasqal-query-get-group-condition"><primary>rasqal_query_get_group_condition</primary></indexterm><programlisting><link linkend="rasqal-expression">rasqal_expression</link>*  rasqal_query_get_group_condition    (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> idx);</programlisting>
<para>
Get a query grouping expression in the sequence of query grouping conditions.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>idx</parameter>&nbsp;:</term>
<listitem><simpara> index into the sequence (0 or larger)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="rasqal-expression"><type>rasqal_expression</type></link> pointer or NULL if out of the sequence range
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-construct-triples-sequence" role="function">
<title>rasqal_query_get_construct_triples_sequence ()</title>
<indexterm zone="rasqal-query-get-construct-triples-sequence"><primary>rasqal_query_get_construct_triples_sequence</primary></indexterm><programlisting><link linkend="raptor-sequence">raptor_sequence</link>*    rasqal_query_get_construct_triples_sequence
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query);</programlisting>
<para>
Get the sequence of triples for a construct.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="raptor-sequence"><type>raptor_sequence</type></link> of <link linkend="rasqal-triple"><type>rasqal_triple</type></link> pointers.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-construct-triple" role="function">
<title>rasqal_query_get_construct_triple ()</title>
<indexterm zone="rasqal-query-get-construct-triple"><primary>rasqal_query_get_construct_triple</primary></indexterm><programlisting><link linkend="rasqal-triple">rasqal_triple</link>*      rasqal_query_get_construct_triple   (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> idx);</programlisting>
<para>
Get a triple in the sequence of construct triples.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>idx</parameter>&nbsp;:</term>
<listitem><simpara> index into the sequence (0 or larger)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="rasqal-triple"><type>rasqal_triple</type></link> pointer or NULL if out of the sequence range
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-graph-pattern-visit" role="function">
<title>rasqal_query_graph_pattern_visit ()</title>
<indexterm zone="rasqal-query-graph-pattern-visit"><primary>rasqal_query_graph_pattern_visit</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_query_graph_pattern_visit    (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="rasqal-graph-pattern-visit-fn">rasqal_graph_pattern_visit_fn</link> visit_fn,
                                                         <link linkend="void">void</link> *data);</programlisting>
<para>
Visit all graph patterns in a query with a user function <parameter>visit_fn</parameter>.
</para>
<para>
See also <link linkend="rasqal-graph-pattern-visit"><function>rasqal_graph_pattern_visit()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> query
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>visit_fn</parameter>&nbsp;:</term>
<listitem><simpara> user function to operate on
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> user data to pass to function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-write" role="function">
<title>rasqal_query_write ()</title>
<indexterm zone="rasqal-query-write"><primary>rasqal_query_write</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_write                  (<link linkend="raptor-iostream">raptor_iostream</link> *iostr,
                                                         <link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="raptor-uri">raptor_uri</link> *format_uri,
                                                         <link linkend="raptor-uri">raptor_uri</link> *base_uri);</programlisting>
<para>
Write a query to an iostream in a specified format.
</para>
<para>
The supported URIs for the format_uri are:
</para>
<para>
Default: SPARQL Query Language 2006-04-06
http://www.w3.org/TR/2006/CR-rdf-sparql-query-20060406/</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>iostr</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="raptor-iostream"><type>raptor_iostream</type></link> to write the query to
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> pointer.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>format_uri</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="raptor-uri"><type>raptor_uri</type></link> describing the format to write (or NULL for default)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>base_uri</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="raptor-uri"><type>raptor_uri</type></link> base URI of the output format
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-query-graph-pattern" role="function">
<title>rasqal_query_get_query_graph_pattern ()</title>
<indexterm zone="rasqal-query-get-query-graph-pattern"><primary>rasqal_query_get_query_graph_pattern</primary></indexterm><programlisting><link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link>* rasqal_query_get_query_graph_pattern
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query);</programlisting>
<para>
Get the top query graph pattern.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="rasqal-graph-pattern"><type>rasqal_graph_pattern</type></link> of the top query graph pattern
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-graph-pattern-sequence" role="function">
<title>rasqal_query_get_graph_pattern_sequence ()</title>
<indexterm zone="rasqal-query-get-graph-pattern-sequence"><primary>rasqal_query_get_graph_pattern_sequence</primary></indexterm><programlisting><link linkend="raptor-sequence">raptor_sequence</link>*    rasqal_query_get_graph_pattern_sequence
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query);</programlisting>
<para>
Get the sequence of graph_patterns expressions inside the top query graph pattern.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="raptor-sequence"><type>raptor_sequence</type></link> of <link linkend="rasqal-graph-pattern"><type>rasqal_graph_pattern</type></link> pointers.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-graph-pattern" role="function">
<title>rasqal_query_get_graph_pattern ()</title>
<indexterm zone="rasqal-query-get-graph-pattern"><primary>rasqal_query_get_graph_pattern</primary></indexterm><programlisting><link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link>* rasqal_query_get_graph_pattern    (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="int">int</link> idx);</programlisting>
<para>
Get a graph_pattern in the sequence of graph_pattern expressions in the top query graph pattern.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>idx</parameter>&nbsp;:</term>
<listitem><simpara> index into the sequence (0 or larger)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="rasqal-graph-pattern"><type>rasqal_graph_pattern</type></link> pointer or NULL if out of the sequence range
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-graph-pattern-add-sub-graph-pattern" role="function">
<title>rasqal_graph_pattern_add_sub_graph_pattern ()</title>
<indexterm zone="rasqal-graph-pattern-add-sub-graph-pattern"><primary>rasqal_graph_pattern_add_sub_graph_pattern</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_graph_pattern_add_sub_graph_pattern
                                                        (<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *graph_pattern,
                                                         <link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *sub_graph_pattern);</programlisting>
<para>
Add a sub graph pattern to a graph pattern.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>graph_pattern</parameter>&nbsp;:</term>
<listitem><simpara> graph pattern to add to
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>sub_graph_pattern</parameter>&nbsp;:</term>
<listitem><simpara> graph pattern to add inside
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-graph-pattern-get-triple" role="function">
<title>rasqal_graph_pattern_get_triple ()</title>
<indexterm zone="rasqal-graph-pattern-get-triple"><primary>rasqal_graph_pattern_get_triple</primary></indexterm><programlisting><link linkend="rasqal-triple">rasqal_triple</link>*      rasqal_graph_pattern_get_triple     (<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *graph_pattern,
                                                         <link linkend="int">int</link> idx);</programlisting>
<para>
Get a triple inside a graph pattern.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>graph_pattern</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-graph-pattern"><type>rasqal_graph_pattern</type></link> graph pattern object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>idx</parameter>&nbsp;:</term>
<listitem><simpara> index into the sequence of triples in the graph pattern
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="rasqal-triple"><type>rasqal_triple</type></link> or NULL if out of range
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-graph-pattern-get-sub-graph-pattern-sequence" role="function">
<title>rasqal_graph_pattern_get_sub_graph_pattern_sequence ()</title>
<indexterm zone="rasqal-graph-pattern-get-sub-graph-pattern-sequence"><primary>rasqal_graph_pattern_get_sub_graph_pattern_sequence</primary></indexterm><programlisting><link linkend="raptor-sequence">raptor_sequence</link>*    rasqal_graph_pattern_get_sub_graph_pattern_sequence
                                                        (<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *graph_pattern);</programlisting>
<para>
Get the sequence of graph patterns inside a graph pattern .</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>graph_pattern</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-graph-pattern"><type>rasqal_graph_pattern</type></link> graph pattern object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>  a <link linkend="raptor-sequence"><type>raptor_sequence</type></link> of <link linkend="rasqal-graph-pattern"><type>rasqal_graph_pattern</type></link> pointers.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-graph-pattern-get-sub-graph-pattern" role="function">
<title>rasqal_graph_pattern_get_sub_graph_pattern ()</title>
<indexterm zone="rasqal-graph-pattern-get-sub-graph-pattern"><primary>rasqal_graph_pattern_get_sub_graph_pattern</primary></indexterm><programlisting><link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link>* rasqal_graph_pattern_get_sub_graph_pattern
                                                        (<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *graph_pattern,
                                                         <link linkend="int">int</link> idx);</programlisting>
<para>
Get a sub-graph pattern inside a graph pattern.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>graph_pattern</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-graph-pattern"><type>rasqal_graph_pattern</type></link> graph pattern object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>idx</parameter>&nbsp;:</term>
<listitem><simpara> index into the sequence of sub graph_patterns in the graph pattern
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="rasqal-graph-pattern"><type>rasqal_graph_pattern</type></link> or NULL if out of range
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-graph-pattern-get-operator" role="function">
<title>rasqal_graph_pattern_get_operator ()</title>
<indexterm zone="rasqal-graph-pattern-get-operator"><primary>rasqal_graph_pattern_get_operator</primary></indexterm><programlisting><link linkend="rasqal-graph-pattern-operator">rasqal_graph_pattern_operator</link> rasqal_graph_pattern_get_operator
                                                        (<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *graph_pattern);</programlisting>
<para>
Get the graph pattern operator .
</para>
<para>
The operator for the given graph pattern. See also
<link linkend="rasqal-graph-pattern-operator-as-string"><function>rasqal_graph_pattern_operator_as_string()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>graph_pattern</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-graph-pattern"><type>rasqal_graph_pattern</type></link> graph pattern object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> graph pattern operator
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-graph-pattern-operator-as-string" role="function">
<title>rasqal_graph_pattern_operator_as_string ()</title>
<indexterm zone="rasqal-graph-pattern-operator-as-string"><primary>rasqal_graph_pattern_operator_as_string</primary></indexterm><programlisting>const <link linkend="char">char</link>*         rasqal_graph_pattern_operator_as_string
                                                        (<link linkend="rasqal-graph-pattern-operator">rasqal_graph_pattern_operator</link> op);</programlisting>
<para>
Get a string for the query verb.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>op</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="rasqal-graph-pattern-operator"><type>rasqal_graph_pattern_operator</type></link> verb of the query
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> pointer to a shared string label for the query verb
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-graph-pattern-print" role="function">
<title>rasqal_graph_pattern_print ()</title>
<indexterm zone="rasqal-graph-pattern-print"><primary>rasqal_graph_pattern_print</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_graph_pattern_print          (<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *gp,
                                                         <link linkend="FILE:CAPS">FILE</link> *fh);</programlisting>
<para>
Print a <link linkend="rasqal-graph-pattern"><type>rasqal_graph_pattern</type></link> in a debug format.
</para>
<para>
The print debug format may change in any release.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>gp</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="rasqal-graph-pattern"><type>rasqal_graph_pattern</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fh</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="FILE:CAPS"><type>FILE</type></link>* handle to print to
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-graph-pattern-add-constraint" role="function">
<title>rasqal_graph_pattern_add_constraint ()</title>
<indexterm zone="rasqal-graph-pattern-add-constraint"><primary>rasqal_graph_pattern_add_constraint</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_graph_pattern_add_constraint (<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *gp,
                                                         <link linkend="rasqal-expression">rasqal_expression</link> *expr);</programlisting>
<para>
Add a constraint expression to the graph_pattern.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>gp</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-graph-pattern"><type>rasqal_graph_pattern</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>expr</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-expression"><type>rasqal_expression</type></link> expr - ownership taken
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-graph-pattern-get-constraint-sequence" role="function">
<title>rasqal_graph_pattern_get_constraint_sequence ()</title>
<indexterm zone="rasqal-graph-pattern-get-constraint-sequence"><primary>rasqal_graph_pattern_get_constraint_sequence</primary></indexterm><programlisting><link linkend="raptor-sequence">raptor_sequence</link>*    rasqal_graph_pattern_get_constraint_sequence
                                                        (<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *gp);</programlisting>
<para>
Get the sequence of constraints expressions in the query.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>gp</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-graph-pattern"><type>rasqal_graph_pattern</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="raptor-sequence"><type>raptor_sequence</type></link> of <link linkend="rasqal-expression"><type>rasqal_expression</type></link> pointers.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-graph-pattern-get-constraint" role="function">
<title>rasqal_graph_pattern_get_constraint ()</title>
<indexterm zone="rasqal-graph-pattern-get-constraint"><primary>rasqal_graph_pattern_get_constraint</primary></indexterm><programlisting><link linkend="rasqal-expression">rasqal_expression</link>*  rasqal_graph_pattern_get_constraint (<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *gp,
                                                         <link linkend="int">int</link> idx);</programlisting>
<para>
Get a constraint in the sequence of constraint expressions in the query.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>gp</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-graph-pattern"><type>rasqal_graph_pattern</type></link> query object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>idx</parameter>&nbsp;:</term>
<listitem><simpara> index into the sequence (0 or larger)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="rasqal-expression"><type>rasqal_expression</type></link> pointer or NULL if out of the sequence range
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-graph-pattern-visit" role="function">
<title>rasqal_graph_pattern_visit ()</title>
<indexterm zone="rasqal-graph-pattern-visit"><primary>rasqal_graph_pattern_visit</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_graph_pattern_visit          (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *gp,
                                                         <link linkend="rasqal-graph-pattern-visit-fn">rasqal_graph_pattern_visit_fn</link> fn,
                                                         <link linkend="void">void</link> *user_data);</programlisting>
<para>
Visit a user function over a <link linkend="rasqal-graph-pattern"><type>rasqal_graph_pattern</type></link>
</para>
<para>
If the user function <parameter>fn</parameter> returns 0, the visit is truncated.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> to operate on
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gp</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-graph-pattern"><type>rasqal_graph_pattern</type></link> graph pattern
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fn</parameter>&nbsp;:</term>
<listitem><simpara> pointer to function to apply that takes user data and graph pattern parameters
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara> user data for applied function 
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> 0 if the visit was truncated.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-graph-pattern-get-index" role="function">
<title>rasqal_graph_pattern_get_index ()</title>
<indexterm zone="rasqal-graph-pattern-get-index"><primary>rasqal_graph_pattern_get_index</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_graph_pattern_get_index      (<link linkend="rasqal-graph-pattern">rasqal_graph_pattern</link> *gp);</programlisting>
<para>
Get the graph pattern absolute index in the array of graph patterns.
</para>
<para>
The graph pattern index is assigned when <link linkend="rasqal-query-prepare"><function>rasqal_query_prepare()</function></link> is
run on a query containing a graph pattern.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>gp</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-graph-pattern"><type>rasqal_graph_pattern</type></link> graph pattern
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> index or &lt;0 if no index has been assigned yet
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-verb-as-string" role="function">
<title>rasqal_query_verb_as_string ()</title>
<indexterm zone="rasqal-query-verb-as-string"><primary>rasqal_query_verb_as_string</primary></indexterm><programlisting>const <link linkend="char">char</link>*         rasqal_query_verb_as_string         (<link linkend="rasqal-query-verb">rasqal_query_verb</link> verb);</programlisting>
<para>
Get a string for the query verb.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>verb</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="rasqal-query-verb"><type>rasqal_query_verb</type></link> verb of the query
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> pointer to a shared string label for the query verb
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-print" role="function">
<title>rasqal_query_print ()</title>
<indexterm zone="rasqal-query-print"><primary>rasqal_query_print</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_query_print                  (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="FILE:CAPS">FILE</link> *fh);</programlisting>
<para>
Print a query in a debug format.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="rasqal-query"><type>rasqal_query</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fh</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="FILE:CAPS"><type>FILE</type></link>* handle to print to.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-prepare" role="function">
<title>rasqal_query_prepare ()</title>
<indexterm zone="rasqal-query-prepare"><primary>rasqal_query_prepare</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_prepare                (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         unsigned <link linkend="char">char</link> *query_string,
                                                         <link linkend="raptor-uri">raptor_uri</link> *base_uri);</programlisting>
<para>
Prepare a query - typically parse it.
</para>
<para>
Some query languages may require a base URI to resolve any
relative URIs in the query string.  If this is not given,
the current directory in the filesystem is used as the base URI.
</para>
<para>
The query string may be NULL in which case it is not parsed
and the query parts may be created by API calls such as
rasqal_query_add_source etc.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="rasqal-query"><type>rasqal_query</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>query_string</parameter>&nbsp;:</term>
<listitem><simpara> the query string (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>base_uri</parameter>&nbsp;:</term>
<listitem><simpara> base URI of query string (optional)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 on failure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-execute" role="function">
<title>rasqal_query_execute ()</title>
<indexterm zone="rasqal-query-execute"><primary>rasqal_query_execute</primary></indexterm><programlisting><link linkend="rasqal-query-results">rasqal_query_results</link>* rasqal_query_execute              (<link linkend="rasqal-query">rasqal_query</link> *query);</programlisting>
<para>
Excute a query - run and return results.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="rasqal-query"><type>rasqal_query</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="rasqal-query-results"><type>rasqal_query_results</type></link> structure or NULL on failure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-get-user-data" role="function">
<title>rasqal_query_get_user_data ()</title>
<indexterm zone="rasqal-query-get-user-data"><primary>rasqal_query_get_user_data</primary></indexterm><programlisting><link linkend="void">void</link>*               rasqal_query_get_user_data          (<link linkend="rasqal-query">rasqal_query</link> *query);</programlisting>
<para>
Get query user data.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> user data as set by rasqal_query_set_user_data
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-set-user-data" role="function">
<title>rasqal_query_set_user_data ()</title>
<indexterm zone="rasqal-query-set-user-data"><primary>rasqal_query_set_user_data</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_query_set_user_data          (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="void">void</link> *user_data);</programlisting>
<para>
Set the query user data.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara> some user data to associate with the query
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-free-query-results" role="function">
<title>rasqal_free_query_results ()</title>
<indexterm zone="rasqal-free-query-results"><primary>rasqal_free_query_results</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_free_query_results           (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);</programlisting>
<para>
Destructor - destroy a rasqal_query_results.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query_results</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results"><type>rasqal_query_results</type></link> object
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-results-is-bindings" role="function">
<title>rasqal_query_results_is_bindings ()</title>
<indexterm zone="rasqal-query-results-is-bindings"><primary>rasqal_query_results_is_bindings</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_results_is_bindings    (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);</programlisting>
<para>
Test if rasqal_query_results is variable bindings format.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query_results</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results"><type>rasqal_query_results</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 if true
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-results-get-count" role="function">
<title>rasqal_query_results_get_count ()</title>
<indexterm zone="rasqal-query-results-get-count"><primary>rasqal_query_results_get_count</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_results_get_count      (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);</programlisting>
<para>
Get number of bindings so far.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query_results</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results"><type>rasqal_query_results</type></link> query_results
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> number of bindings found so far or &lt; 0 on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-results-next" role="function">
<title>rasqal_query_results_next ()</title>
<indexterm zone="rasqal-query-results-next"><primary>rasqal_query_results_next</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_results_next           (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);</programlisting>
<para>
Move to the next result.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query_results</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results"><type>rasqal_query_results</type></link> query_results
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 if failed or results exhausted
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-results-finished" role="function">
<title>rasqal_query_results_finished ()</title>
<indexterm zone="rasqal-query-results-finished"><primary>rasqal_query_results_finished</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_results_finished       (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);</programlisting>
<para>
Find out if binding results are exhausted.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query_results</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results"><type>rasqal_query_results</type></link> query_results
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 if results are finished or query failed
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-results-get-bindings" role="function">
<title>rasqal_query_results_get_bindings ()</title>
<indexterm zone="rasqal-query-results-get-bindings"><primary>rasqal_query_results_get_bindings</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_results_get_bindings   (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results,
                                                         unsigned <link linkend="char">char</link> ***names,
                                                         <link linkend="rasqal-literal">rasqal_literal</link> ***values);</programlisting>
<para>
Get all binding names, values for current result.
</para>
<para>
If names is not NULL, it is set to the address of a shared array
of names of the bindings (an output parameter).  These names
are shared and must not be freed by the caller
</para>
<para>
If values is not NULL, it is set to the address of a shared array
of <link linkend="rasqal-literal"><type>rasqal_literal</type></link>* binding values.  These values are shaerd
and must not be freed by the caller.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query_results</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results"><type>rasqal_query_results</type></link> query_results
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>names</parameter>&nbsp;:</term>
<listitem><simpara> pointer to an array of binding names (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>values</parameter>&nbsp;:</term>
<listitem><simpara> pointer to an array of binding value <link linkend="rasqal-literal"><type>rasqal_literal</type></link> (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 if the assignment failed
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-results-get-binding-value" role="function">
<title>rasqal_query_results_get_binding_value ()</title>
<indexterm zone="rasqal-query-results-get-binding-value"><primary>rasqal_query_results_get_binding_value</primary></indexterm><programlisting><link linkend="rasqal-literal">rasqal_literal</link>*     rasqal_query_results_get_binding_value
                                                        (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results,
                                                         <link linkend="int">int</link> offset);</programlisting>
<para>
Get one binding value for the current result.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query_results</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results"><type>rasqal_query_results</type></link> query_results
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>offset</parameter>&nbsp;:</term>
<listitem><simpara> offset of binding name into array of known names
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to a shared <link linkend="rasqal-literal"><type>rasqal_literal</type></link> binding value or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-results-get-binding-name" role="function">
<title>rasqal_query_results_get_binding_name ()</title>
<indexterm zone="rasqal-query-results-get-binding-name"><primary>rasqal_query_results_get_binding_name</primary></indexterm><programlisting>const unsigned <link linkend="char">char</link>* rasqal_query_results_get_binding_name
                                                        (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results,
                                                         <link linkend="int">int</link> offset);</programlisting>
<para>
Get binding name for the current result.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query_results</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results"><type>rasqal_query_results</type></link> query_results
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>offset</parameter>&nbsp;:</term>
<listitem><simpara> offset of binding name into array of known names
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to a shared copy of the binding name or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-results-get-binding-value-by-name" role="function">
<title>rasqal_query_results_get_binding_value_by_name ()</title>
<indexterm zone="rasqal-query-results-get-binding-value-by-name"><primary>rasqal_query_results_get_binding_value_by_name</primary></indexterm><programlisting><link linkend="rasqal-literal">rasqal_literal</link>*     rasqal_query_results_get_binding_value_by_name
                                                        (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results,
                                                         unsigned <link linkend="char">char</link> *name);</programlisting>
<para>
Get one binding value for a given name in the current result.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query_results</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results"><type>rasqal_query_results</type></link> query_results
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> variable name
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to a shared <link linkend="rasqal-literal"><type>rasqal_literal</type></link> binding value or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-results-get-bindings-count" role="function">
<title>rasqal_query_results_get_bindings_count ()</title>
<indexterm zone="rasqal-query-results-get-bindings-count"><primary>rasqal_query_results_get_bindings_count</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_results_get_bindings_count
                                                        (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);</programlisting>
<para>
Get the number of bound variables in the result.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query_results</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results"><type>rasqal_query_results</type></link> query_results
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> &lt;0 if failed or results exhausted
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-results-is-boolean" role="function">
<title>rasqal_query_results_is_boolean ()</title>
<indexterm zone="rasqal-query-results-is-boolean"><primary>rasqal_query_results_is_boolean</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_results_is_boolean     (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);</programlisting>
<para>
Test if rasqal_query_results is boolean format.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query_results</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results"><type>rasqal_query_results</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 if true
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-results-get-boolean" role="function">
<title>rasqal_query_results_get_boolean ()</title>
<indexterm zone="rasqal-query-results-get-boolean"><primary>rasqal_query_results_get_boolean</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_results_get_boolean    (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);</programlisting>
<para>
Get boolean query result.
</para>
<para>
The return value is only meaningful if this is a boolean
query result - see <link linkend="rasqal-query-results-is-boolean"><function>rasqal_query_results_is_boolean()</function></link></para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query_results</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results"><type>rasqal_query_results</type></link> query_results
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> boolean query result - &gt;0 is true, 0 is false, &lt;0 on error
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-results-is-graph" role="function">
<title>rasqal_query_results_is_graph ()</title>
<indexterm zone="rasqal-query-results-is-graph"><primary>rasqal_query_results_is_graph</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_results_is_graph       (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);</programlisting>
<para>
Test if rasqal_query_results is RDF graph format.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query_results</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results"><type>rasqal_query_results</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 if true
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-results-get-triple" role="function">
<title>rasqal_query_results_get_triple ()</title>
<indexterm zone="rasqal-query-results-get-triple"><primary>rasqal_query_results_get_triple</primary></indexterm><programlisting><link linkend="raptor-statement">raptor_statement</link>*   rasqal_query_results_get_triple     (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);</programlisting>
<para>
Get the current triple in the result.
</para>
<para>
The return value is a shared <link linkend="raptor-statement"><type>raptor_statement</type></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query_results</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results"><type>rasqal_query_results</type></link> query_results
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="raptor-statement"><type>raptor_statement</type></link> or NULL if failed or results exhausted
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-results-next-triple" role="function">
<title>rasqal_query_results_next_triple ()</title>
<indexterm zone="rasqal-query-results-next-triple"><primary>rasqal_query_results_next_triple</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_results_next_triple    (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);</programlisting>
<para>
Move to the next triple result.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query_results</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results"><type>rasqal_query_results</type></link> query_results
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 if failed or results exhausted
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-results-is-syntax" role="function">
<title>rasqal_query_results_is_syntax ()</title>
<indexterm zone="rasqal-query-results-is-syntax"><primary>rasqal_query_results_is_syntax</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_results_is_syntax      (<link linkend="rasqal-query-results">rasqal_query_results</link> *query_results);</programlisting>
<para>
Test if the rasqal_query_results is a syntax.
</para>
<para>
Many of the query results may be formatted as a syntax using the
<link linkend="rasqal-query-formatter"><type>rasqal_query_formatter</type></link> class however this function returns true
if a syntax result was specifically requested.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query_results</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results"><type>rasqal_query_results</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 if true
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-results-write" role="function">
<title>rasqal_query_results_write ()</title>
<indexterm zone="rasqal-query-results-write"><primary>rasqal_query_results_write</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_results_write          (<link linkend="raptor-iostream">raptor_iostream</link> *iostr,
                                                         <link linkend="rasqal-query-results">rasqal_query_results</link> *results,
                                                         <link linkend="raptor-uri">raptor_uri</link> *format_uri,
                                                         <link linkend="raptor-uri">raptor_uri</link> *base_uri);</programlisting>
<para>
Write the query results to an iostream in a format.
</para>
<para>
This uses the <link linkend="rasqal-query-results-formatter"><type>rasqal_query_results_formatter</type></link> class
and the <link linkend="rasqal-query-results-formatter-write"><function>rasqal_query_results_formatter_write()</function></link> method
to perform the formatting. See
<link linkend="rasqal-query-results-formats-enumerate"><function>rasqal_query_results_formats_enumerate()</function></link> 
for obtaining the supported format URIs at run time.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>iostr</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="raptor-iostream"><type>raptor_iostream</type></link> to write the query to
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>results</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results"><type>rasqal_query_results</type></link> query results format
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>format_uri</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="raptor-uri"><type>raptor_uri</type></link> describing the format to write (or NULL for default)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>base_uri</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="raptor-uri"><type>raptor_uri</type></link> base URI of the output format
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-results-read" role="function">
<title>rasqal_query_results_read ()</title>
<indexterm zone="rasqal-query-results-read"><primary>rasqal_query_results_read</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_results_read           (<link linkend="raptor-iostream">raptor_iostream</link> *iostr,
                                                         <link linkend="rasqal-query-results">rasqal_query_results</link> *results,
                                                         <link linkend="raptor-uri">raptor_uri</link> *format_uri,
                                                         <link linkend="raptor-uri">raptor_uri</link> *base_uri);</programlisting>
<para>
Read the query results from an iostream in a format.
</para>
<para>
This uses the <link linkend="rasqal-query-results-formatter"><type>rasqal_query_results_formatter</type></link> class
and the <link linkend="rasqal-query-results-formatter-read"><function>rasqal_query_results_formatter_read()</function></link> method
to perform the formatting. See
<link linkend="rasqal-query-results-formats-enumerate"><function>rasqal_query_results_formats_enumerate()</function></link> 
for obtaining the supported format URIs at run time.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>iostr</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="raptor-iostream"><type>raptor_iostream</type></link> to read the query from
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>results</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results"><type>rasqal_query_results</type></link> query results format
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>format_uri</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="raptor-uri"><type>raptor_uri</type></link> describing the format to read (or NULL for default)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>base_uri</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="raptor-uri"><type>raptor_uri</type></link> base URI of the input format
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="RASQAL-QUERY-RESULTS-FORMAT-FLAG-READER:CAPS" role="macro">
<title>RASQAL_QUERY_RESULTS_FORMAT_FLAG_READER</title>
<indexterm zone="RASQAL-QUERY-RESULTS-FORMAT-FLAG-READER:CAPS"><primary>RASQAL_QUERY_RESULTS_FORMAT_FLAG_READER</primary></indexterm><programlisting>#define RASQAL_QUERY_RESULTS_FORMAT_FLAG_READER 1
</programlisting>
<para>
Flag for <link linkend="rasqal-query-results-formats-enumerate"><function>rasqal_query_results_formats_enumerate()</function></link> to get query results formats that can be read.</para>
<para>

</para></refsect2>
<refsect2 id="RASQAL-QUERY-RESULTS-FORMAT-FLAG-WRITER:CAPS" role="macro">
<title>RASQAL_QUERY_RESULTS_FORMAT_FLAG_WRITER</title>
<indexterm zone="RASQAL-QUERY-RESULTS-FORMAT-FLAG-WRITER:CAPS"><primary>RASQAL_QUERY_RESULTS_FORMAT_FLAG_WRITER</primary></indexterm><programlisting>#define RASQAL_QUERY_RESULTS_FORMAT_FLAG_WRITER 2
</programlisting>
<para>
Flag for <link linkend="rasqal-query-results-formats-enumerate"><function>rasqal_query_results_formats_enumerate()</function></link> to get query results formats that can be written.</para>
<para>

</para></refsect2>
<refsect2 id="rasqal-query-results-formats-enumerate" role="function">
<title>rasqal_query_results_formats_enumerate ()</title>
<indexterm zone="rasqal-query-results-formats-enumerate"><primary>rasqal_query_results_formats_enumerate</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_results_formats_enumerate
                                                        (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         unsigned <link linkend="int">int</link> counter,
                                                         const <link linkend="char">char</link> **name,
                                                         const <link linkend="char">char</link> **label,
                                                         unsigned <link linkend="char">char</link> **uri_string,
                                                         const <link linkend="char">char</link> **mime_type,
                                                         <link linkend="int">int</link> *flags);</programlisting>
<para>
Get information on query result syntaxes.
</para>
<para>
The current list of format names/URI is given below however
the results of this function will always return the latest.
</para>
<para>
SPARQL XML Results 2007-06-14 (default format when <parameter>counter</parameter> is 0)
name '<literal>xml</literal>' with
URIs http://www.w3.org/TR/2006/WD-rdf-sparql-XMLres-20070614/ or
http://www.w3.org/2005/sparql-results#
</para>
<para>
JSON name '<literal>json</literal>' and
URI http://www.w3.org/2001/sw/DataAccess/json-sparql/
</para>
<para>
All returned strings are shared and must be copied if needed to be
used dynamically.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>counter</parameter>&nbsp;:</term>
<listitem><simpara> index into the list of query result syntaxes
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> pointer to store the name of the query result syntax (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>label</parameter>&nbsp;:</term>
<listitem><simpara> pointer to store query result syntax readable label (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uri_string</parameter>&nbsp;:</term>
<listitem><simpara> pointer to store query result syntax URI string (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mime_type</parameter>&nbsp;:</term>
<listitem><simpara> pointer to store query result syntax mime type string (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&nbsp;:</term>
<listitem><simpara> pointer to store query result syntax flags (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non 0 on failure of if counter is out of range
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-results-formats-check" role="function">
<title>rasqal_query_results_formats_check ()</title>
<indexterm zone="rasqal-query-results-formats-check"><primary>rasqal_query_results_formats_check</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_results_formats_check  (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         const <link linkend="char">char</link> *name,
                                                         <link linkend="raptor-uri">raptor_uri</link> *uri,
                                                         const <link linkend="char">char</link> *mime_type);</programlisting>
<para>
Check if a query results formatter exists for the requested format.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> the query results format name (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="raptor-uri"><type>raptor_uri</type></link> query results format uri (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mime_type</parameter>&nbsp;:</term>
<listitem><simpara> mime type name
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 if a formatter exists.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-query-results-formatter" role="function">
<title>rasqal_new_query_results_formatter ()</title>
<indexterm zone="rasqal-new-query-results-formatter"><primary>rasqal_new_query_results_formatter</primary></indexterm><programlisting><link linkend="rasqal-query-results-formatter">rasqal_query_results_formatter</link>* rasqal_new_query_results_formatter
                                                        (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         const <link linkend="char">char</link> *name,
                                                         <link linkend="raptor-uri">raptor_uri</link> *format_uri);</programlisting>
<para>
Constructor - create a new rasqal_query_results_formatter object by identified format.
</para>
<para>
A query results format can be named or identified by a URI, both
of which are optional.  The default query results format will be used
if both are NULL.  <link linkend="rasqal-query-results-formats-enumerate"><function>rasqal_query_results_formats_enumerate()</function></link> returns
information on the known query results names, labels and URIs.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> the query results format name (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>format_uri</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="raptor-uri"><type>raptor_uri</type></link> query results format uri (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="rasqal-query-results-formatter"><type>rasqal_query_results_formatter</type></link> object or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-query-results-formatter-by-mime-type" role="function">
<title>rasqal_new_query_results_formatter_by_mime_type ()</title>
<indexterm zone="rasqal-new-query-results-formatter-by-mime-type"><primary>rasqal_new_query_results_formatter_by_mime_type</primary></indexterm><programlisting><link linkend="rasqal-query-results-formatter">rasqal_query_results_formatter</link>* rasqal_new_query_results_formatter_by_mime_type
                                                        (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         const <link linkend="char">char</link> *mime_type);</programlisting>
<para>
Constructor - create a new rasqal_query_results_formatter object by mime type.
</para>
<para>
A query results format generates a syntax with a mime type which
may be requested with this constructor.
</para>
<para>
Note that there may be several formatters that generate the same
MIME Type (such as SPARQL XML results format drafts) and in thot
case the <link linkend="rasqal-new-query-results-formatter"><function>rasqal_new_query_results_formatter()</function></link> constructor allows
selecting of a specific one by name or URI.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mime_type</parameter>&nbsp;:</term>
<listitem><simpara> mime type name
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="rasqal-query-results-formatter"><type>rasqal_query_results_formatter</type></link> object or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-free-query-results-formatter" role="function">
<title>rasqal_free_query_results_formatter ()</title>
<indexterm zone="rasqal-free-query-results-formatter"><primary>rasqal_free_query_results_formatter</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_free_query_results_formatter (<link linkend="rasqal-query-results-formatter">rasqal_query_results_formatter</link> *formatter);</programlisting>
<para>
Destructor - destroy a <link linkend="rasqal-query-results-formatter"><type>rasqal_query_results_formatter</type></link> object.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>formatter</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results-formatter"><type>rasqal_query_results_formatter</type></link> object
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-results-formatter-write" role="function">
<title>rasqal_query_results_formatter_write ()</title>
<indexterm zone="rasqal-query-results-formatter-write"><primary>rasqal_query_results_formatter_write</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_results_formatter_write
                                                        (<link linkend="raptor-iostream">raptor_iostream</link> *iostr,
                                                         <link linkend="rasqal-query-results-formatter">rasqal_query_results_formatter</link> *formatter,
                                                         <link linkend="rasqal-query-results">rasqal_query_results</link> *results,
                                                         <link linkend="raptor-uri">raptor_uri</link> *base_uri);</programlisting>
<para>
Write the query results using the given formatter to an iostream
</para>
<para>
See <link linkend="rasqal-query-results-formats-enumerate"><function>rasqal_query_results_formats_enumerate()</function></link> to get the
list of syntax URIs and their description.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>iostr</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="raptor-iostream"><type>raptor_iostream</type></link> to write the query to
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>formatter</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results-formatter"><type>rasqal_query_results_formatter</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>results</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results"><type>rasqal_query_results</type></link> query results format
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>base_uri</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="raptor-uri"><type>raptor_uri</type></link> base URI of the output format
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-results-formatter-read" role="function">
<title>rasqal_query_results_formatter_read ()</title>
<indexterm zone="rasqal-query-results-formatter-read"><primary>rasqal_query_results_formatter_read</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_results_formatter_read (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         <link linkend="raptor-iostream">raptor_iostream</link> *iostr,
                                                         <link linkend="rasqal-query-results-formatter">rasqal_query_results_formatter</link> *formatter,
                                                         <link linkend="rasqal-query-results">rasqal_query_results</link> *results,
                                                         <link linkend="raptor-uri">raptor_uri</link> *base_uri);</programlisting>
<para>
Read the query results using the given formatter from an iostream
</para>
<para>
See <link linkend="rasqal-query-results-formats-enumerate"><function>rasqal_query_results_formats_enumerate()</function></link> to get the
list of syntax URIs and their description.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>iostr</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="raptor-iostream"><type>raptor_iostream</type></link> to read the query from
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>formatter</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results-formatter"><type>rasqal_query_results_formatter</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>results</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results"><type>rasqal_query_results</type></link> query results format
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>base_uri</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="raptor-uri"><type>raptor_uri</type></link> base URI of the input format
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-results-formatter-get-mime-type" role="function">
<title>rasqal_query_results_formatter_get_mime_type ()</title>
<indexterm zone="rasqal-query-results-formatter-get-mime-type"><primary>rasqal_query_results_formatter_get_mime_type</primary></indexterm><programlisting>const <link linkend="char">char</link>*         rasqal_query_results_formatter_get_mime_type
                                                        (<link linkend="rasqal-query-results-formatter">rasqal_query_results_formatter</link> *formatter);</programlisting>
<para>
Get the mime type of the syntax being formatted.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>formatter</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query-results-formatter"><type>rasqal_query_results_formatter</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a shared mime type string
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-iostream-write-escaped-counted-string" role="function">
<title>rasqal_query_iostream_write_escaped_counted_string ()</title>
<indexterm zone="rasqal-query-iostream-write-escaped-counted-string"><primary>rasqal_query_iostream_write_escaped_counted_string</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_query_iostream_write_escaped_counted_string
                                                        (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="raptor-iostream">raptor_iostream</link> *iostr,
                                                         unsigned <link linkend="char">char</link> *string,
                                                         <link linkend="size-t">size_t</link> len);</programlisting>
<para>
Write a string to an iostream in escaped form suitable for the query string.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>iostr</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="raptor-iostream"><type>raptor_iostream</type></link> to write the escaped string to
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>string</parameter>&nbsp;:</term>
<listitem><simpara> string to escape
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>len</parameter>&nbsp;:</term>
<listitem><simpara> Length of string to escape
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-query-escape-counted-string" role="function">
<title>rasqal_query_escape_counted_string ()</title>
<indexterm zone="rasqal-query-escape-counted-string"><primary>rasqal_query_escape_counted_string</primary></indexterm><programlisting>unsigned <link linkend="char">char</link>*      rasqal_query_escape_counted_string  (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         unsigned <link linkend="char">char</link> *string,
                                                         <link linkend="size-t">size_t</link> len,
                                                         <link linkend="size-t">size_t</link> *output_len_p);</programlisting>
<para>
Convert a string into an escaped form suitable for the query string.
</para>
<para>
The returned string must be freed by the caller with
<link linkend="rasqal-free-memory"><function>rasqal_free_memory()</function></link></para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>string</parameter>&nbsp;:</term>
<listitem><simpara> string to escape
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>len</parameter>&nbsp;:</term>
<listitem><simpara> Length of string to escape
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>output_len_p</parameter>&nbsp;:</term>
<listitem><simpara> Pointer to store length of output string (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the escaped string or NULL on failure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-data-graph" role="function">
<title>rasqal_new_data_graph ()</title>
<indexterm zone="rasqal-new-data-graph"><primary>rasqal_new_data_graph</primary></indexterm><programlisting><link linkend="rasqal-data-graph">rasqal_data_graph</link>*  rasqal_new_data_graph               (<link linkend="raptor-uri">raptor_uri</link> *uri,
                                                         <link linkend="raptor-uri">raptor_uri</link> *name_uri,
                                                         <link linkend="int">int</link> flags);</programlisting>
<para>
Constructor - create a new <link linkend="rasqal-data-graph"><type>rasqal_data_graph</type></link>.
</para>
<para>
The name_uri is only used when the flags are <link linkend="RASQAL-DATA-GRAPH-NAMED:CAPS"><literal>RASQAL_DATA_GRAPH_NAMED</literal></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> source URI
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name_uri</parameter>&nbsp;:</term>
<listitem><simpara> name of graph (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="RASQAL-DATA-GRAPH-NAMED:CAPS"><literal>RASQAL_DATA_GRAPH_NAMED</literal></link> or <link linkend="RASQAL-DATA-GRAPH-BACKGROUND:CAPS"><literal>RASQAL_DATA_GRAPH_BACKGROUND</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="rasqal-data-graph"><type>rasqal_data_graph</type></link> or NULL on failure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-free-data-graph" role="function">
<title>rasqal_free_data_graph ()</title>
<indexterm zone="rasqal-free-data-graph"><primary>rasqal_free_data_graph</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_free_data_graph              (<link linkend="rasqal-data-graph">rasqal_data_graph</link> *dg);</programlisting>
<para>
Destructor - destroy a <link linkend="rasqal-data-graph"><type>rasqal_data_graph</type></link> object.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>dg</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-data-graph"><type>rasqal_data_graph</type></link> object
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-data-graph-print" role="function">
<title>rasqal_data_graph_print ()</title>
<indexterm zone="rasqal-data-graph-print"><primary>rasqal_data_graph_print</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_data_graph_print             (<link linkend="rasqal-data-graph">rasqal_data_graph</link> *dg,
                                                         <link linkend="FILE:CAPS">FILE</link> *fh);</programlisting>
<para>
Print a Rasqal data graph in a debug format.
</para>
<para>
The print debug format may change in any release.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>dg</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-data-graph"><type>rasqal_data_graph</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fh</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="FILE:CAPS"><type>FILE</type></link>* handle to print to
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-compare-flags" role="enum">
<title>enum rasqal_compare_flags</title>
<indexterm zone="rasqal-compare-flags"><primary>rasqal_compare_flags</primary></indexterm><programlisting>typedef enum {
  RASQAL_COMPARE_NOCASE = 1,
  RASQAL_COMPARE_XQUERY = 2,
  RASQAL_COMPARE_RDF    = 4,
  RASQAL_COMPARE_URI    = 8
} rasqal_compare_flags;
</programlisting>
<para>
Flags for <link linkend="rasqal-expression-evaluate"><function>rasqal_expression_evaluate()</function></link> or <link linkend="rasqal-literal-compare"><function>rasqal_literal_compare()</function></link>.</para>
<para>

</para><variablelist role="enum">
<varlistentry id="RASQAL-COMPARE-NOCASE:CAPS" role="constant">
<term><literal>RASQAL_COMPARE_NOCASE</literal></term>
<listitem><simpara> String comparisons are case independent.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-COMPARE-XQUERY:CAPS" role="constant">
<term><literal>RASQAL_COMPARE_XQUERY</literal></term>
<listitem><simpara> XQuery comparsion rules apply.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-COMPARE-RDF:CAPS" role="constant">
<term><literal>RASQAL_COMPARE_RDF</literal></term>
<listitem><simpara>    RDF Term comparsion rules apply.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-COMPARE-URI:CAPS" role="constant">
<term><literal>RASQAL_COMPARE_URI</literal></term>
<listitem><simpara>    Allow comparison of URIs
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-0op-expression" role="function">
<title>rasqal_new_0op_expression ()</title>
<indexterm zone="rasqal-new-0op-expression"><primary>rasqal_new_0op_expression</primary></indexterm><programlisting><link linkend="rasqal-expression">rasqal_expression</link>*  rasqal_new_0op_expression           (<link linkend="rasqal-op">rasqal_op</link> op);</programlisting>
<para>
Constructor - create a new 0-operand (constant) expression.
</para>
<para>
The operators are:
<parameter>RASQAL_EXPR_VARSTAR</parameter>
</para>
<para>
The only operator here is the '*' in COUNT(*) as used by LAQRS.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>op</parameter>&nbsp;:</term>
<listitem><simpara> Expression operator
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="rasqal-expression"><type>rasqal_expression</type></link> object or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-1op-expression" role="function">
<title>rasqal_new_1op_expression ()</title>
<indexterm zone="rasqal-new-1op-expression"><primary>rasqal_new_1op_expression</primary></indexterm><programlisting><link linkend="rasqal-expression">rasqal_expression</link>*  rasqal_new_1op_expression           (<link linkend="rasqal-op">rasqal_op</link> op,
                                                         <link linkend="rasqal-expression">rasqal_expression</link> *arg);</programlisting>
<para>
Constructor - create a new 1-operand expression.
Takes ownership of the operand expression.
</para>
<para>
The operators are:
<parameter>RASQAL_EXPR_TILDE</parameter> <parameter>RASQAL_EXPR_BANG</parameter> <parameter>RASQAL_EXPR_UMINUS</parameter>
<parameter>RASQAL_EXPR_BOUND</parameter> <parameter>RASQAL_EXPR_STR</parameter> <parameter>RASQAL_EXPR_LANG</parameter>
<parameter>RASQAL_EXPR_LANGMATCHES</parameter>
<parameter>RASQAL_EXPR_DATATYPE</parameter> <parameter>RASQAL_EXPR_ISURI</parameter> <parameter>RASQAL_EXPR_ISBLANK</parameter>
<parameter>RASQAL_EXPR_ISLITERAL</parameter> <parameter>RASQAL_EXPR_ORDER_COND_ASC</parameter>
<parameter>RASQAL_EXPR_ORDER_COND_DESC</parameter> <parameter>RASQAL_EXPR_GROUP_COND_ASC</parameter>
<parameter>RASQAL_EXPR_GROUP_COND_DESC</parameter> <parameter>RASQAL_EXPR_COUNT</parameter>
</para>
<para>
<parameter>RASQAL_EXPR_BANG</parameter> and <parameter>RASQAL_EXPR_UMINUS</parameter> are used by RDQL and
SPARQL.  <parameter>RASQAL_EXPR_TILDE</parameter> by RDQL only.  The rest by SPARQL
only.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>op</parameter>&nbsp;:</term>
<listitem><simpara> Expression operator
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg</parameter>&nbsp;:</term>
<listitem><simpara> Operand 1 
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="rasqal-expression"><type>rasqal_expression</type></link> object or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-2op-expression" role="function">
<title>rasqal_new_2op_expression ()</title>
<indexterm zone="rasqal-new-2op-expression"><primary>rasqal_new_2op_expression</primary></indexterm><programlisting><link linkend="rasqal-expression">rasqal_expression</link>*  rasqal_new_2op_expression           (<link linkend="rasqal-op">rasqal_op</link> op,
                                                         <link linkend="rasqal-expression">rasqal_expression</link> *arg1,
                                                         <link linkend="rasqal-expression">rasqal_expression</link> *arg2);</programlisting>
<para>
Constructor - create a new 2-operand expression.
Takes ownership of the operand expressions.
</para>
<para>
The operators are:
<parameter>RASQAL_EXPR_AND</parameter> <parameter>RASQAL_EXPR_OR</parameter> <parameter>RASQAL_EXPR_EQ</parameter>
<parameter>RASQAL_EXPR_NEQ</parameter> <parameter>RASQAL_EXPR_LT</parameter> <parameter>RASQAL_EXPR_GT</parameter> <parameter>RASQAL_EXPR_LE</parameter>
<parameter>RASQAL_EXPR_GE</parameter> <parameter>RASQAL_EXPR_PLUS</parameter> <parameter>RASQAL_EXPR_MINUS</parameter>
<parameter>RASQAL_EXPR_STAR</parameter> <parameter>RASQAL_EXPR_SLASH</parameter> <parameter>RASQAL_EXPR_REM</parameter>
<parameter>RASQAL_EXPR_STR_EQ</parameter> <parameter>RASQAL_EXPR_STR_NEQ</parameter>
</para>
<para>
<parameter>RASQAL_EXPR_REM</parameter> <parameter>RASQAL_EXPR_STR_EQ</parameter> and <parameter>RASQAL_EXPR_STR_NEQ</parameter> are
not used by SPARQL. <parameter>RASQAL_EXPR_REM</parameter> is used by RDQL.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>op</parameter>&nbsp;:</term>
<listitem><simpara> Expression operator
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg1</parameter>&nbsp;:</term>
<listitem><simpara> Operand 1 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg2</parameter>&nbsp;:</term>
<listitem><simpara> Operand 2
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="rasqal-expression"><type>rasqal_expression</type></link> object or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-3op-expression" role="function">
<title>rasqal_new_3op_expression ()</title>
<indexterm zone="rasqal-new-3op-expression"><primary>rasqal_new_3op_expression</primary></indexterm><programlisting><link linkend="rasqal-expression">rasqal_expression</link>*  rasqal_new_3op_expression           (<link linkend="rasqal-op">rasqal_op</link> op,
                                                         <link linkend="rasqal-expression">rasqal_expression</link> *arg1,
                                                         <link linkend="rasqal-expression">rasqal_expression</link> *arg2,
                                                         <link linkend="rasqal-expression">rasqal_expression</link> *arg3);</programlisting>
<para>
Constructor - create a new 3-operand expression.
Takes ownership of the operands.
</para>
<para>
The only operator is:
<parameter>RASQAL_EXPR_REGEX</parameter></para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>op</parameter>&nbsp;:</term>
<listitem><simpara> Expression operator
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg1</parameter>&nbsp;:</term>
<listitem><simpara> Operand 1 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg2</parameter>&nbsp;:</term>
<listitem><simpara> Operand 2
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg3</parameter>&nbsp;:</term>
<listitem><simpara> Operand 3 (may be NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="rasqal-expression"><type>rasqal_expression</type></link> object or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-string-op-expression" role="function">
<title>rasqal_new_string_op_expression ()</title>
<indexterm zone="rasqal-new-string-op-expression"><primary>rasqal_new_string_op_expression</primary></indexterm><programlisting><link linkend="rasqal-expression">rasqal_expression</link>*  rasqal_new_string_op_expression     (<link linkend="rasqal-op">rasqal_op</link> op,
                                                         <link linkend="rasqal-expression">rasqal_expression</link> *arg1,
                                                         <link linkend="rasqal-literal">rasqal_literal</link> *literal);</programlisting>
<para>
Constructor - create a new expression with one expression and one string operand.
Takes ownership of the operands.
</para>
<para>
The operators are:
<parameter>RASQAL_EXPR_STR_MATCH</parameter> (RDQL, SPARQL) and
<parameter>RASQAL_EXPR_STR_NMATCH</parameter> (RDQL)</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>op</parameter>&nbsp;:</term>
<listitem><simpara> Expression operator
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg1</parameter>&nbsp;:</term>
<listitem><simpara> Operand 1 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>literal</parameter>&nbsp;:</term>
<listitem><simpara> Literal operand 2
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="rasqal-expression"><type>rasqal_expression</type></link> object or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-literal-expression" role="function">
<title>rasqal_new_literal_expression ()</title>
<indexterm zone="rasqal-new-literal-expression"><primary>rasqal_new_literal_expression</primary></indexterm><programlisting><link linkend="rasqal-expression">rasqal_expression</link>*  rasqal_new_literal_expression       (<link linkend="rasqal-literal">rasqal_literal</link> *literal);</programlisting>
<para>
Constructor - create a new expression for a <link linkend="rasqal-literal"><type>rasqal_literal</type></link>
Takes ownership of the operand literal.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>literal</parameter>&nbsp;:</term>
<listitem><simpara> Literal operand 1
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="rasqal-expression"><type>rasqal_expression</type></link> object or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-function-expression" role="function">
<title>rasqal_new_function_expression ()</title>
<indexterm zone="rasqal-new-function-expression"><primary>rasqal_new_function_expression</primary></indexterm><programlisting><link linkend="rasqal-expression">rasqal_expression</link>*  rasqal_new_function_expression      (<link linkend="raptor-uri">raptor_uri</link> *name,
                                                         <link linkend="raptor-sequence">raptor_sequence</link> *args);</programlisting>
<para>
Constructor - create a new expression for a function with expression arguments.
Takes ownership of the function uri and arguments.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> function name
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>args</parameter>&nbsp;:</term>
<listitem><simpara> sequence of <link linkend="rasqal-expression"><type>rasqal_expression</type></link> function arguments
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="rasqal-expression"><type>rasqal_expression</type></link> object or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-cast-expression" role="function">
<title>rasqal_new_cast_expression ()</title>
<indexterm zone="rasqal-new-cast-expression"><primary>rasqal_new_cast_expression</primary></indexterm><programlisting><link linkend="rasqal-expression">rasqal_expression</link>*  rasqal_new_cast_expression          (<link linkend="raptor-uri">raptor_uri</link> *name,
                                                         <link linkend="rasqal-expression">rasqal_expression</link> *value);</programlisting>
<para>
Constructor - create a new expression for casting and expression to a datatype.
Takes ownership of the datatype uri and expression value.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> cast datatype URI
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&nbsp;:</term>
<listitem><simpara> expression value to cast to <parameter>datatype</parameter> type
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="rasqal-expression"><type>rasqal_expression</type></link> object or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-expression-from-expression" role="function">
<title>rasqal_new_expression_from_expression ()</title>
<indexterm zone="rasqal-new-expression-from-expression"><primary>rasqal_new_expression_from_expression</primary></indexterm><programlisting><link linkend="rasqal-expression">rasqal_expression</link>*  rasqal_new_expression_from_expression
                                                        (<link linkend="rasqal-expression">rasqal_expression</link> *e);</programlisting>
<para>
Copy Constructor - create a new <link linkend="rasqal-expression"><type>rasqal_expression</type></link> object from an existing rasqal_expression object.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>e</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-expression"><type>rasqal_expression</type></link> object to copy
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="rasqal-expression"><type>rasqal_expression</type></link> object or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-free-expression" role="function">
<title>rasqal_free_expression ()</title>
<indexterm zone="rasqal-free-expression"><primary>rasqal_free_expression</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_free_expression              (<link linkend="rasqal-expression">rasqal_expression</link> *e);</programlisting>
<para>
Destructor - destroy a <link linkend="rasqal-expression"><type>rasqal_expression</type></link> object.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>e</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-expression"><type>rasqal_expression</type></link> object
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-expression-print-op" role="function">
<title>rasqal_expression_print_op ()</title>
<indexterm zone="rasqal-expression-print-op"><primary>rasqal_expression_print_op</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_expression_print_op          (<link linkend="rasqal-expression">rasqal_expression</link> *e,
                                                         <link linkend="FILE:CAPS">FILE</link> *fh);</programlisting>
<para>
Print a rasqal expression operator in a debug format.
</para>
<para>
The print debug format may change in any release.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>e</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="rasqal-expression"><type>rasqal_expression</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fh</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="FILE:CAPS"><type>FILE</type></link>* handle to print to
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-expression-print" role="function">
<title>rasqal_expression_print ()</title>
<indexterm zone="rasqal-expression-print"><primary>rasqal_expression_print</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_expression_print             (<link linkend="rasqal-expression">rasqal_expression</link> *e,
                                                         <link linkend="FILE:CAPS">FILE</link> *fh);</programlisting>
<para>
Print a Rasqal expression in a debug format.
</para>
<para>
The print debug format may change in any release.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>e</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-expression"><type>rasqal_expression</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fh</parameter>&nbsp;:</term>
<listitem><simpara> The <link linkend="FILE:CAPS"><type>FILE</type></link>* handle to print to.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-expression-evaluate" role="function">
<title>rasqal_expression_evaluate ()</title>
<indexterm zone="rasqal-expression-evaluate"><primary>rasqal_expression_evaluate</primary></indexterm><programlisting><link linkend="rasqal-literal">rasqal_literal</link>*     rasqal_expression_evaluate          (<link linkend="rasqal-query">rasqal_query</link> *query,
                                                         <link linkend="rasqal-expression">rasqal_expression</link> *e,
                                                         <link linkend="int">int</link> flags);</programlisting>
<para>
Evaluate a <link linkend="rasqal-expression"><type>rasqal_expression</type></link> tree to give a <link linkend="rasqal-literal"><type>rasqal_literal</type></link> result
or error.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> this expression belongs to
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>e</parameter>&nbsp;:</term>
<listitem><simpara> The expression to evaluate.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&nbsp;:</term>
<listitem><simpara> Flags for <link linkend="rasqal-literal-compare"><function>rasqal_literal_compare()</function></link> and RASQAL_COMPARE_NOCASE for string matches.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="rasqal-literal"><type>rasqal_literal</type></link> value or NULL on failure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-expression-visit-fn" role="function">
<title>rasqal_expression_visit_fn ()</title>
<indexterm zone="rasqal-expression-visit-fn"><primary>rasqal_expression_visit_fn</primary></indexterm><programlisting><link linkend="int">int</link>                 (*rasqal_expression_visit_fn)       (<link linkend="void">void</link> *user_data,
                                                         <link linkend="rasqal-expression">rasqal_expression</link> *e);</programlisting>
<para>
User function to visit an expression and operate on it with
<link linkend="rasqal-expression-visit"><function>rasqal_expression_visit()</function></link></para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara> user data passed in with <link linkend="rasqal-expression-visit"><function>rasqal_expression_visit()</function></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>e</parameter>&nbsp;:</term>
<listitem><simpara> current expression
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> 0 to truncate the visit
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-expression-visit" role="function">
<title>rasqal_expression_visit ()</title>
<indexterm zone="rasqal-expression-visit"><primary>rasqal_expression_visit</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_expression_visit             (<link linkend="rasqal-expression">rasqal_expression</link> *e,
                                                         <link linkend="rasqal-expression-visit-fn">rasqal_expression_visit_fn</link> fn,
                                                         <link linkend="void">void</link> *user_data);</programlisting>
<para>
Visit a user function over a <link linkend="rasqal-expression"><type>rasqal_expression</type></link>
</para>
<para>
If the user function <parameter>fn</parameter> returns 0, the visit is truncated.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>e</parameter>&nbsp;:</term>
<listitem><simpara>  <link linkend="rasqal-expression"><type>rasqal_expression</type></link> to visit
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fn</parameter>&nbsp;:</term>
<listitem><simpara> visit function
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara> user data to pass to visit function
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> 0 if the visit was truncated.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-integer-literal" role="function">
<title>rasqal_new_integer_literal ()</title>
<indexterm zone="rasqal-new-integer-literal"><primary>rasqal_new_integer_literal</primary></indexterm><programlisting><link linkend="rasqal-literal">rasqal_literal</link>*     rasqal_new_integer_literal          (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         <link linkend="rasqal-literal-type">rasqal_literal_type</link> type,
                                                         <link linkend="int">int</link> integer);</programlisting>
<para>
Constructor - Create a new Rasqal integer literal.
</para>
<para>
The integer decimal number is turned into a rasqal integer literal
and given a datatype of xsd:integer</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
<listitem><simpara> Type of literal such as RASQAL_LITERAL_INTEGER or RASQAL_LITERAL_BOOLEAN
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>integer</parameter>&nbsp;:</term>
<listitem><simpara> int value
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> New <link linkend="rasqal-literal"><type>rasqal_literal</type></link> or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-typed-literal" role="function">
<title>rasqal_new_typed_literal ()</title>
<indexterm zone="rasqal-new-typed-literal"><primary>rasqal_new_typed_literal</primary></indexterm><programlisting><link linkend="rasqal-literal">rasqal_literal</link>*     rasqal_new_typed_literal            (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         <link linkend="rasqal-literal-type">rasqal_literal_type</link> type,
                                                         unsigned <link linkend="char">char</link> *string);</programlisting>
<para>
Constructor - Create a new Rasqal integer literal from a string
</para>
<para>
The integer decimal number is turned into a rasqal integer literal
and given a datatype of xsd:integer</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
<listitem><simpara> Type of literal such as RASQAL_LITERAL_INTEGER or RASQAL_LITERAL_BOOLEAN
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>string</parameter>&nbsp;:</term>
<listitem><simpara> lexical form - ownership not taken
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> New <link linkend="rasqal-literal"><type>rasqal_literal</type></link> or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-double-literal" role="function">
<title>rasqal_new_double_literal ()</title>
<indexterm zone="rasqal-new-double-literal"><primary>rasqal_new_double_literal</primary></indexterm><programlisting><link linkend="rasqal-literal">rasqal_literal</link>*     rasqal_new_double_literal           (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         <link linkend="double">double</link> d);</programlisting>
<para>
Constructor - Create a new Rasqal double literal.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>d</parameter>&nbsp;:</term>
<listitem><simpara> double literal
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> New <link linkend="rasqal-literal"><type>rasqal_literal</type></link> or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-float-literal" role="function">
<title>rasqal_new_float_literal ()</title>
<indexterm zone="rasqal-new-float-literal"><primary>rasqal_new_float_literal</primary></indexterm><programlisting><link linkend="rasqal-literal">rasqal_literal</link>*     rasqal_new_float_literal            (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         <link linkend="float">float</link> f);</programlisting>
<para>
Constructor - Create a new Rasqal float literal.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>f</parameter>&nbsp;:</term>
<listitem><simpara>  float literal
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> New <link linkend="rasqal-literal"><type>rasqal_literal</type></link> or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-uri-literal" role="function">
<title>rasqal_new_uri_literal ()</title>
<indexterm zone="rasqal-new-uri-literal"><primary>rasqal_new_uri_literal</primary></indexterm><programlisting><link linkend="rasqal-literal">rasqal_literal</link>*     rasqal_new_uri_literal              (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         <link linkend="raptor-uri">raptor_uri</link> *uri);</programlisting>
<para>
Constructor - Create a new Rasqal URI literal from a raptor URI.
</para>
<para>
The uri is an input parameter and is stored in the literal, not copied.
The uri is freed also on failure.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="raptor-uri"><type>raptor_uri</type></link> uri
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> New <link linkend="rasqal-literal"><type>rasqal_literal</type></link> or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-pattern-literal" role="function">
<title>rasqal_new_pattern_literal ()</title>
<indexterm zone="rasqal-new-pattern-literal"><primary>rasqal_new_pattern_literal</primary></indexterm><programlisting><link linkend="rasqal-literal">rasqal_literal</link>*     rasqal_new_pattern_literal          (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         unsigned <link linkend="char">char</link> *pattern,
                                                         const <link linkend="char">char</link> *flags);</programlisting>
<para>
Constructor - Create a new Rasqal pattern literal.
</para>
<para>
The pattern and flags are input parameters and are stored in the
literal, not copied. They are freed also on failure.
The set of flags recognised depends on the regex engine and the query
language.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>pattern</parameter>&nbsp;:</term>
<listitem><simpara> regex pattern
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&nbsp;:</term>
<listitem><simpara> regex flags
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> New <link linkend="rasqal-literal"><type>rasqal_literal</type></link> or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-string-literal" role="function">
<title>rasqal_new_string_literal ()</title>
<indexterm zone="rasqal-new-string-literal"><primary>rasqal_new_string_literal</primary></indexterm><programlisting><link linkend="rasqal-literal">rasqal_literal</link>*     rasqal_new_string_literal           (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         unsigned <link linkend="char">char</link> *string,
                                                         const <link linkend="char">char</link> *language,
                                                         <link linkend="raptor-uri">raptor_uri</link> *datatype,
                                                         unsigned <link linkend="char">char</link> *datatype_qname);</programlisting>
<para>
Constructor - Create a new Rasqal string literal.
</para>
<para>
All parameters are input parameters and if present are stored in
the literal, not copied. They are freed also on failure.
</para>
<para>
The datatype and datatype_qname parameters are alternatives; the
qname is a datatype that cannot be resolved till later since the
prefixes have not yet been declared or checked.
</para>
<para>
If the string literal is datatyped and of certain types recognised
it may be converted to a different literal type by
<link linkend="rasqal-literal-string-to-native"><function>rasqal_literal_string_to_native()</function></link></para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>string</parameter>&nbsp;:</term>
<listitem><simpara> UTF-8 string lexical form
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>language</parameter>&nbsp;:</term>
<listitem><simpara> RDF language (xml:lang) (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>datatype</parameter>&nbsp;:</term>
<listitem><simpara> datatype URI (or NULL for plain literal)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>datatype_qname</parameter>&nbsp;:</term>
<listitem><simpara> datatype qname string (or NULL for plain literal)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> New <link linkend="rasqal-literal"><type>rasqal_literal</type></link> or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-simple-literal" role="function">
<title>rasqal_new_simple_literal ()</title>
<indexterm zone="rasqal-new-simple-literal"><primary>rasqal_new_simple_literal</primary></indexterm><programlisting><link linkend="rasqal-literal">rasqal_literal</link>*     rasqal_new_simple_literal           (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         <link linkend="rasqal-literal-type">rasqal_literal_type</link> type,
                                                         unsigned <link linkend="char">char</link> *string);</programlisting>
<para>
Constructor - Create a new Rasqal simple literal.
</para>
<para>
The string is an input parameter and is stored in the
literal, not copied. It is freed also on failure.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
<listitem><simpara> RASQAL_LITERAL_BLANK or RASQAL_LITERAL_BLANK_QNAME
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>string</parameter>&nbsp;:</term>
<listitem><simpara> the UTF-8 string value to store
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> New <link linkend="rasqal-literal"><type>rasqal_literal</type></link> or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-boolean-literal" role="function">
<title>rasqal_new_boolean_literal ()</title>
<indexterm zone="rasqal-new-boolean-literal"><primary>rasqal_new_boolean_literal</primary></indexterm><programlisting><link linkend="rasqal-literal">rasqal_literal</link>*     rasqal_new_boolean_literal          (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         <link linkend="int">int</link> value);</programlisting>
<para>
Constructor - Create a new Rasqal boolean literal.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&nbsp;:</term>
<listitem><simpara> non-0 for true, 0 for false
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> New <link linkend="rasqal-literal"><type>rasqal_literal</type></link> or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-variable-literal" role="function">
<title>rasqal_new_variable_literal ()</title>
<indexterm zone="rasqal-new-variable-literal"><primary>rasqal_new_variable_literal</primary></indexterm><programlisting><link linkend="rasqal-literal">rasqal_literal</link>*     rasqal_new_variable_literal         (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         <link linkend="rasqal-variable">rasqal_variable</link> *variable);</programlisting>
<para>
Constructor - Create a new Rasqal variable literal.
</para>
<para>
variable is an input parameter and stored in the literal, not copied.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>variable</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-variable"><type>rasqal_variable</type></link> to use
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> New <link linkend="rasqal-literal"><type>rasqal_literal</type></link> or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-decimal-literal" role="function">
<title>rasqal_new_decimal_literal ()</title>
<indexterm zone="rasqal-new-decimal-literal"><primary>rasqal_new_decimal_literal</primary></indexterm><programlisting><link linkend="rasqal-literal">rasqal_literal</link>*     rasqal_new_decimal_literal          (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         unsigned <link linkend="char">char</link> *string);</programlisting>
<para>
Constructor - Create a new Rasqal decimal literal.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>string</parameter>&nbsp;:</term>
<listitem><simpara> decimal literal
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> New <link linkend="rasqal-literal"><type>rasqal_literal</type></link> or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-decimal-literal-from-decimal" role="function">
<title>rasqal_new_decimal_literal_from_decimal ()</title>
<indexterm zone="rasqal-new-decimal-literal-from-decimal"><primary>rasqal_new_decimal_literal_from_decimal</primary></indexterm><programlisting><link linkend="rasqal-literal">rasqal_literal</link>*     rasqal_new_decimal_literal_from_decimal
                                                        (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         unsigned <link linkend="char">char</link> *string,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *decimal);</programlisting>
<para>
Constructor - Create a new Rasqal decimal literal.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>string</parameter>&nbsp;:</term>
<listitem><simpara> decimal literal string
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>decimal</parameter>&nbsp;:</term>
<listitem><simpara> rasqal XSD Decimal
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> New <link linkend="rasqal-literal"><type>rasqal_literal</type></link> or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-literal-from-literal" role="function">
<title>rasqal_new_literal_from_literal ()</title>
<indexterm zone="rasqal-new-literal-from-literal"><primary>rasqal_new_literal_from_literal</primary></indexterm><programlisting><link linkend="rasqal-literal">rasqal_literal</link>*     rasqal_new_literal_from_literal     (<link linkend="rasqal-literal">rasqal_literal</link> *l);</programlisting>
<para>
Copy Constructor - create a new rasqal_literal object from an existing rasqal_literal object.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>l</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-literal"><type>rasqal_literal</type></link> object to copy
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="rasqal-literal"><type>rasqal_literal</type></link> object or NULL
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-free-literal" role="function">
<title>rasqal_free_literal ()</title>
<indexterm zone="rasqal-free-literal"><primary>rasqal_free_literal</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_free_literal                 (<link linkend="rasqal-literal">rasqal_literal</link> *l);</programlisting>
<para>
Destructor - destroy an rasqal_literal object.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>l</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-literal"><type>rasqal_literal</type></link> object
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-literal-print" role="function">
<title>rasqal_literal_print ()</title>
<indexterm zone="rasqal-literal-print"><primary>rasqal_literal_print</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_literal_print                (<link linkend="rasqal-literal">rasqal_literal</link> *l,
                                                         <link linkend="FILE:CAPS">FILE</link> *fh);</programlisting>
<para>
Print a Rasqal literal in a debug format.
</para>
<para>
The print debug format may change in any release.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>l</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="rasqal-literal"><type>rasqal_literal</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fh</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="FILE:CAPS"><type>FILE</type></link>* handle to print to
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-literal-print-type" role="function">
<title>rasqal_literal_print_type ()</title>
<indexterm zone="rasqal-literal-print-type"><primary>rasqal_literal_print_type</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_literal_print_type           (<link linkend="rasqal-literal">rasqal_literal</link> *l,
                                                         <link linkend="FILE:CAPS">FILE</link> *fh);</programlisting>
<para>
Print a string form for a rasqal literal type.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>l</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="rasqal-literal"><type>rasqal_literal</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fh</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="FILE:CAPS"><type>FILE</type></link>* handle to print to
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-literal-as-variable" role="function">
<title>rasqal_literal_as_variable ()</title>
<indexterm zone="rasqal-literal-as-variable"><primary>rasqal_literal_as_variable</primary></indexterm><programlisting><link linkend="rasqal-variable">rasqal_variable</link>*    rasqal_literal_as_variable          (<link linkend="rasqal-literal">rasqal_literal</link> *l);</programlisting>
<para>
Get the variable inside a literal.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>l</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-literal"><type>rasqal_literal</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <link linkend="rasqal-variable"><type>rasqal_variable</type></link> or NULL if the literal is not a variable
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-literal-as-string" role="function">
<title>rasqal_literal_as_string ()</title>
<indexterm zone="rasqal-literal-as-string"><primary>rasqal_literal_as_string</primary></indexterm><programlisting>const unsigned <link linkend="char">char</link>* rasqal_literal_as_string           (<link linkend="rasqal-literal">rasqal_literal</link> *l);</programlisting>
<para>
Return the string format of a literal.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>l</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-literal"><type>rasqal_literal</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> pointer to a shared string format of the literal.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-literal-as-string-flags" role="function">
<title>rasqal_literal_as_string_flags ()</title>
<indexterm zone="rasqal-literal-as-string-flags"><primary>rasqal_literal_as_string_flags</primary></indexterm><programlisting>const unsigned <link linkend="char">char</link>* rasqal_literal_as_string_flags     (<link linkend="rasqal-literal">rasqal_literal</link> *l,
                                                         <link linkend="int">int</link> flags,
                                                         <link linkend="int">int</link> *error);</programlisting>
<para>
Return the string format of a literal according to flags.
</para>
<para>
flag bits affects conversion:
  RASQAL_COMPARE_XQUERY: use XQuery conversion rules
</para>
<para>
If <parameter>error</parameter> is not NULL, *error is set to non-0 on error</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>l</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-literal"><type>rasqal_literal</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&nbsp;:</term>
<listitem><simpara> comparison flags
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
<listitem><simpara> pointer to error
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> pointer to a shared string format of the literal.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-literal-as-node" role="function">
<title>rasqal_literal_as_node ()</title>
<indexterm zone="rasqal-literal-as-node"><primary>rasqal_literal_as_node</primary></indexterm><programlisting><link linkend="rasqal-literal">rasqal_literal</link>*     rasqal_literal_as_node              (<link linkend="rasqal-literal">rasqal_literal</link> *l);</programlisting>
<para>
Turn a literal into a new RDF string, URI or blank literal.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>l</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-literal"><type>rasqal_literal</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the new <link linkend="rasqal-literal"><type>rasqal_literal</type></link> or NULL on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-literal-datatype" role="function">
<title>rasqal_literal_datatype ()</title>
<indexterm zone="rasqal-literal-datatype"><primary>rasqal_literal_datatype</primary></indexterm><programlisting><link linkend="raptor-uri">raptor_uri</link>*         rasqal_literal_datatype             (<link linkend="rasqal-literal">rasqal_literal</link> *l);</programlisting>
<para>
Get the datatype URI of a literal</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>l</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-literal"><type>rasqal_literal</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> shared pointer to <link linkend="raptor-uri"><type>raptor_uri</type></link> of datatype or NULL on failure or no value
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-literal-value" role="function">
<title>rasqal_literal_value ()</title>
<indexterm zone="rasqal-literal-value"><primary>rasqal_literal_value</primary></indexterm><programlisting><link linkend="rasqal-literal">rasqal_literal</link>*     rasqal_literal_value                (<link linkend="rasqal-literal">rasqal_literal</link> *l);</programlisting>
<para>
Get the literal value looking up any variables needed</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>l</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-literal"><type>rasqal_literal</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> literal value or NULL if has no value
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-literal-compare" role="function">
<title>rasqal_literal_compare ()</title>
<indexterm zone="rasqal-literal-compare"><primary>rasqal_literal_compare</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_literal_compare              (<link linkend="rasqal-literal">rasqal_literal</link> *l1,
                                                         <link linkend="rasqal-literal">rasqal_literal</link> *l2,
                                                         <link linkend="int">int</link> flags,
                                                         <link linkend="int">int</link> *error);</programlisting>
<para>
Compare two literals with type promotion.
</para>
<para>
The two literals are compared across their range.  If the types
are not the same, they are promoted.  If one is a double or float, the
other is promoted to double, otherwise for integers, otherwise
to strings (all literals have a string value).
</para>
<para>
The comparison returned is as for strcmp, first before second
returns &lt;0.  equal returns 0, and first after second returns &gt;0.
For URIs, the string value is used for the comparsion.
</para>
<para>
flag bits affects comparisons:
  RASQAL_COMPARE_NOCASE: use case independent string comparisons
  RASQAL_COMPARE_XQUERY: use XQuery comparison and type promotion rules
  RASQAL_COMPARE_RDF: use RDF term comparison
  RASQAL_COMPARE_URI: allow comparison of URIs (typically for SPARQL ORDER)
</para>
<para>
If <parameter>error</parameter> is not NULL, *error is set to non-0 on error</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>l1</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-literal"><type>rasqal_literal</type></link> first literal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>l2</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-literal"><type>rasqal_literal</type></link> second literal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&nbsp;:</term>
<listitem><simpara> comparison flags
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
<listitem><simpara> pointer to error
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> &lt;0, 0, or &gt;0 as described above.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-literal-equals" role="function">
<title>rasqal_literal_equals ()</title>
<indexterm zone="rasqal-literal-equals"><primary>rasqal_literal_equals</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_literal_equals               (<link linkend="rasqal-literal">rasqal_literal</link> *l1,
                                                         <link linkend="rasqal-literal">rasqal_literal</link> *l2);</programlisting>
<para>
Compare two literals with no type promotion.
</para>
<para>
If the l2 data literal value is a boolean, it will match
the string "true" or "false" in the first literal l1.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>l1</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-literal"><type>rasqal_literal</type></link> literal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>l2</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-literal"><type>rasqal_literal</type></link> data literal
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 if equal
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-prefix" role="function">
<title>rasqal_new_prefix ()</title>
<indexterm zone="rasqal-new-prefix"><primary>rasqal_new_prefix</primary></indexterm><programlisting><link linkend="rasqal-prefix">rasqal_prefix</link>*      rasqal_new_prefix                   (unsigned <link linkend="char">char</link> *prefix,
                                                         <link linkend="raptor-uri">raptor_uri</link> *uri);</programlisting>
<para>
Constructor - create a new <link linkend="rasqal-prefix"><type>rasqal_prefix</type></link>.
Takes ownership of prefix and uri.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>prefix</parameter>&nbsp;:</term>
<listitem><simpara> Short prefix string to stand for URI or NULL.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> Name <link linkend="raptor-uri"><type>raptor_uri</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="rasqal-prefix"><type>rasqal_prefix</type></link> or NULL on failure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-free-prefix" role="function">
<title>rasqal_free_prefix ()</title>
<indexterm zone="rasqal-free-prefix"><primary>rasqal_free_prefix</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_free_prefix                  (<link linkend="rasqal-prefix">rasqal_prefix</link> *p);</programlisting>
<para>
Destructor - destroy a <link linkend="rasqal-prefix"><type>rasqal_prefix</type></link> object.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>p</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-prefix"><type>rasqal_prefix</type></link> object.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-prefix-print" role="function">
<title>rasqal_prefix_print ()</title>
<indexterm zone="rasqal-prefix-print"><primary>rasqal_prefix_print</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_prefix_print                 (<link linkend="rasqal-prefix">rasqal_prefix</link> *p,
                                                         <link linkend="FILE:CAPS">FILE</link> *fh);</programlisting>
<para>
Print a Rasqal prefix in a debug format.
</para>
<para>
The print debug format may change in any release.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>p</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-prefix"><type>rasqal_prefix</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fh</parameter>&nbsp;:</term>
<listitem><simpara> The <link linkend="FILE:CAPS"><type>FILE</type></link>* handle to print to.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-triple" role="function">
<title>rasqal_new_triple ()</title>
<indexterm zone="rasqal-new-triple"><primary>rasqal_new_triple</primary></indexterm><programlisting><link linkend="rasqal-triple">rasqal_triple</link>*      rasqal_new_triple                   (<link linkend="rasqal-literal">rasqal_literal</link> *subject,
                                                         <link linkend="rasqal-literal">rasqal_literal</link> *predicate,
                                                         <link linkend="rasqal-literal">rasqal_literal</link> *object);</programlisting>
<para>
Constructor - create a new <link linkend="rasqal-triple"><type>rasqal_triple</type></link> triple or triple pattern.
Takes ownership of the literals passed in.
</para>
<para>
The triple origin can be set with <link linkend="rasqal-triple-set-origin"><function>rasqal_triple_set_origin()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>subject</parameter>&nbsp;:</term>
<listitem><simpara> Triple subject.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>predicate</parameter>&nbsp;:</term>
<listitem><simpara> Triple predicate.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>object</parameter>&nbsp;:</term>
<listitem><simpara> Triple object.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="rasqal-triple"><type>rasqal_triple</type></link> or NULL on failure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-triple-from-triple" role="function">
<title>rasqal_new_triple_from_triple ()</title>
<indexterm zone="rasqal-new-triple-from-triple"><primary>rasqal_new_triple_from_triple</primary></indexterm><programlisting><link linkend="rasqal-triple">rasqal_triple</link>*      rasqal_new_triple_from_triple       (<link linkend="rasqal-triple">rasqal_triple</link> *t);</programlisting>
<para>
Copy constructor - create a new <link linkend="rasqal-triple"><type>rasqal_triple</type></link> from an existing one.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>t</parameter>&nbsp;:</term>
<listitem><simpara> Triple to copy.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="rasqal-triple"><type>rasqal_triple</type></link> or NULL on failure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-free-triple" role="function">
<title>rasqal_free_triple ()</title>
<indexterm zone="rasqal-free-triple"><primary>rasqal_free_triple</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_free_triple                  (<link linkend="rasqal-triple">rasqal_triple</link> *t);</programlisting>
<para>
Destructor - destroy a <link linkend="rasqal-triple"><type>rasqal_triple</type></link> object.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>t</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-triple"><type>rasqal_triple</type></link> object.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-triple-print" role="function">
<title>rasqal_triple_print ()</title>
<indexterm zone="rasqal-triple-print"><primary>rasqal_triple_print</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_triple_print                 (<link linkend="rasqal-triple">rasqal_triple</link> *t,
                                                         <link linkend="FILE:CAPS">FILE</link> *fh);</programlisting>
<para>
Print a Rasqal triple in a debug format.
</para>
<para>
The print debug format may change in any release.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>t</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-triple"><type>rasqal_triple</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fh</parameter>&nbsp;:</term>
<listitem><simpara> The <link linkend="FILE:CAPS"><type>FILE</type></link>* handle to print to.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-triple-set-origin" role="function">
<title>rasqal_triple_set_origin ()</title>
<indexterm zone="rasqal-triple-set-origin"><primary>rasqal_triple_set_origin</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_triple_set_origin            (<link linkend="rasqal-triple">rasqal_triple</link> *t,
                                                         <link linkend="rasqal-literal">rasqal_literal</link> *l);</programlisting>
<para>
Set the origin field of a <link linkend="rasqal-triple"><type>rasqal_triple</type></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>t</parameter>&nbsp;:</term>
<listitem><simpara> The triple object. 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>l</parameter>&nbsp;:</term>
<listitem><simpara> The <link linkend="rasqal-literal"><type>rasqal_literal</type></link> object to set as origin.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-triple-get-origin" role="function">
<title>rasqal_triple_get_origin ()</title>
<indexterm zone="rasqal-triple-get-origin"><primary>rasqal_triple_get_origin</primary></indexterm><programlisting><link linkend="rasqal-literal">rasqal_literal</link>*     rasqal_triple_get_origin            (<link linkend="rasqal-triple">rasqal_triple</link> *t);</programlisting>
<para>
Get the origin field of a <link linkend="rasqal-triple"><type>rasqal_triple</type></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>t</parameter>&nbsp;:</term>
<listitem><simpara> The triple object. 
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The triple origin or NULL.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-variable-typed" role="function">
<title>rasqal_new_variable_typed ()</title>
<indexterm zone="rasqal-new-variable-typed"><primary>rasqal_new_variable_typed</primary></indexterm><programlisting><link linkend="rasqal-variable">rasqal_variable</link>*    rasqal_new_variable_typed           (<link linkend="rasqal-query">rasqal_query</link> *rq,
                                                         <link linkend="rasqal-variable-type">rasqal_variable_type</link> type,
                                                         unsigned <link linkend="char">char</link> *name,
                                                         <link linkend="rasqal-literal">rasqal_literal</link> *value);</programlisting>
<para>
Constructor - Create a new typed Rasqal variable.
</para>
<para>
The variable must be associated with a query, since variable
names are only significant with a single query.
</para>
<para>
The <parameter>name</parameter> and <parameter>value</parameter> become owned by the rasqal_variable structure</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>rq</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> to associate the variable with
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
<listitem><simpara> variable type defined by enumeration rasqal_variable_type
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> variable name
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&nbsp;:</term>
<listitem><simpara> variable <link linkend="rasqal-literal"><type>rasqal_literal</type></link> value (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="rasqal-variable"><type>rasqal_variable</type></link> or NULL on failure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-variable" role="function">
<title>rasqal_new_variable ()</title>
<indexterm zone="rasqal-new-variable"><primary>rasqal_new_variable</primary></indexterm><programlisting><link linkend="rasqal-variable">rasqal_variable</link>*    rasqal_new_variable                 (<link linkend="rasqal-query">rasqal_query</link> *rq,
                                                         unsigned <link linkend="char">char</link> *name,
                                                         <link linkend="rasqal-literal">rasqal_literal</link> *value);</programlisting>
<para>
Constructor - Create a new Rasqal normal variable.
</para>
<para>
The variable must be associated with a query, since variable
names are only significant with a single query.
</para>
<para>
This creates a regular variable that can be returned of type
RASQAL_VARIABLE_TYPE_NORMAL.  Use rasqal_new_variable_typed
to create other variables.
</para>
<para>
The <parameter>name</parameter> and <parameter>value</parameter> become owned by the rasqal_variable structure</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>rq</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-query"><type>rasqal_query</type></link> to associate the variable with
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> variable name
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&nbsp;:</term>
<listitem><simpara> variable <link linkend="rasqal-literal"><type>rasqal_literal</type></link> value (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="rasqal-variable"><type>rasqal_variable</type></link> or NULL on failure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-variable-from-variable" role="function">
<title>rasqal_new_variable_from_variable ()</title>
<indexterm zone="rasqal-new-variable-from-variable"><primary>rasqal_new_variable_from_variable</primary></indexterm><programlisting><link linkend="rasqal-variable">rasqal_variable</link>*    rasqal_new_variable_from_variable   (<link linkend="rasqal-variable">rasqal_variable</link> *v);</programlisting>
<para>
Copy Constructor - Create a new Rasqal variable from an existing one
</para>
<para>
This does a deep copy of all variable fields</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>v</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-variable"><type>rasqal_variable</type></link> to copy
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="rasqal-variable"><type>rasqal_variable</type></link> or NULL on failure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-free-variable" role="function">
<title>rasqal_free_variable ()</title>
<indexterm zone="rasqal-free-variable"><primary>rasqal_free_variable</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_free_variable                (<link linkend="rasqal-variable">rasqal_variable</link> *v);</programlisting>
<para>
Destructor - Destroy a Rasqal variable object.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>v</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="rasqal-variable"><type>rasqal_variable</type></link> object
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-variable-print" role="function">
<title>rasqal_variable_print ()</title>
<indexterm zone="rasqal-variable-print"><primary>rasqal_variable_print</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_variable_print               (<link linkend="rasqal-variable">rasqal_variable</link> *v,
                                                         <link linkend="FILE:CAPS">FILE</link> *fh);</programlisting>
<para>
Print a Rasqal variable in a debug format.
</para>
<para>
The print debug format may change in any release.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>v</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="rasqal-variable"><type>rasqal_variable</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fh</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="FILE:CAPS"><type>FILE</type></link>* handle to print to
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-variable-set-value" role="function">
<title>rasqal_variable_set_value ()</title>
<indexterm zone="rasqal-variable-set-value"><primary>rasqal_variable_set_value</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_variable_set_value           (<link linkend="rasqal-variable">rasqal_variable</link> *v,
                                                         <link linkend="rasqal-literal">rasqal_literal</link> *l);</programlisting>
<para>
Set the value of a Rasqal variable.
</para>
<para>
The variable value is an input parameter and is copied in, not shared.
If the variable value is NULL, any existing value is deleted.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>v</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="rasqal-variable"><type>rasqal_variable</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>l</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="rasqal-literal"><type>rasqal_literal</type></link> value to set (or NULL)
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-free-memory" role="function">
<title>rasqal_free_memory ()</title>
<indexterm zone="rasqal-free-memory"><primary>rasqal_free_memory</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_free_memory                  (<link linkend="void">void</link> *ptr);</programlisting>
<para>
Free memory allocated inside rasqal.
</para>
<para>
Some systems require memory allocated in a library to
be deallocated in that library.  This function allows
memory allocated by rasqal to be freed.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ptr</parameter>&nbsp;:</term>
<listitem><simpara> memory pointer
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-alloc-memory" role="function">
<title>rasqal_alloc_memory ()</title>
<indexterm zone="rasqal-alloc-memory"><primary>rasqal_alloc_memory</primary></indexterm><programlisting><link linkend="void">void</link>*               rasqal_alloc_memory                 (<link linkend="size-t">size_t</link> size);</programlisting>
<para>
Allocate memory inside rasqal.
</para>
<para>
Some systems require memory allocated in a library to
be deallocated in that library.  This function allows
memory to be allocated inside the rasqal shared library
that can be freed inside rasqal either internally or via
<link linkend="rasqal-free-memory"><function>rasqal_free_memory()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>size</parameter>&nbsp;:</term>
<listitem><simpara> size of memory to allocate
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the address of the allocated memory or NULL on failure

</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-calloc-memory" role="function">
<title>rasqal_calloc_memory ()</title>
<indexterm zone="rasqal-calloc-memory"><primary>rasqal_calloc_memory</primary></indexterm><programlisting><link linkend="void">void</link>*               rasqal_calloc_memory                (<link linkend="size-t">size_t</link> nmemb,
                                                         <link linkend="size-t">size_t</link> size);</programlisting>
<para>
Allocate zeroed array of items inside rasqal.
</para>
<para>
Some systems require memory allocated in a library to
be deallocated in that library.  This function allows
memory to be allocated inside the rasqal shared library
that can be freed inside rasqal either internally or via
<link linkend="rasqal-free-memory"><function>rasqal_free_memory()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>nmemb</parameter>&nbsp;:</term>
<listitem><simpara> number of members
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>size</parameter>&nbsp;:</term>
<listitem><simpara> size of item
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the address of the allocated memory or NULL on failure

</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-new-xsd-decimal" role="function">
<title>rasqal_new_xsd_decimal ()</title>
<indexterm zone="rasqal-new-xsd-decimal"><primary>rasqal_new_xsd_decimal</primary></indexterm><programlisting><link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link>* rasqal_new_xsd_decimal              (void);</programlisting>
<para>
Create a new XSD Decimal object.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> new xsd:decimal object or NULL on failure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-free-xsd-decimal" role="function">
<title>rasqal_free_xsd_decimal ()</title>
<indexterm zone="rasqal-free-xsd-decimal"><primary>rasqal_free_xsd_decimal</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_free_xsd_decimal             (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *dec);</programlisting>
<para>
Destroy XSD Decimal object.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>dec</parameter>&nbsp;:</term>
<listitem><simpara> Decimal object
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-xsd-decimal-set-string" role="function">
<title>rasqal_xsd_decimal_set_string ()</title>
<indexterm zone="rasqal-xsd-decimal-set-string"><primary>rasqal_xsd_decimal_set_string</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_xsd_decimal_set_string       (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *dec,
                                                         const <link linkend="char">char</link> *string);</programlisting>
<para>
Set an XSD Decimal value from a string lexical form</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>dec</parameter>&nbsp;:</term>
<listitem><simpara> XSD Decimal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>string</parameter>&nbsp;:</term>
<listitem><simpara> lexical form
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-xsd-decimal-get-double" role="function">
<title>rasqal_xsd_decimal_get_double ()</title>
<indexterm zone="rasqal-xsd-decimal-get-double"><primary>rasqal_xsd_decimal_get_double</primary></indexterm><programlisting><link linkend="double">double</link>              rasqal_xsd_decimal_get_double       (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *dec);</programlisting>
<para>
Get an XSD Decimal as a double (may lose precision)</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>dec</parameter>&nbsp;:</term>
<listitem><simpara> XSD Decimal
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> double value.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-xsd-decimal-as-string" role="function">
<title>rasqal_xsd_decimal_as_string ()</title>
<indexterm zone="rasqal-xsd-decimal-as-string"><primary>rasqal_xsd_decimal_as_string</primary></indexterm><programlisting><link linkend="char">char</link>*               rasqal_xsd_decimal_as_string        (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *dec);</programlisting>
<para>
Get an XSD Decimal as a string lexical form.
</para>
<para>
The returned string is shared and owned by the <parameter>dec</parameter> object and
must be copied.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>dec</parameter>&nbsp;:</term>
<listitem><simpara> XSD Decimal
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> lexical form string or NULL on failure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-xsd-decimal-as-counted-string" role="function">
<title>rasqal_xsd_decimal_as_counted_string ()</title>
<indexterm zone="rasqal-xsd-decimal-as-counted-string"><primary>rasqal_xsd_decimal_as_counted_string</primary></indexterm><programlisting><link linkend="char">char</link>*               rasqal_xsd_decimal_as_counted_string
                                                        (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *dec,
                                                         <link linkend="size-t">size_t</link> *len_p);</programlisting>
<para>
Get an XSD Decimal as a string lexical form with optional length.
</para>
<para>
The returned string is shared and owned by the <parameter>dec</parameter> object and
must be copied.  If <parameter>len_p</parameter> is not NULL, the length of the returned
string is stored.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>dec</parameter>&nbsp;:</term>
<listitem><simpara> XSD Decimal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>len_p</parameter>&nbsp;:</term>
<listitem><simpara> pointer to length variable (or NULL)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> lexical form string or NULL on failure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-xsd-decimal-set-long" role="function">
<title>rasqal_xsd_decimal_set_long ()</title>
<indexterm zone="rasqal-xsd-decimal-set-long"><primary>rasqal_xsd_decimal_set_long</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_xsd_decimal_set_long         (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *dec,
                                                         long <link linkend="l">l</link> );</programlisting>
<para>
Set an XSD Decimal value from a long.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>dec</parameter>&nbsp;:</term>
<listitem><simpara> XSD Decimal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>Param2</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-xsd-decimal-set-double" role="function">
<title>rasqal_xsd_decimal_set_double ()</title>
<indexterm zone="rasqal-xsd-decimal-set-double"><primary>rasqal_xsd_decimal_set_double</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_xsd_decimal_set_double       (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *dec,
                                                         <link linkend="double">double</link> d);</programlisting>
<para>
Set an XSD Decimal value from a double.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>dec</parameter>&nbsp;:</term>
<listitem><simpara> XSD Decimal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>d</parameter>&nbsp;:</term>
<listitem><simpara> double
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-xsd-decimal-print" role="function">
<title>rasqal_xsd_decimal_print ()</title>
<indexterm zone="rasqal-xsd-decimal-print"><primary>rasqal_xsd_decimal_print</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_xsd_decimal_print            (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *dec,
                                                         <link linkend="FILE:CAPS">FILE</link> *stream);</programlisting>
<para>
Write an XSD Decimal to a FILE* stream</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>dec</parameter>&nbsp;:</term>
<listitem><simpara> XSD Decimal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>stream</parameter>&nbsp;:</term>
<listitem><simpara> FILE* stream
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-xsd-decimal-add" role="function">
<title>rasqal_xsd_decimal_add ()</title>
<indexterm zone="rasqal-xsd-decimal-add"><primary>rasqal_xsd_decimal_add</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_xsd_decimal_add              (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *result,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *a,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *b);</programlisting>
<para>
Add two XSD Decimals and store in result XSD Decimal</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>result</parameter>&nbsp;:</term>
<listitem><simpara> result variable
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>a</parameter>&nbsp;:</term>
<listitem><simpara> argment decimal 1
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>b</parameter>&nbsp;:</term>
<listitem><simpara> argument decimal 2
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-xsd-decimal-subtract" role="function">
<title>rasqal_xsd_decimal_subtract ()</title>
<indexterm zone="rasqal-xsd-decimal-subtract"><primary>rasqal_xsd_decimal_subtract</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_xsd_decimal_subtract         (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *result,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *a,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *b);</programlisting>
<para>
Subtract two XSD Decimals and store in result XSD Decimal</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>result</parameter>&nbsp;:</term>
<listitem><simpara> result variable
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>a</parameter>&nbsp;:</term>
<listitem><simpara> argment decimal 1
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>b</parameter>&nbsp;:</term>
<listitem><simpara> argument decimal 2
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-xsd-decimal-multiply" role="function">
<title>rasqal_xsd_decimal_multiply ()</title>
<indexterm zone="rasqal-xsd-decimal-multiply"><primary>rasqal_xsd_decimal_multiply</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_xsd_decimal_multiply         (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *result,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *a,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *b);</programlisting>
<para>
Multiply two XSD Decimals and store in result XSD Decimal</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>result</parameter>&nbsp;:</term>
<listitem><simpara> result variable
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>a</parameter>&nbsp;:</term>
<listitem><simpara> argment decimal 1
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>b</parameter>&nbsp;:</term>
<listitem><simpara> argument decimal 2
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-xsd-decimal-divide" role="function">
<title>rasqal_xsd_decimal_divide ()</title>
<indexterm zone="rasqal-xsd-decimal-divide"><primary>rasqal_xsd_decimal_divide</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_xsd_decimal_divide           (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *result,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *a,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *b);</programlisting>
<para>
Divide two XSD Decimals and store in result XSD Decimal
</para>
<para>
If the divisor <parameter>b</parameter> is 0, failure is returned</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>result</parameter>&nbsp;:</term>
<listitem><simpara> result variable
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>a</parameter>&nbsp;:</term>
<listitem><simpara> argment decimal 1
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>b</parameter>&nbsp;:</term>
<listitem><simpara> argument decimal 2
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-xsd-decimal-negate" role="function">
<title>rasqal_xsd_decimal_negate ()</title>
<indexterm zone="rasqal-xsd-decimal-negate"><primary>rasqal_xsd_decimal_negate</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_xsd_decimal_negate           (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *result,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *a);</programlisting>
<para>
Negate an XSD Decimal</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>result</parameter>&nbsp;:</term>
<listitem><simpara> result variable
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>a</parameter>&nbsp;:</term>
<listitem><simpara> argment decimal
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 on failure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-xsd-decimal-compare" role="function">
<title>rasqal_xsd_decimal_compare ()</title>
<indexterm zone="rasqal-xsd-decimal-compare"><primary>rasqal_xsd_decimal_compare</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_xsd_decimal_compare          (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *a,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *b);</programlisting>
<para>
Compare two XSD Decimals</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>a</parameter>&nbsp;:</term>
<listitem><simpara> first XSD decimal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>b</parameter>&nbsp;:</term>
<listitem><simpara> second XSD decimal
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> &lt;0 if <parameter>a</parameter> is less than <parameter>b</parameter>, 0 if equal, &gt;1 otherwise
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-xsd-decimal-equals" role="function">
<title>rasqal_xsd_decimal_equals ()</title>
<indexterm zone="rasqal-xsd-decimal-equals"><primary>rasqal_xsd_decimal_equals</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_xsd_decimal_equals           (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *a,
                                                         <link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *b);</programlisting>
<para>
Compare two XSD Decimals for equality.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>a</parameter>&nbsp;:</term>
<listitem><simpara> first XSD Decimal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>b</parameter>&nbsp;:</term>
<listitem><simpara> second XSD Decimal
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 if equal.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-xsd-decimal-is-zero" role="function">
<title>rasqal_xsd_decimal_is_zero ()</title>
<indexterm zone="rasqal-xsd-decimal-is-zero"><primary>rasqal_xsd_decimal_is_zero</primary></indexterm><programlisting><link linkend="int">int</link>                 rasqal_xsd_decimal_is_zero          (<link linkend="rasqal-xsd-decimal">rasqal_xsd_decimal</link> *d);</programlisting>
<para>
Test if an XSD decimal is zero.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>d</parameter>&nbsp;:</term>
<listitem><simpara> decimal
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> non-0 if decimal is zero
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-triple-parts" role="enum">
<title>enum rasqal_triple_parts</title>
<indexterm zone="rasqal-triple-parts"><primary>rasqal_triple_parts</primary></indexterm><programlisting>typedef enum {
  RASQAL_TRIPLE_SUBJECT  = 1,
  RASQAL_TRIPLE_PREDICATE= 2,
  RASQAL_TRIPLE_OBJECT   = 4,
  RASQAL_TRIPLE_ORIGIN   = 8,
  RASQAL_TRIPLE_GRAPH    = RASQAL_TRIPLE_ORIGIN,
  RASQAL_TRIPLE_SPO      = RASQAL_TRIPLE_SUBJECT | RASQAL_TRIPLE_PREDICATE | RASQAL_TRIPLE_OBJECT,
  RASQAL_TRIPLE_SPOG     = RASQAL_TRIPLE_SPO | RASQAL_TRIPLE_GRAPH
} rasqal_triple_parts;
</programlisting>
<para>
Flags for parts of a triple.</para>
<para>

</para><variablelist role="enum">
<varlistentry id="RASQAL-TRIPLE-SUBJECT:CAPS" role="constant">
<term><literal>RASQAL_TRIPLE_SUBJECT</literal></term>
<listitem><simpara> Subject present in a triple.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-TRIPLE-PREDICATE:CAPS" role="constant">
<term><literal>RASQAL_TRIPLE_PREDICATE</literal></term>
<listitem><simpara> Predicate present in a triple.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-TRIPLE-OBJECT:CAPS" role="constant">
<term><literal>RASQAL_TRIPLE_OBJECT</literal></term>
<listitem><simpara> Object present in a triple.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-TRIPLE-ORIGIN:CAPS" role="constant">
<term><literal>RASQAL_TRIPLE_ORIGIN</literal></term>
<listitem><simpara> Origin/graph present in a triple.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-TRIPLE-GRAPH:CAPS" role="constant">
<term><literal>RASQAL_TRIPLE_GRAPH</literal></term>
<listitem><simpara>  Alias for RASQAL_TRIPLE_ORIGIN
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-TRIPLE-SPO:CAPS" role="constant">
<term><literal>RASQAL_TRIPLE_SPO</literal></term>
<listitem><simpara> Subject, Predicate and Object present in a triple.
</simpara></listitem>
</varlistentry>
<varlistentry id="RASQAL-TRIPLE-SPOG:CAPS" role="constant">
<term><literal>RASQAL_TRIPLE_SPOG</literal></term>
<listitem><simpara> Subject, Predicate, Object, Graph present in a triple.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="bind-match" role="function">
<title>bind_match ()</title>
<indexterm zone="bind-match"><primary>bind_match</primary></indexterm><programlisting><link linkend="rasqal-triple-parts">rasqal_triple_parts</link> bind_match                          (<link linkend="struct-rasqal-triples-match-s">struct rasqal_triples_match_s</link> *,
                                                         <link linkend="void">void</link> *user_data,
                                                         <link linkend="rasqal-variable">rasqal_variable</link> *bindings[4],
                                                         <link linkend="rasqal-triple-parts">rasqal_triple_parts</link> parts);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>bindings</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>parts</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="next-match" role="function">
<title>next_match ()</title>
<indexterm zone="next-match"><primary>next_match</primary></indexterm><programlisting><link linkend="void">void</link>                next_match                          (<link linkend="struct-rasqal-triples-match-s">struct rasqal_triples_match_s</link> *,
                                                         <link linkend="void">void</link> *user_data);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="is-end" role="function">
<title>is_end ()</title>
<indexterm zone="is-end"><primary>is_end</primary></indexterm><programlisting><link linkend="int">int</link>                 is_end                              (<link linkend="struct-rasqal-triples-match-s">struct rasqal_triples_match_s</link> *,
                                                         <link linkend="void">void</link> *user_data);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="finish" role="function">
<title>finish ()</title>
<indexterm zone="finish"><primary>finish</primary></indexterm><programlisting><link linkend="void">void</link>                finish                              (<link linkend="struct-rasqal-triples-match-s">struct rasqal_triples_match_s</link> *,
                                                         <link linkend="void">void</link> *user_data);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-triples-match" role="typedef">
<title>rasqal_triples_match</title>
<indexterm zone="rasqal-triples-match"><primary>rasqal_triples_match</primary></indexterm><programlisting>typedef struct rasqal_triples_match_s rasqal_triples_match;
</programlisting>
<para>
Triples match structure as initialised by <link linkend="rasqal-triples-source"><type>rasqal_triples_source</type></link>
method init_triples_match.</para>
<para>

</para></refsect2>
<refsect2 id="rasqal-triple-meta" role="struct">
<title>rasqal_triple_meta</title>
<indexterm zone="rasqal-triple-meta"><primary>rasqal_triple_meta</primary></indexterm><programlisting>typedef struct {
  /* triple (subject, predicate, object) and origin */
  rasqal_variable* bindings[4];

  rasqal_triples_match *triples_match;

  void *context;

  rasqal_triple_parts parts;

  /* non-0 if the associated triple pattern contains no variables */
  int is_exact;

  /* non-0 if the triple pattern has been fully executed */
  int executed;
} rasqal_triple_meta;
</programlisting>
<para>
Triple matching metadata for one triple pattern.</para>
<para>

</para><variablelist role="struct">
<varlistentry>
<term><link linkend="rasqal-variable">rasqal_variable</link>&nbsp;*<structfield>bindings</structfield>[4];</term>
<listitem><simpara> Variable bindings for this triple+origin to set.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="rasqal-triples-match">rasqal_triples_match</link>&nbsp;*<structfield>triples_match</structfield>;</term>
<listitem><simpara> The matcher that is setting these bindings.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="void">void</link>&nbsp;*<structfield>context</structfield>;</term>
<listitem><simpara> Context data used by the matcher.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="rasqal-triple-parts">rasqal_triple_parts</link>&nbsp;<structfield>parts</structfield>;</term>
<listitem><simpara> Parts of the triple to match/bindings to set.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="int">int</link>&nbsp;<structfield>is_exact</structfield>;</term>
<listitem><simpara> non-0 if all parts of the triple are given
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="int">int</link>&nbsp;<structfield>executed</structfield>;</term>
<listitem><simpara>

</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="init-triples-match" role="function">
<title>init_triples_match ()</title>
<indexterm zone="init-triples-match"><primary>init_triples_match</primary></indexterm><programlisting><link linkend="int">int</link>                 init_triples_match                  (<link linkend="rasqal-triples-match">rasqal_triples_match</link> *rtm,
                                                         <link linkend="struct-rasqal-triples-source-s">struct rasqal_triples_source_s</link> *rts,
                                                         <link linkend="void">void</link> *user_data,
                                                         <link linkend="rasqal-triple-meta">rasqal_triple_meta</link> *m,
                                                         <link linkend="rasqal-triple">rasqal_triple</link> *t);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>rtm</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>rts</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>m</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>t</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="triple-present" role="function">
<title>triple_present ()</title>
<indexterm zone="triple-present"><primary>triple_present</primary></indexterm><programlisting><link linkend="int">int</link>                 triple_present                      (<link linkend="struct-rasqal-triples-source-s">struct rasqal_triples_source_s</link> *rts,
                                                         <link linkend="void">void</link> *user_data,
                                                         <link linkend="rasqal-triple">rasqal_triple</link> *t);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>rts</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>t</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="free-triples-source" role="function">
<title>free_triples_source ()</title>
<indexterm zone="free-triples-source"><primary>free_triples_source</primary></indexterm><programlisting><link linkend="void">void</link>                free_triples_source                 (<link linkend="void">void</link> *user_data);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-triples-source" role="typedef">
<title>rasqal_triples_source</title>
<indexterm zone="rasqal-triples-source"><primary>rasqal_triples_source</primary></indexterm><programlisting>typedef struct rasqal_triples_source_s rasqal_triples_source;
</programlisting>
<para>
Triples source as initialised by a <link linkend="rasqal-triples-source-factory"><type>rasqal_triples_source_factory</type></link>.</para>
<para>

</para></refsect2>
<refsect2 id="rasqal-triples-source-factory" role="struct">
<title>rasqal_triples_source_factory</title>
<indexterm zone="rasqal-triples-source-factory"><primary>rasqal_triples_source_factory</primary></indexterm><programlisting>typedef struct {
  void *user_data;
  size_t user_data_size;

  int (*new_triples_source)(rasqal_query* query, void *factory_user_data, void *user_data, rasqal_triples_source* rts);
} rasqal_triples_source_factory;
</programlisting>
<para>
A factory that initialises <link linkend="rasqal-triples-source"><type>rasqal_triples_source</type></link> structures
to returning matches to a triple pattern.</para>
<para>

</para><variablelist role="struct">
<varlistentry>
<term><link linkend="void">void</link>&nbsp;*<structfield>user_data</structfield>;</term>
<listitem><simpara> User data for triples_source_factory.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="size-t">size_t</link>&nbsp;<structfield>user_data_size</structfield>;</term>
<listitem><simpara> Size Of <parameter>user_data</parameter> for new_triples_source.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>new_triples_source</structfield>&nbsp;()</term>
<listitem><simpara> Create a new triples source - returns non-zero on failure &lt; 0 is a 'no rdf data error', &gt; 0 is an unspecified error..
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="rasqal-set-triples-source-factory" role="function">
<title>rasqal_set_triples_source_factory ()</title>
<indexterm zone="rasqal-set-triples-source-factory"><primary>rasqal_set_triples_source_factory</primary></indexterm><programlisting><link linkend="void">void</link>                rasqal_set_triples_source_factory   (<link linkend="rasqal-world">rasqal_world</link> *,
                                                         <link linkend="void">void</link> (register_fnrasqal_triples_source_factory *factory) (),
                                                         <link linkend="void">void</link> *user_data);</programlisting>
<para>
Register the factory to return triple sources.
</para>
<para>
Registers the factory that returns triples sources.  Note that
there is only one of these per runtime. 
</para>
<para>
The rasqal_triples_source_factory factory method new_triples_source is
called with the user data for some query and rasqal_triples_source.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>register_fn</parameter>&nbsp;:</term>
<listitem><simpara> registration function
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara> user data for registration
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
