The Rasqal library provides a high-level interface to RDF query
parsing, query construction, query execution over an RDF graph and
query results manipulation and formatting. The library provides APIs
to each of the steps in the process and provides support for handling
multiple query language syntaxes. At present Rasqal partially supports the
W3C draft SPARQL query language and fully supports RDQL.
Rasqal uses the libraptor(3) library for providing URI handling,
WWW content retrieval and other support functions.
LIBRARY INITIALISATION AND CLEANUP
rasqal_world *rasqal_new_world(void)
Create the rasqal world object. This must be called before use
of any rasqal library functions.
void rasqal_free_world(rasqal_world* world)
Destroy the rasqal world object and cleanup the library. This
must be called after destroying all rasqal objects.
LIBRARY FUNCTIONS
These functions provide general library features not associated
to any particular class.
int rasqal_languages_enumerate(raptor_world* world, const unsigned int counter, const char **name, const char **label, const unsigned char **uri_string)
Return the name, label, uri_string (all optional)
for a query language with a given integer counter, returning non-zero
if no such query language at that offset exists.
The counter should start from 0 and be incremented by 1
until the function returns non-zero.
int rasqal_language_name_check(raptor_world* world, const char *name)
Check name is a known query language name.
int rasqal_query_set_feature(rasqal_query* query, rasqal_feature feature, int value)
Set a query feature feature to a particular integer value.
Returns non 0 on failure or if the feature is unknown.
The current defined parser features are:
Feature Values RASQAL_FEATURE_NO_NET Boolean (non 0 true)
If the no_net
feature is true (default false) then network requests are denied.
int rasqal_query_set_feature_string(rasqal_query* query, rasqal_feature feature, const unsigned char* value)
Set a query feature feature to a particular string value.
Returns non 0 on failure or if the feature is unknown.
The current defined query features are given in
rasqal_query_set_feature and at present only take integer values. If
an integer value feature is set with this function, value is
interpreted as an integer and then that value is used.
int rasqal_query_get_feature(rasqal_query* query, rasqal_feature feature)
Get a query feature integer value. The allowed feature values
and types are given under rasqal_features_enumerate.
Create a new rasqal query object for the query syntax with name
name. Currently "rdql" for the RDF Data Query Language
and "sparql" for the SPARQL query language are recognised.
A language may alternatively be identified by a URI uri.
If name and uri are both NULL the default query language
is selected, currently "sparql".
Get the sequence of variables that are returning bindings in the
query such as when explicitly chosen via SELECT in RDQL or SPARQL
or all variables mentioned with SELECT *.
Print a query in a debug format. This format may change in any release.
int rasqal_query_prepare(rasqal_query* query, const unsigned char *query_string, raptor_uri *base_uri)
Prepare a query string query_stringwith
optional base URI uri_string for execution,
parsing it and modifying the rasqal_query internals.
Return non-0 on failure.
int rasqal_query_add_data_graph(rasqal_query* query, raptor_uri* uri, raptor_uri* name_uri, int flags)
Add a data graph to the query's data sources, constructing a new data
graph object with URI uri, optional name URI name_uri and
flags. See rasqal_new_data_graph for a description of
the argumetns.
void rasqal_query_set_default_generate_bnodeid_parameters(rasqal_query* rdf_query, char* prefix, int base)
Control the default method for generation of IDs for blank nodes.
The method uses a short string prefix and an integer
base to generate the identifier which is not guaranteed to
be a strict concatenation. If prefix is NULL, the
default is used. If base is less than 1, it is initialised to 1.
Allow full customisation of the generated IDs by setting a callback
handler and associated user_data that is called whenever
a blank node or bag identifier is required. The memory returned
is deallocated inside rasqal. Some systems require this to be
allocated inside the same library, in which case the
rasqal_alloc_memory function may be useful.
Convert a string of length len into an escaped form
suitable for the query string. If output_len is not NULL, it
is a pointer to the location to store the output string lenght.
The returned string must be freed by the caller with
rasqal_free_memory.
GRAPH PATTERN CLASS
A class for graph patterns in a query - a set of triple patterns)
with flags and possible sub-graph patterns
GRAPH PATTERN CONSTRUCTOR
There is no public constructor for this class, it is constructed
when the query is prepared from a syntax. The query methods
rasqal_query_get_graph_pattern_sequence
and rasqal_query_get_graph_pattern provide access to
the top-level graph patterns in a query.
rasqal_triple* rasqal_graph_pattern_get_triple(rasqal_graph_pattern* graph_pattern, int idx)
Get a rasqal_triple inside a graph pattern at index idx returning NULL
when the index is out of range.
int rasqal_graph_pattern_add_sub_graph_pattern(rasqal_graph_pattern* graph_pattern, rasqal_graph_pattern* sub_graph_pattern)
Add a sub-graph pattern sub_graph_pattern to the sequence of
sub-graph patterns inside the graph pattern.
Get the sequence of constraints in the graph pattern.
rasqal_expression* rasqal_graph_pattern_get_constraint(rasqal_graph_pattern* gp, int idx)
Get one constraint expression in the sequences of constraint to match
in the graph pattern at index idx.
int rasqal_graph_pattern_get_index(rasqal_graph_pattern* graph_pattern)
Get the graph pattern absolute index in the array of graph patterns.
The index is assigned when rasqal_query_prepareP is run on the
query containing the graph pattern.
Utility function to get a graph pattern operator as a string.
int rasqal_graph_pattern_visit(rasqal_graph_pattern* graph_pattern, rasqal_graph_pattern_visit_fn fn, void *user_data)
Visit a user function fn recursively over the graph pattern and it's
sub-graph patterns. The order is the first graph pattern at hand and then
the arguments, if any. function fn is called at each point
with the arguments of user_data and the graph pattern.
QUERY RESULTS CLASS
A class for the results of a query. The results can be in different
formats - variable bindings, RDF graphs as a sequence of triples
or a boolean result. The format returned is determined by the
query which is query-language specific.
QUERY RESULTS CONSTRUCTOR
There is no public constructor for this class, the
rasqal_query_results* is returned from
rasqal_query_execute.
int rasqal_query_results_is_bindings(rasqal_query_results* query_results)
int rasqal_query_results_is_boolean(rasqal_query_results* query_results)
int rasqal_query_results_is_graph(rasqal_query_results* query_results)
int rasqal_query_results_is_syntax(rasqal_query_results* query_results);
Return non-0 if the rasqal_query_results is of the given
format. Only one of these will be non-0 for any result.
int rasqal_query_results_read(raptor_iostream* iostr, rasqal_query_results* results, raptor_uri* format_uri, raptor_uri* base_uri)
Read a query results in a syntax from the read iostr iostream, the
format of the syntax is given by the format_uri URI, with
an optional base URI base_uri that may be used. The
values of format_uri supported are provided by at runtime
by the function rasqal_query_results_formats_enumerate().
This uses the librdf_query_results_formatter class internally.
int rasqal_query_results_write(raptor_iostream *iostr, rasqal_query_results *results, raptor_uri *format_uri, raptor_uri *base_uri)
Write the query results in a syntax to the write iostr iostream, the
format of the syntax is given by the format_uri URI, with
an optional base URI base_uri that may be used. The
values of format_uri supported are provided by at runtime
by the function rasqal_query_results_formats_enumerate().
This uses the librdf_query_results_formatter class internally.
QUERY VARIABLE BINDINGS RESULTS METHODS
int rasqal_query_results_get_count(rasqal_query_results *query_result)
Get the current number of variable bindings results returned.
(Variable bindings results only)
int rasqal_query_results_next(rasqal_query_results *query_results)
Move to the next variable bindings result, returning non-0 on failure
or results are exhausted. (Variable bindings results only)
int rasqal_query_results_finished(rasqal_query_results *query_results)
Find out if the variable binding results are exhausted, return non-0 if results
are finished or the query failed. (Variable bindings results only)
int rasqal_query_results_get_bindings(rasqal_query_results *query_results, const unsigned char ***names, rasqal_literal ***values)
Get all variable binding names and values for the current result.
If names is not NULL, it is set to the address of a shared array
of names of the bindings (an output parameter).
If values is not NULL, it is set to the address of a shared array
of rasqal_literal* binding values. Note that both the
names or values are shared and must not be freed by the caller.
Returns non-0 if the assignment failed. (Variable bindings results only)
rasqal_literal* rasqal_query_results_get_binding_value(rasqal_query_results *query_results, int offset)
Get one variable binding literal value for the current result. Returns the
value of the variable indexed in the sequence of variable bindings
at position offset. (Variable bindings results only)
const unsigned char* rasqal_query_results_get_binding_name(rasqal_query_results *query_results, int offset)
Get the name of the variable indexed in the sequence of variable bindings
at position offset. (Variable bindings results only)
Return the current triple in the RDF graph results or NULL at end of
results or on failure. The returned raptor_statement is a
shared pointer. (Graph results format only).
int rasqal_query_results_next_triple(rasqal_query_results *query_results)
Move to the next triple in the RDF graph results, returning non-0
at end of results or on failure. (Graph results format only).
QUERY RESULTS FORMATTER CLASS
A class for formatting the results of a query into a syntax.
Create a new query results formatter for the name or uri.
The rasqal_query_results_formats_enumerate() function returns
the allowed names and/or uris. If name and uri are both
NULL, the default query results format is used.
Create a new query results formatter for the output mime_type.
The rasqal_query_results_formats_enumerate_full() function returns
the allowed names, uris and mime types.
rasqal_query_results_formatter_get_mime_type() can return the
mime type of a constructed object.
int rasqal_query_results_formats_enumerate(const unsigned int counter, const char **name, const char **label, const unsigned char **uri_string, const char **mime_type, int flags)
Get query results formats information by counter.. When
counter is 0, this returns the default query results format. The
name, label, uri_string and/or mime_type
may be returned if they are not NULL. Flags may be either
RASQAL_QUERY_RESULTS_FORMAT_FLAG_READER or
RASQAL_QUERY_RESULTS_FORMAT_FLAG_WRITER to return formats that can be
read or written respectively.
Check if a query results formatter with the given name,
uri or mime_type exists, as would be used by
the constructors rasqal_new_query_results_formatter()
or rasqal_new_query_results_formatter_by_mime_type() if called.
LITERAL CLASS
A class for the values returned as parts of triples and in variable
bindings. The rasqal_literal structure is public and defined in
rasqal.h however note that some fields are used for different
literal types in different ways. The types of literals are defined
in the rasqal_literal_type enum.
LITERAL CONSTRUCTORS
There a several constructors for rasqal_literal to build them from
simple types and existing rasqal_literal objects. NOTE: Any objects
or strings passed into these constructors becomed owned by the
literal object except where noted.
Create a new Rasqal string literal.
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 at the time this
constructor is called.
If the string literal is datatyped and of certain types recognised
(currently xsd:decimal, xsd:double) it may be internally converted to
a different literal type.
Return a rasqal literal as a string value. This always succeeds.
const unsigned char* rasqal_literal_as_string_flags(rasqal_literal* literal, int flags, int* error)
Return a rasqal literal as a string value according to flags. The
only defined string value at present is RASQAL_COMPARE_XQUERY to
use XQuery conversion rules. If error is not NULL, it will be
set to non-0 if there is an error.
Return a new rasqal literal into one suitable for a node in an RDF triple
or binding - as a URI, literal string (or datatyped) or blank node.
The returned literal is owned by the caller and must be freed by
rasqal_free_literal.
int rasqal_literal_compare(rasqal_literal* literal1, rasqal_literal* literal2, rasqal_compare_flags flags, int* error)
Compare two literals with type promotion across their range. If the
types are not the same, they are promoted. If one is a floating, the
other is promoted to floating, otherwise for integers, otherwise as
strings (all literals have a string value).
flags affects string comparisons. If the
RASQAL_COMPARE_NOCASE bit is set, a case independent
comparison is made.
The return value is comparable to strcmp(3), first before second
returns <0. equal returns 0, and first after second returns >0.
If there is no ordering, such as for URIs, the return value
is 0 for equal, non-0 for different (using raptor_uri_equals).
int rasqal_literal_equals(rasqal_literal* literal1, rasqal_literal* literal2)
Compare two literals with no type promotion
If literal2's value is a boolean, it will match
the string "true" or "false" in literal1.
A class for triples of three literals, used for matching triples in a
query where the literals may be variables as well as in then
interface between Rasqal and RDF systems using RDF triples, when the
literals may not be literals. The structure of this class is public
and defined in rasqal.h
A class for variable name and literal used to capture a variable
with optional value binding such as returned as query results by
various methods. The structure of this class is public and defined
in rasqal.h
Create a new rasqal variable scoped to a Rasqal query, with required
name and optional rasqal_literal value. This creates a
variable of type RASQAL_VARIABLE_TYPE_NORMAL.
Create a new rasqal variable scoped to a Rasqal query, with required
name, optional rasqal_literal value and type type
either
RASQAL_VARIABLE_TYPE_NORMAL or RASQAL_VARIABLE_TYPE_ANONYMOUS
Set the value of a rasqal variable to an rasqal_literal value, freeing
any current value. The new literal may be NULL.
PREFIX CLASS
A class for namespace name/URI prefix association used to shorten
URIs in some query languages using XML-style QNames. The structure of this
class is public and defined in rasqal.h
Print a prefix in a debug format. This format may change in any release.
EXPRESSION CLASS
A class for constraint expressions over literals and variables. The
expression operators are defined in rasqal.h as enum rasqal_op
and take one, two or more complex parameters.
Evalute an expression, returning a rasqal boolean with the result or
NULL on failure. If flags are RASQAL_COMPARE_XQUERY then XQuery
comparison and type promotions are used.
int rasqal_expression_visit(rasqal_expression* expression, rasqal_expression_visit_fn fn, void *user_data)
Visit a user function fn recursively over the expression and it's
sub-expressions. The order is the first expression at hand and then
the arguments, if any. function fn is called at each point
with the arguments of user_data and the expression.
DATA GRAPH CLASS
A class for graph data sources to query over from a source URI
with an optional name URI.
DATA GRAPH CONSTRUCTOR
rasqal_data_graph* rasqal_new_data_graph(raptor_uri* uri, raptor_uri* name_uri, int flags)
Create a new data graph with source URI uri and optional
name URI name_uri. Flags can be
RASQAL_DATA_GRAPH_NONE, RASQAL_DATA_GRAPH_NAMED or
RASQAL_DATA_GRAPH_BACKGROUND.
Get the decimal as a string plus optional length stored in
len_p if it is not NULL . The returned string is shared and must
be copied by the caller.
int rasqal_xsd_decimal_set_long(rasqal_xsd_decimal* dec, long l)
Set the decimal value from a long.
int rasqal_xsd_decimal_set_double(rasqal_xsd_decimal* dec, double d)
Set the decimal value from a double.
int rasqal_xsd_decimal_print(rasqal_xsd_decimal* dec, FILE* stream)
Print the decimal to a FILE* stream.
int rasqal_xsd_decimal_add(rasqal_xsd_decimal* result, rasqal_xsd_decimal* a, rasqal_xsd_decimal* b)
Perform decimal a + b and store the result in result.
int rasqal_xsd_decimal_subtract(rasqal_xsd_decimal* result, rasqal_xsd_decimal* a, rasqal_xsd_decimal* b)
Perform decimal a - b and store the result in result.
int rasqal_xsd_decimal_multiply(rasqal_xsd_decimal* result, rasqal_xsd_decimal* a, rasqal_xsd_decimal* b)
Perform decimal a * b and store the result in result.
int rasqal_xsd_decimal_divide(rasqal_xsd_decimal* result, rasqal_xsd_decimal* a, rasqal_xsd_decimal* b)
Perform decimal a / b and store the result in result.
int rasqal_xsd_decimal_negate(rasqal_xsd_decimal* result, rasqal_xsd_decimal* a)
Perform decimal - a and store the result in result.
int rasqal_xsd_decimal_compare(rasqal_xsd_decimal* a, rasqal_xsd_decimal* b)
Compare decimal a to b and return <0, 0 or >0 if a is < b
a = b or a > b in the same fashion as strcmp() does for strings.
int rasqal_xsd_decimal_equals(rasqal_xsd_decimal* a, rasqal_xsd_decimal* b)
Return non-0 if decimal a equals b.
int rasqal_xsd_decimal_is_zero(rasqal_xsd_decimal* d)
Return non-0 if decimal a is zero.
API CHANGES
0.9.16
Removed rasqal_init and rasqal_finish.
Added a new rasqal_world object to manage library allocations and
classes with constructor rasqal_new_world and destructor
rasqal_free_world.
The following functions now take a librdf_world* world argument as
the first argument:
rasqal_language_name_check,
rasqal_languages_enumerate,
rasqal_new_query,
rasqal_query_results_formats_check ,
rasqal_new_query_results_formatter,
rasqal_new_query_results_formatter_by_mime_type,
rasqal_new_integer_literal,
rasqal_new_typed_literal,
rasqal_new_double_literal,
rasqal_new_float_literal,
rasqal_new_uri_literal,
rasqal_new_pattern_literal,
rasqal_new_string_literal,
rasqal_new_simple_literal,
rasqal_new_boolean_literal,
rasqal_new_variable_literal,
rasqal_new_decimal_literal,
rasqal_new_decimal_literal_from_decimal
rasqal_query_add_variable, rasqal_query_add_prefix and
rasqal_graph_pattern_add_sub_graph_pattern now have int return values
for catchng allocation failure.
rasqal_query_results_formats_enumerate gains a flags argument
with values RASQAL_QUERY_RESULTS_FORMAT_FLAG_READER or
RASQAL_QUERY_RESULTS_FORMAT_FLAG_WRITER
Added rasqal_query_results_formatter_read
Added rasqal_new_variable_from_variable
The rasqal_triples_match struct now has a world field.
Removed deprecated functions and macros:
rasqal_new_floating_literal,
rasqal_graph_pattern_get_flags and
rasqal_expression_foreach functions,
rasqal_expression_foreach_fn typedef and
RASQAL_LITERAL_FLOATING macro
0.9.15
Added rasqal_xsd_decimal type and support functions
rasqal_new_decimal_literal_from_decimal,
rasqal_new_xsd_decimal,
rasqal_free_xsd_decimal,
rasqal_xsd_decimal_set_string,
rasqal_xsd_decimal_get_double,
rasqal_xsd_decimal_as_string,
rasqal_xsd_decimal_as_counted_string,
rasqal_xsd_decimal_set_long,
rasqal_xsd_decimal_set_double,
rasqal_xsd_decimal_print,
rasqal_xsd_decimal_add,
rasqal_xsd_decimal_subtract,
rasqal_xsd_decimal_multiply,
rasqal_xsd_decimal_divide,
rasqal_xsd_decimal_negate,
rasqal_xsd_decimal_compare,
rasqal_xsd_decimal_equals and
rasqal_xsd_decimal_is_zero
Added RASQAL_EXPR_SAMETERM for SPARQL sameTerm
Added rasqal_compare_flags RASQAL_COMPARE_RDF and RASQAL_COMPARE_URI.
Added rasqal_new_typed_literal
Added rasqal_new_float_literal
Added rasqal_literal_datatype
Added rasqal_literal_value
Added rasqal_tripleparts RASQAL_TRIPLE_GRAPH, RASQAL_TRIPLE_SPO and
RASQAL_TRIPLE_SPOG
0.9.14
Added rasqal_new_0op_expression.
Added rasqal_new_query_results_formatter_by_mime_type
and rasqal_query_results_formatter_get_mime_type.
Added rasqal_query_results_formats_check and
rasqal_query_results_formats_enumerate_full.
Added Brasqal_query_results_is_syntax.
Added query results group by accessor methods:
rasqal_query_get_group_conditions_sequence and
rasqal_query_get_group_condition for LAQRS.
rasqal_query_set_distinct now takes a mode argument.
Added new query verbs RASQAL_QUERY_VERB_DELETE
and RASQAL_QUERY_VERB_INSERT for LAQRS.
Added rasqal_query_get_explain
rasqal_expression structure looses an unused field variable.
Added rasqal_expression types
RASQAL_EXPR_GROUP_COND_ASC,
RASQAL_EXPR_GROUP_COND_DESC,
RASQAL_EXPR_COUNT and
RASQAL_EXPR_VARSTAR for LAQRS.
rasqal_variable structure gains a new field expression for LAQRS..
Added static variables rasqal_license_string
and rasqal_home_url_string
0.9.13
Added rasqal_feature system with single feature
RASQAL_FEATURE_NO_NET and functions
rasqal_feature_from_uri, rasqal_feature_value_type,
rasqal_features_enumerate, rasqal_get_feature_count,
rasqal_query_get_feature, rasqal_query_get_feature_string,
rasqal_query_set_feature and rasqal_query_set_feature_string.
int.
Added rasqal_query_results_formatter class with
constructor rasqal_new_query_results_formatter
destructor rasqal_free_query_results_formatter and method
rasqal_query_results_formatter_write.
Added rasqal_query_results_formats_enumerate for listing
supported formats.
0.9.12
Added rasqal_query_iostream_write_escaped_counted_string
and rasqal_query_escape_counted_string
Added an rasqal_graph_pattern_operator enumerated type.
with the following (useful) values:
RASQAL_GRAPH_PATTERN_OPERATOR_BASIC (for triple patterns),
RASQAL_GRAPH_PATTERN_OPERATOR_OPTIONAL (for SPARQL OPTIONAL),
RASQAL_GRAPH_PATTERN_OPERATOR_UNION,
RASQAL_GRAPH_PATTERN_OPERATOR_GROUP and
RASQAL_GRAPH_PATTERN_OPERATOR_GRAPH (for SPARQL GRAPH).
Added graph pattern method rasqal_graph_pattern_get_operator
Deprecated rasqal_graph_pattern_get_flags replaced by the above.
Added helper function rasqal_graph_pattern_operator_as_string.
Modified the type of the final argument of
rasqal_new_graph_pattern_from_sequence and
rasqal_graph_pattern_add_triples from an integer to a
rasqal_graph_pattern_operator enumeration.
Removed documentation of removed functions deprecated in 0.9.9.
Added expressions RASQAL_EXPR_ORDER_COND_ASC,
RASQAL_EXPR_ORDER_COND_DESC and RASQAL_EXPR_ORDER_COND_NONE.
Added enum rasqal_variable_type for typing variables.
Added variable constructor rasqal_new_variable_typed to create
typed variables.
Added enum rasqal_query_verb for the main query verbs with
values RASQAL_QUERY_VERB_SELECT,
RASQAL_QUERY_VERB_CONSTRUCTRASQAL_QUERY_VERB_DESCRIBE
and RASQAL_QUERY_VERB_ASK.
Added rasqal_query_verb_as_string to get a strign for a query verb.
Deprecated the rasqal_triple flags field and the triple methods
rasqal_triple_set_flags and rasqal_triple_get_flags.
0.9.8
Added a Data Graph class with constructor
rasqal_new_data_graph, destructor
rasqal_free_data_graph and debug method
rasqal_data_graph_print.
Added casting expressions with type RASQAL_EXPR_CAST
and expression constructor rasqal_new_cast_expression
Added a no-arg graph pattern constructor rasqal_new_graph_pattern
Added graph pattern methods
rasqal_graph_pattern_add_triples to add triples to
a graph pattern and
rasqal_graph_pattern_add_sub_graph_pattern to add
a sub-graph pattern to a graph pattern.
Added graph pattern methods
rasqal_graph_pattern_add_constraint,
rasqal_graph_pattern_get_constraint_sequence and
rasqal_graph_pattern_get_constraint
to add constraints to a graph pattern.
Added query methods for data graphs:
rasqal_query_add_data_graph,
rasqal_query_get_data_graph_sequence,
rasqal_query_get_data_graph.
Deprecated query methods:
rasqal_query_add_constraint,
rasqal_query_get_constraint_sequencerasqal_query_get_constraint,
rasqal_query_add_source,
rasqal_query_get_source_sequence and
rasqal_query_get_source.
Removed deprecated query methods:
rasqal_query_get_variable_sequence and rasqal_query_add_triple.
0.9.7
Export rasqal_graph_pattern typedef for graph patterns
and added access methods:
rasqal_query_get_graph_pattern_sequencerasqal_query_get_graph_pattern, rasqal_graph_pattern_get_triple,
rasqal_graph_pattern_get_sub_graph_pattern_sequence,
rasqal_graph_pattern_get_sub_graph_pattern,
rasqal_graph_pattern_get_flags and exported previously internal rasqal_graph_pattern_print
Export rasqal_pattern_flags enum for graph pattern flags.
Added rasqal_query_get_bound_variable_sequence
and rasqal_query_get_all_variable_sequence.
Added rasqal_query_get_distinct
and rasqal_query_get_limit to get access to query flags.
Deleted RASQAL_EXPR_PATTERN which was never used.
0.9.6
Added new 1-argument expressions to the expression constructor;
rasqal_op enum gained the following values:
RASQAL_EXPR_LANG,
RASQAL_EXPR_DATATYPE,
RASQAL_EXPR_BOUND,
RASQAL_EXPR_ISURI,
RASQAL_EXPR_ISBLANK and
RASQAL_EXPR_ISLITERAL
Added user-defined function expressions to the expression constructor:
rasqal_op enum gained RASQAL_EXPR_FUNCTION value;
rasqal_expression gained name and args fields
and added rasqal_new_function_expression to construct
a function expression.
Added rasqal_query_results_is_bindings,
rasqal_query_results_is_boolean and
rasqal_query_results_is_graph to test the format of query
result.
Added rasqal_query_results_get_boolean
to get the value of a boolean query result.
Added rasqal_query_results_get_triple and
rasqal_query_results_next_triple to return an RDF graph query result.
Added rasqal_query_results_write to format query results
into a syntax, written to a raptor iostream.
Changed rasqal_new_floating_literal to take a double argument.
Added flags for triples with rasqal_triple_get_flags and
rasqal_triple_set_flags to get and set them.
Added rasqal_triple_parts enum and updated the bind_match
factory method of the rasqal_triples_match structure to take
and return them.
Added a rasqal_triple_parts type field parts to the
rasqal_triple_meta structure
0.9.4
No API changes.
0.9.3
The struct rasqal_prefix gained a declared field.
The struct rasqal_triple gained an origin field; not used at
present but intended to support work on tracking triple provenance
such as provided by Redland Contexts.
Added methods rasqal_triple_set_origin and
rasqal_triple_get_origin to support the above.
struct rasqal_triple_meta now takes a 4-array of bindings,
the fourth being the origin.
Exported function rasqal_set_triples_source_factory publically
as intended.
0.9.2
Several functions changed their parameters or return values from
char* to unsigned char* or const unsigned char* to reflect the actual
use.
Changed to return a const unsigned char*:
rasqal_literal_as_string
Changed to take const unsigned char* (or add const):
rasqal_new_floating_literal rasqal_new_pattern_literal rasqal_new_prefix rasqal_new_simple_literal rasqal_new_string_literal rasqal_new_variable rasqal_query_has_variable rasqal_query_results_get_binding_name rasqal_query_results_get_binding_value_by_name rasqal_query_results_get_bindings rasqal_query_set_variable
0.9.1
Added the rasqal_query_results class and moved the results
methods from rasqal_query.
Made rasqal_query_execute return a rasqal_query_result*.
Renamed all rasqal_query*result* methods to be rasqal_query_result_*
Added rasqal_free_query_results to tidy up.