Fix a bug in writing a query result to XML when blank nodes are used. Now also correctly uses the base URI when pass in to the writing method.
Added support for three types of query result - bindings (the only
one in previous versions), an RDF graph and a boolean. Added
rasqal_query_results
methods to test the type of the
result: rasqal_query_results_is_bindings
,
rasqal_query_results_is_boolean
and
rasqal_query_results_is_graph
.
Added
rasqal_query_results_get_triple
to get current triple as a raptor_statement
and rasqal_query_results_next_triple
to move to the next triple.
Added
rasqal_query_results_get_boolean
to get a boolean query result value.
Added rasqal_triple
copy constructor
rasqal_new_triple_from_triple
.
Constructs an RDF graph result as a sequence of triples. This
enables the SPARQL CONSTRUCT
form to work.
Can return a boolean result indicating that there were variable
binding results, but not returning them. This enables the SPARQL
ASK
form to work.
Added a new function expression - rasqal_op enum value
RASQAL_EXPR_FUNCTION
, added new name
and
args
fields to the rasqal_expression
structure and added rasqal_new_function_expression
to
construct this expression.
Added new 1-argument expression RASQAL_EXPR_STR
returning a string version of the expression.
Added new 1-argument expressions operating on RDF literals:
RASQAL_EXPR_LANG
returning the language string of an RDF literal,
RASQAL_EXPR_DATATYPE
returning the datatype URI of an RDF literal.
Added new 1-argument testing expressions returning booleans:
RASQAL_EXPR_BOUND
true if the variable argument is bound to a value,
RASQAL_EXPR_ISURI
true if the argument is a URI,
RASQAL_EXPR_ISBLANK
true if the argument is a blank node and
RASQAL_EXPR_ISLITERAL
true if the argument is an RDF literal.
Fixed a problem in optional results returning extra results with no new bindings.
The SPARQL Parser now allows UTF-8 and \u, \U in prefixes and QNames.
Now supports CONSTRUCT
and ASK
queries using the updated query engine features.
OPTIONAL
can now be used wherever [
...
]
could be used (parser bug fix).
Now supports the SPARQL built-in functions
STR()
returning a string version of the expression,
LANG()
returning the language string of an RDF literal,
DATATYPE()
returning the datatype URI of an RDF literal,
BOUND()
testing if a variable is bound,
ISURI()
testing if an expression is a URI,
ISBLANK()
testing if an expression is a blank node and
ISLITERAL()
testing if an expression is an RDF literal.
Now supports SPARQL BASE
directive for setting the
base URI of a query. This is experimental and may not be in
the next version or may not be in the final SPARQL language.
The parser now expands QNames correctly when used in literals like
"blah"^^xsd:string
.
The RDQL Parser now allows UTF-8 and \u, \U in prefixes and QNames. This makes RDQL testsuite tests S-03, S-04 and S-05 work.
A release with major changes internal to the query engine to operate over graph patterns instead of sequences of triple patterns and to add execution of optional graph patterns. Additionally the query results can now be written in a recognised XML format.
This version of Rasqal requires Raptor 1.4.4.
Added a rasqal_graph_pattern
class for handling
matching a graph pattern (set of triple patterns) in an
rasqal_query
. RDQL only has one of these wheras SPARQL
may have many, and they may be nested (this may change, as SPARQL is
under development).
Added rasqal_query_results_write
method to write
variable binding query results to a raptor_iostream
in
the XML format defined by
SPARQL Variable Binding Results XML Format, W3C Working Draft, 21 December 2004.
Updated the query engine to operate over graph patterns rather than a single sequence of triple patterns. The graph patterns may be optional, which is used to implement SPARQL optionals. Nested graph patterns are constructed but cannot yet be executed.
Added a unary minus expression type.
Improved the type promotion for expression evaluation. Try to evaluate strings as doubles or integers if the operation contains one double or integer respectively.
Fixed a memory leak with string matches/non-matches.
Optional graph patterns OPTIONAL
and
[
... ]
now work.
Added the {
... }
group syntax and
removed the (
... )
form.
$
was added as an allowed variable prefixes.
A warning was added to show SOURCE *
is ignored.
Added the UNION
keyword, unsupported.
Rasqal now passes the DAWG SPARQL test cases: Optional triples (dawg-opt-query-001, dawg-opt-query-002, dawg-opt-query-003, dawg-opt-query-004) and examples from query WD (sparql-query-example-2.1a, sparql-query-example-2.2a, sparql-query-example-2.3a, sparql-query-example-2.4a, sparql-query-example-3)
Allow UTF-8 qname prefixes and check name against XML name constraints.
Recover lexer state from errors in regexes.
Terminate the lexer on a syntax error, rather than produce multiple errors.
The lexer now handles UTF-8 qname prefixes, enabling RDQL testsuite test S-02 to pass.
Allow UTF-8 qname prefixes and check name against XML name constraints.
Recover lexer state from errors in regexes.
Terminate the lexer on a syntax error, rather than produce multiple errors.
Pass on raptor parser errors to rasqal's error routines and upwards.
Clean up several memory allocations when a query fails to prepare or execute fully.
Fixed lexer jams when a query contained an illegal variable name after a '?'.
Fixed lexer crashes when a query ended in a regex pattern like
/abc/
.
Tidied up the testing framework so 'make distcheck' works.
Rasqal's License was changed from LGPL 2.1/MPL 1.1 to LGPL 2.1/Apache 2
Added support for the SPARQL Query Language for RDF, W3C Working Draft, 12 October 2004 from the W3C RDF Data Access Working Group (DAWG). The support is at the basic syntax level - token lexer and grammar parser which passes the first simple tests from the proposed DAWG testcases. No additional query engine support has been added for SPARQL features that are not supported by RDQL. The Rasqal to do list contains full details of the implementation state.
Queries can now be prepared and then executed multiple times.
Added configure --enable-query-languages
option with
rdql
and sparql
as the choices.
Thanks to Chris Pointon for several patches to make Rasqal easier to build under Win32. Applied with some modifications. Renamed the RDQL and SPARQL syntax tokens ERROR to ERROR_TOKEN to help.
Added experimental support for querying multiple sources; the same query is executed over each source in turn. Also added some support for returning the source URI which is not yet enabled as this feature is in flux in the DAWG work. This may change or be removed in future versions.
roqet
can specify a data source URI on the command
line with -s
/ --source
) URI for
queries executing against an implicit model.
Added the DAWG SPARQL test cases driven from the manifest.n3 format. Created tests from the examples in the working draft.
Added an experimental XML result format for bindings, based on
DAWG work. Enabled in roqet
with -o xml
.
This is very likely to change or replaced in future versions.
Added roqet
argument -d
/
--dump-query
to dump the processed query, rather than
do it by default (0.9.2 and earlier).
roqet
can now read queries from URIs, using
the raptor_www
class to do the retrieval.
Fixed the configure
checks for a posix regex
function regcomp to correctly discover it is present.
Added support for declaring prefixes for XML-style QNames both before and after their use.
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 originally intended.
This release made minor portability fixes for building with C++ and Win32 (untested).
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
This release changed the way that results were returned. A new
rasqal_query_results
class was created. This allows for
a clean separation of the two concepts allowing multiple form of the
results to be retrieved as methods of the query_results class, rather
than the query class. The only form of results currently available
is variable bindings, but RDF graphs will be returned in future,
as a set of triples in a serialised form.
The execution method rasqal_query_execute
was changed
to return a new object of that class rather than an int
success or failure.
The following methods of the rasqal_query
class
were renamed and moved to the new rasqal_query_results
class:
0.9.0 name | 0.9.1+ name |
---|---|
rasqal_query_get_result_count | rasqal_query_results_get_count |
rasqal_query_next_result | rasqal_query_results_next |
rasqal_query_results_finished | rasqal_query_results_finished |
rasqal_query_get_result_bindings | rasqal_query_results_get_bindings |
rasqal_query_get_result_binding_value | rasqal_query_results_get_binding_value |
rasqal_query_get_result_binding_name | rasqal_query_results_get_binding_name |
rasqal_query_get_result_binding_by_name | rasqal_query_results_get_binding_value_by_name |
rasqal_query_get_bindings_count | rasqal_query_results_get_bindings_count |
A new rasqal_free_query_results
destructor was created
to delete the query results. (There is no public constructor).
Other minor bugs were fixed such as multiple constraints now being ANDed and not ORed, and adding defensive code for when queries fail and results methods are invoked.
It is all new.
Copyright 2004-2005 Dave Beckett, Institute for Learning and Research Technology, University of Bristol