Fetching contributors…
Cannot retrieve contributors at this time
5198 lines (3865 sloc) 179 KB
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" lang="en" xml:lang="en">
<title>Rasqal RDF Query Library - Release Notes</title>
<h1>Rasqal RDF Query Library - Release Notes</h1>
<h2 id="rel0_9_34"><a name="rel0_9_34">Rasqal 0.9.34 changes</a></h2>
<p>Not yet released.
<h2 id="rel0_9_33"><a name="rel0_9_33">Rasqal 0.9.33 changes</a></h2>
<p>Issues Fixed:</p>
<li><a href="">0000546</a>: Can't take query from URI when using -p</li>
<li><a href="">0000568</a>: Filter expression with division does not work</li>
<li><a href="">0000583</a>: CONSTRUCT halts at a template triple with unbound variable</li>
<li><a href="">0000588</a>: roqet: select from SERVICE returns all NULLs</li>
<h3>SPARQL changes</h3>
<p>Fixed <code>BASE</code> to override any API base URI.</p>
<h3>Datetime class changes</h3>
<p>Fixed storing timezone minutes correctly.</p>
<h3>Graph pattern class changes</h3>
<p>Added new getter functions
and <code>rasqal_literal_get_language()</code>
from <a href="">Pull Request #1</a>
by Cosmin Basca. Thanks.
<h3>Query engine changes</h3>
<p>Fixed the aggregation total evaluation of <code>AVG</code>.</p>
<p>Fixed <code>STRBEFORE</code> and <code>STRAFTER</code> evaluation
to match languages if present and add the needle language to the
<p>Fixed <code>CONCAT()</code> evaluation to return the correct types
and languages.</p>
<p>Sorting now uses sort utility function
<code>raptor_sort_r()</code> with context args provided by Raptor
2.0.15+ or an internal simple (not so performant) replacement, if too
<h3>Query result formatter changes</h3>
<p>Can write variable bindings query results in <a href="">mKR relation</a> CSV format.
Patch by Richard H. McCullough.</p>
<h3>Query result class changes</h3>
<p>Made internal changes to support reading and writing boolean
result formats. That means
<code>rasqal_query_results_formatter_read()</code> may now return
boolean results if the formatter supports it, such as SPARQL XML.
<p>Added <code>rasqal_new_query_results_from_string()</code> to make
a query results from a string (with optional length). The results
format is guessed from the input data - base_uri and string content
using <code>rasqal_world_guess_query_results_format_name()</code>.
<p>Added <code>rasqal_query_results_formats_check2()</code>
deprecating <code>rasqal_query_results_formats_check()</code>.
The API change is due to the return value; the result is now
non-0 if the format exists.
<p>Added <code>rasqal_new_query_results2()</code> deprecating
<code>rasqal_new_query_results()</code> removing the now
ignored <code>vars_table</code> parameter. A query result
now manages it's own variables table.</p>
<h3>Results class changes</h3>
<p>Fixed returning the correct variables count for reading SPARQL XML
results sets. This caused some queries to fail if the projected
variables count did not match the count in the result set.
Fixes <a href="">Issue #0000588</a>
<h3>Variables table class changes</h3>
<p>Added <code>rasqal_variables_table_add2()</code> deprecating
<code>rasqal_variables_table_add()</code>. This takes a more
sensible argument style with copying the input parameters name and
value, and allowing name length to be optionally given. This results
in smaller calling code and better ownership semantics.
<h3>Utility changes</h3>
<p><code>roqet(1)</code> now supports using a URI or local file to
send to a SPARQL protocol service URI.
Fixes <a href="">Issue #0000546</a>
<h3>Other changes</h3>
<p>Fixes to make Rasqal build in Travis CI, testing against newest
and oldest raptors.</p>
<p>Use <code>__FUNCTION__</code> (c99) replacing
<code>__func__</code> (c90) in debug macros.</p>
<p>Fixes in
<a href="">Pull Request #3</a>
for building with icc from Sebastian Freundt. Thanks.</p>
<p>Many code quality fixes from clang and coverity primarily in error
path cleanups (out of memory cases) and dead code.</p>
<p>Updated the fix-flex and fix-bison scripts to remove dead
code that clang and coverity complain about.</p>
<p>Added new C testrunner utility to run the tests to eventually
replace the (perl) improve and check-sparql scripts.
<p>Fixed some API changelog mistakes.</p>
<p>Updated gcc / clang warning args used (-Wxxxx) and made multiple
minor code fixes such as replacing %d with %u in debug messages or
adding missing default: to switches even when all cases were
<p>Added many more internal casts to make -Wconversion happier when
<h2 id="rel0_9_32"><a name="rel0_9_32">Rasqal 0.9.32 changes</a></h2>
<p>Issues Fixed:</p>
<li><a href="">0000558</a>: sparql11-update causes fallback to sparql10</li>
<li><a href="">0000560</a>: &quot;--with-pcre-config&quot; documented but not supported</li>
<li><a href="">0000561</a>: 'make check' fails; possibly because raptor2 built in separate directory</li>
<li><a href="">0000564</a>: Rasqal fails with linker error for armv7 cross-compilation: duplicate symbol _main</li>
<li><a href="">0000567</a>: Segfault based on documentation recommendation</li>
<h3>SPARQL changes</h3>
<p>Fixed the SPARQL 1.0 and SPARQL 1.1 syntax feature checking so
that language <code>sparql11-update</code> allows all SPARQL 1.1
syntax features to be used.
Fixes <a href="">Issue #0000558</a>
<p>Updated the SPARQL parser to use and require Bison 3.0 (for
maintainer, building from GIT sources).
<p>Updated the SPARQL lexer for Bison 3.0.
<h3>API changes</h3>
<p>Made <code>rasqal_new_query()</code> match the documentation in
accepting a <code>NULL</code> name.
Fixes <a href="">Issue #0000567</a>
<h3>Configuration changes</h3>
<p>Make ossp work as a UUID library option.
<code>--with-uuid-library=ossp</code> and automatic discovery of ossp
UUID now work. Fixed the inclusion of OSSP's uuid.h header.</p>
<p>Fix the searching for the pcre-config and libgcrypt-config
configuration utilities. This probably never worked unless the
envariables form (<code>PCRE_CONFIG</code> and
<code>LIBGCRYPT_CONFIG</code>) were set.
<p>Added a new internal <code>to-ntriples</code> utility to remove all
use of <code>rapper(1)</code> so that the raptor utilities do not
need to be available for running tests with 'make check'.
Fixes <a href="">Issue #0000561</a>
<p>Make <code>--with-libgcrypt-config</code> work.
<p>Make <code>--with-pcre-config</code> work.
Fixes <a href="">Issue# 0000560</a>
<p>Fix noisy mhash_dir addition error; it was always added the cflags
and includes even when mhash_dir was blank.</p>
<p>Improve raptor missing / too old error message.</p>
<h3>Other changes</h3>
<p>Mention libmtwist near <code>--with-random-approach.</code>
Fixes <a href="">Issue #0000561</a>
<h3>Internal changes</h3>
<p>Add more STANDALONE if/ifndef STANDALONE blocks around internal
code or functions used in tests.</p>
<p>Make <code>rasqal_xsd_check_double_format()</code> an internal
non-static symbol.
Fixes <a href="">Issue #0000564</a>
<h2 id="rel0_9_31"><a name="rel0_9_31">Rasqal 0.9.31 changes</a></h2>
<p>Issues Fixed:</p>
<li><a href="">0000527</a>: segmentation fault in roqet when making a SPARQL SERVICE query that returns an HTTP error</li>
<li><a href="">0000536</a>: configure accepts bogus values for --with-xml2-config</li>
<li><a href="">0000537</a>: configure pkg-config checks not overridable</li>
<li><a href="">0000538</a>: work around MSVC 2008's inexcusable lack of stdint.h header</li>
<li><a href="">0000539</a>: win32_rasqal_config.h doesn't work on MSVC2008</li>
<h3><code>roqet(1)</code> utility changes</h3>
<p><code>roqet(1)</code> gains a new operating mode: reading query
result files in a given format and generating them in different
format. This means it can be used to convert result formats.
Use this mode with the <code>-t RESULT-FILE</code> major option
and <code>-R INPUT-RESULT-FORMAT</code> to set the input format.
<code>-r OUTPUT-RESULT-FORMAT</code> can be used to set the output
# Convert a SPARQL TSV result to XML
$ roqet -t result.tsv -R tsv -r xml
# Convert a SPARQL XML result (default input format) to TSV
$ roqet -t result.srx -r tsv
<p>Tidied and improved the help and error messages.</p>
<p>The utility now supports <code>-r simple</code> / <code>--results
simple</code> as it says in the documentation.</p>
<p>The debug result format now prints 'row:' when writing. (This
format has always promised it may change).</p>
<h3>Query result changes</h3>
<p>Added support for reading the
<a href="">SPARQL 1.1 Query Results CSV and TSV Formats</a>
W3C Recommendation, 21 March 2013. Writing support already existed.
This is a modular addition so the APIs that handle reading results
automatically get this support.</p>
<p>Added <code>rasqal_query_results_type_label()</code> to get a
string label for a <code>rasqal_query_results_type</code>.</p>
<h3>Query engine changes</h3>
<p>Internal work to support executing the SERVICE graph pattern.</p>
<p>Query engine can execute the new <code>VALUES</code> graph
<p>SPARQL lexer and parser handles <code>VALUES</code> replacing the
old <code>BINDINGS</code> syntax.</p>
<p>Fixed crash when a SERVICE returns no rowsource.
Fixes <a href="">Issue #0000527</a>
<p>Added proper validation of xsd:double and xsd:float literal format.</p>
<p>Correctly handle <code>GROUP BY</code> over no data - returning
one row with all bindings missing.</p>
<p>Literal languages are now normalized to lowercase (RDF Concepts)</p>
<h3>API changes</h3>
<p><code>rasqal_prefix_id()</code> now uses a q rather than _ to help
raptor N-Triples 2008 conformance.</p>
<p>Improved SPARQL 1.1 query formatter to handle <code>VALUES</code>
forms and to print in a prettier form with better indenting.</p>
<p><code>rasqal_graph_pattern_op</code> gains
<p><code>rasqal_new_rowsource_from_handler()</code> now allows a NULL
query so that rowsources can be fully independent of a query, such as
when building from a syntax string or other independent object.</p>
<p><code>rasqal_new_rowsequence_rowsource()</code> now allows an empty
sequence of rows.</p>
<h3>Portability changes</h3>
<p>Win32 build fix patches from Michael Stahl:
Fixes Issues
<a href="">#0000539</a>
<a href="">#0000538</a>
<h3>Configuration and build changes</h3>
<p>Added new internal convienience library
<a href="">libsv</a>
providing support for reading CSV and TSV files (and others
potentially). Required for the updated support for reading SPARQL
CSV and TSV result formats.
<p>Added new librasqalcmdline convienience library to share code
between <code>roqet(1)</code> and <code>check-query</code> (under
development, not installed).</p>
<p>Build internal libmtwist, libgetopt (new) as libtool convienience
libraries to stop automake moans about subdir-objects.</p>
<p><code>configure</code> was fixed to correctly find and use OSSP
libuuid even in the presence of half installed / broken UUID systems
like on OSX where just the headers are present.</p>
<p>Fixes for building with parallel make such as <code>make -jN</code></p>
<p>Fixed alignments and error paths found via clang.</p>
<p><code>configure</code> now uses PKG_CHECK_MODULES() to enable
overriding discovery of pkg-config if needed.
Fixes <a href="">Issue #0000537</a>
<p>Fix crash if <code>xml2-config(1)</code> when pointed at a non
executable file. Patch from Michael Stahl
Fixes <a href="">Issue #0000536</a>
<p><code>configure</code> ensures CPPFLAGS can be passed through
without destruction. This helps
<a href="">Debian hardening</a>
<p>Removed the need for Perl XML::DOM to be installed in order for
'make test' to run via <code>check-sparql</code>. This requires
the <code>roqet(1)</code> new '-'t mode.
<p>Add a <code>configure</code> check for the debugging
<code>__func__</code> so that on systems where it does not exist the
debug macros work. It may or may not be a macro, so it cannot be
tested with #ifdef in the CPP.</p>
<p>Improved the <code>configure</code> check for Flex to allow it to
be missing for non-maintainer mode.</p>
<h3>Other changes</h3>
<p>Flex code generation updates - now recommend flex 2.5.36.</p>
<p>Fixes in tests data for N-Triples conformance that is checked by
newer Raptor.</p>
<h2 id="rel0_9_30"><a name="rel0_9_30">Rasqal 0.9.30 changes</a></h2>
<p>Removed RDQL support as promised. So long and thanks for all the
queries. Use SPARQL instead.
<p>Issues Fixed:</p>
<li><a href="">0000506</a>: has bash -specific (non-POSIX) == syntax</li>
<li><a href="">0000511</a>: Add support for OSSP UUID library</li>
<li><a href="">0000517</a>: Autoconf errors when checking for several headers and cross-compiling</li>
<li><a href="">0000523</a>: mpfr dependency</li>
<h3>Decimal class changes</h3>
<p><code>rasqal_xsd_decimal_is_zero()</code> now uses <code>fabs()</code>
and an epsilon approach for C99 decimal mode.</p>
<p>Make <code>rasqal_xsd_decimal_compare()</code> work for C99
decimal mode.</p>
<p><code>rasqal_xsd_decimal_compare()</code> and
<code>rasqal_xsd_decimal_equals()</code> use Knuth's approximate
equality as decribed below.
<h3>Literal class changes</h3>
<p>Return rdf term type string from
<code>rasqal_literal_get_rdf_term_type()</code> for integer subtypes
Fixes <a href="">Issue #0000519</a>
(Redland librdf)</p>
<p><code>rasqal_literal_to_result_term()</code> now returns NULL on
an alloc failure.</p>
<p><code>rasqal_new_floating_literal()</code> added, deprecating
<code>rasqal_new_float_literal()</code> and takes the float type
as an argument.
<h3>Query engine changes</h3>
<p>Fix some wrong data size allocs found by clang in Project
<p>Take more care in promoting literals to float and exceeding the
range; turn them into doubles if that happens.</p>
<p>Floating and double comparisons and equality use a proper epsilon
check using Knuth's approximate comparison approach, rather than =.
and other internal methods.
<h3>Query language changes</h3>
<p>Updated the SPARQL syntax to support <code>integer^^uri-ref</code>.
Fixes <a href="">Issue #0000519</a> (Redland librdf)
<p>Removed RDQL support as promised. So long and thanks for all the queries.
Use SPARQL instead.
<h3>Portability changes</h3>
<p>Test for <code>mpfr_snprintf()</code> specifically which appeared
in MPFR 2.4.0.
Fixes <a href="">Issue #0000523</a>
<p>The Bison minimum version is now 2.0 (from 2004-12-25) until we
hear otherwise.</p>
<p>Use <code>RASQAL_DISABLE_DEPRECATED</code> to flag out deprecated
implementation code. Call gtkdoc-scan with the deprecated guard.
<p>Use <code>#if defined(RASQAL_DEBUG)</code> to help
portability when it's not defined.</p>
<p>Added good and bad cast macros for checking of type truncation.
Helped remove compiler warnings.</p>
<h3>Configuration changes</h3>
<p>Make <code>configure</code> handle Apple
<code>/usr/bin/flex</code> which adds an extra field so awk
<code>$NF</code> did not work.</p>
<p><code>configure</code> now supports finding UUID support inside
libc for OSX.
<p>Fix some <code>configure</code> portability with non-POSIX bash
syntax and adding some -W flags to autotool calls.
Fixes <a href="">Issue #0000506</a>
<p>Updated <code></code> to abort run if a configuring
program fails, generate NEWS with old timestamp if missing so
automake can run and some small doc and message updates.</p>
<h2 id="rel0_9_29"><a name="rel0_9_29">Rasqal 0.9.29 changes</a></h2>
<p>Rasqal fully supports SPARQL 1.0 from this release. All the
approved tests pass.</p>
<p>Requires <a href="">Raptor</a> 2.0.7 or newer.</p>
<p>RDQL query language support will be removed in the next
release. SPARQL has been available for 4 years and is fully
<p>Add support for SPARQL 1.1 draft <code>UUID()</code> and
<p>Issues Fixed:</p>
<li><a href="">0000493</a>: Offset in sub-select results in no rows at all.</li>
<li><a href="">0000494</a>: Temp buffer to small.</li>
<li><a href="">0000504</a>: rasqal_regex_replace() is not public</li>
<h3>Datatype changes</h3>
<p>Added a new datatype
<code>rasqal_xsd_date</code> class for XSD with literal enum
<code>RASQAL_LITERAL_DATE</code>, constructor
<code>rasqal_new_xsd_date()</code>, destructor
<code>rasqal_free_xsd_datetime()</code> and core methods
<code>rasqal_xsd_date_equals()</code> (returning incomparible) and
<p>The <code>rasqal_xsd_datetime</code> and new date class above both
get the same new fields for comparing datetimes and dates:
<code>time_on_timeline</code> and <code>have_tz</code> to record the
three timezone possibilities: none ('N'), zulu ('Z') or numeric
('Y'). A "time on timeline" value is calculated on construction
and the field values are not normalized.
<p>Added <code>rasqal_xsd_datetime_equals2</code> deprecating
<code>rasqal_xsd_datetime_equals</code> and returning and
incomparible flag to caller.
<p>Added <code>rasqal_xsd_datetime_compare2()</code> deprecating
<code>rasqal_xsd_datetime_compare()</code> and returning the
incomparible state between datetimes. The new
<code>rasqal_xsd_date_compare()</code> uses this signature.
<p>Added new <code>rasqal_new_xsd_datetime_from_xsd_date()</code>
datetime constructor to build a datetime from a date.</p>
<p>Correct the buffer size in
Fixes <a href="">Issue #0000494</a>
<h3>Graph pattern class changes</h3>
<p>Added <code>rasqal_query_graph_pattern_visit2()</code> deprecating
<h3>Literal class changes</h3>
<p>Enum <code>rasqal_op</code> gains new tokens
<code>RASQAL_EXPR_UUID</code> and <code>RASQAL_EXPR_STRUUID</code>
for the new SPARQL 1.1 draft <code>UUID()</code> and
<code>STRUUID</code> built-in functions.</p>
<p><code>rasqal_literal_divide()</code> result is now a decimal if
both args are integer - rule from XPath F&amp;O;
<p>Added support for the XSD:Date datatype with a new
<code>rasqal_literal_type</code> enum value
<code>RASQAL_LITERAL_DATE</code>. Updated the literal code including
the constructor <code>rasqal_new_numeric_literal()</code> to
auto-convert to the internal format as well as the core literal
<h3>Query engine changes</h3>
<p>The rules for in-scope variables for <code>FILTER</code> were
corrected to match the SPARQL 1.0 semantics. This fixed the last
remaining failure Rasqal had for the SPARQL 1.0 approved test cases.
<p><code>DISTINCT</code> now
compares using RDF term comparison not value comparison so now "" is
distinct from ""^^xsd:string. This has a consquence of making RDQL
test B-01 as failing but this is no loss. Relatedly, RDQL support
will be removed in the next release.
<p>Handle errors found in aggregation expressions following SPARQL
<p>Fix blank node generation when made in a <code>CONSTRUCT</code> to
match SPARQL standard.
<p>Make limit and offset check work properly in a subquery.
<a href="">Issue #0000493</a>
<p>Added support for executing SPARQL 1.1 draft <code>UUID()</code>
and <code>STRUUID</code> using either libuuid or internal random API
that backs executing <code>RAND()</code>.
<h3>Resilience changes</h3>
<p>Ran entire SPARQL 1.0 and 1.1 test suite through Rasqal and
valgrind to check for reference loss and memory leaks. Fixed several
issues in newer code.</p>
<p>Fixed several code issues with unused values found by clang. Or
changed code that was correct to make clang moan less.</p>
<p>Add code marking of good and bad type casts using macros
<code>RASQAL_GOOD_CAST</code> and <code>RASQAL_BAD_CAST</code>
<h3>Other changes</h3>
<p>The <code>configure</code> test for libgcrypt as a digest backend
now works; it really didn't before now. Added option
<code>--with-libgcrypt-config=PATH</code> to allow selecting the path
to the <code>libgcrypt-config</code>. mhash remains the preferred
hash digest library as it provides more digests and is more commonly
<p><code>configure</code> now looks for libuuid with
<code>pkg-config</code> to back the SPARQL 1.1 UUID generation
support. The UUID backend can be selected with new configure
option <code>--uuid-library=NAME</code></p>
<p>Made <code>rasqal_regex_replace()</code> public with same
signature as the internal API.
<a href="">Issue #0000504</a>
<p>The <code>tests/sparql/check-sparql</code> test runner was updated
to understand more of the manifest vocabulary.
<p>Building from GIT now requires automake 1.11.2+ for the
<code>-Wextra-portability</code> option.
<p>Added <code>-d none</code> to <code>roqet(1)</code> arguments so
it is possible disable debug output on the command line (default).
<h2 id="rel0_9_28"><a name="rel0_9_28">Rasqal 0.9.28 changes</a></h2>
<p>Issues Fixed:</p>
<li><a href="">0000466</a>: zero size calloc does not return object (src/rasqal_row.c)</li>
<li><a href="">0000467</a>: Tests fail because diff doesn't accept -u flag</li>
<li><a href="">0000470</a>: snprintf portability issues</li>
<li><a href="">0000471</a>: Compile error when RASQAL_DEBUG set to &gt; 1</li>
<li><a href="">0000474</a>: roqet flags listed in help, but not recognised</li>
<h3>SPARQL changes</h3>
<p>The language name '<code>sparql</code>' is now SPARQL 1.1
<p>Added support for SPARQL 1.1 draft string functions
<code>STRBEFORE()</code>, <code>STRAFTER()</code>
and <code>REPLACE()</code>.
<h3>Query engine changes</h3>
<p>Add parsing and evaluation support for SPARQL 1.1 draft STRBEFORE
(2 args), STRAFTER (2 args) and REPLACE (3 or 4 args). The
evaluation of REPLACE currently fully works for PCRE regex with
Unicode and works for POSIX regex without Unicode.</p>
<p>Clear <code>errno</code> before calling <code>strtol()</code> and
checking the result. This caused issues when used in threaded
applications, even though Rasqal is not thread-safe.
<p>The (psuedo) random number generation now can use a variety of
library random routines, defaulting to a new internal
<a href="">Mersenne Twister implementation - libmtwist</a>.
The choice of PRNG can be made with
<code>configure --with-random-approach=ALGO</code> to pick from
<code>mtwist</code> (the default), <code>gmp</code> (when GMP is
available and used for decimals), <code>random_r()</code>,
<code>rand_r()</code> then the portable but not so safe:
<code>random()</code> and <code>rand()</code>.
<h3>Expression class changes</h3>
<p>Enum <code>rasqal_op</code> gains new tokens
<code>RASQAL_EXPR_STRAFTER</code> and
<code>RASQAL_EXPR_REPLACE</code> for the new SPARQL 1.1 string expressions.
<code>STRBEFORE()</code>, <code>STRAFTER()</code>
and <code>REPLACE()</code> respectively.
<p>Added <code>rasqal_new_4op_expression()</code> to construct 3/4-arg
<h3>Query format and query result format changes</h3>
<p>Added the
<a href="">W3C Format URIs</a>
to the JSON, XML, CSV and TSV SPARQL result formats. (Nicholas J Humfrey)
<p>Corrected the SPARQL query output for LIMIT and OFFSET</p>
<p>Handle <code>&lt;literal&gt;&lt;/literal&gt;</code> as
empty literal when reading in XML query results.</p>
<h3>Other changes</h3>
<p>Use a more comprehensive <code>configure</code> build and run test
for <code>ceil()</code>, <code>floor()</code> and
<code>round()</code> to prevent GCC optimizing it away and getting
the wrong answer when checking whether to link with -lm
<p>Removed the obsolete -w option from the <code>roqet --help</code>
message which was removed from code some time ago.
Fixes <a href="">Issue 0000474</a>.
<p>Prevent a gcc 4K stack size warning in a few tests.
<p>Reorganized the regex code to a new regex module, adding the new
function <code>rasqal_regex_replace()</code> for regex search and
replace (all) backing SPARQL 1.1 <code>REPLACE()</code></p>
<p>Several internal fixes for compiling with RASQAL_DEBUG &gt; 1
(Lauri Aalto)
<a href="">Issue #0000471</a>
<p>Remove several internal uses of <code>snprintf()</code> for simple
integer formatting.
<p>The check-sparql utility used during 'make check' now sets the
DIFF envariable for check tests to allow use off GNU Diff.
Fixes <a href="">Issue #0000467</a>
(Peter O'Gorman / pogma)
<p>Code style changes for calling <code>calloc()</code>.</p>
<p>Do not <code>calloc()</code> with 0 count for a result row - not portable.
Fixes <a href="">Issue #0000466</a>
(Peter O'Gorman / pogma)
<p>The <code>check_query</code> utility (which is still not complete)
can now handle comparing query results when sorting is involved.
<h2 id="rel0_9_27"><a name="rel0_9_27">Rasqal 0.9.27 changes</a></h2>
<p>Issues Fixed:</p>
<li><a href="">0000127</a>: <code>UNION</code> graph pattern support in query engine</li>
<li><a href="">0000423</a>: SPARQL <code>UNION</code> with shared variables fails</li>
<li><a href="">0000434</a>: <code>OPTIONAL</code> and named graphs don't mix</li>
<li><a href="">0000454</a>: xsd:nonNegativeInteger is parsed as <code>RASQAL_LITERAL_QNAME</code> instead of <code>RASQAL_LITERAL_[INTEGER|UDT|INTEGER_SUBTYPE]</code></li>
<li><a href="">0000459</a>: Making a query that binds to a variable with the same name as a bnode fails</li>
<h3>SPARQL changes</h3>
<p>The parser now supports the optional <code>SILENT</code> keyword
for <code>SERVICE</code>.</p>
<p>The parser now supports the <code>CONSTRUCT WHERE</code>
abbreviation, expanding the WHERE triples into a triple template
with the same triples.
<h3>Query engine changes</h3>
<p>sub-<code>SELECT</code>s are now supported including those that
contain sorting, grouping, limiting and offset as well as projection.
<p><code>CONSTRUCT</code> works when working over a query with
optionals. It previously stopped returning results at the first unbound
variable value.</p>
<p><code>OPTIONAL</code>, sub-graph pattern groups
and <code>UNION</code> fully execute correctly. Fixes were made to
the variable scoping and join operations.</p>
<p>A lot of refactoring was done to provide the structure to enable
sub-<code>SELECT</code> to be turned into a query algebra structure
and executed.
<p>An entirely new variable scoping algorithm was implemented to
properly compute where a variable is assigned; the assumption was
removed that a variable with a given name can only be bound in one
<p>Several bugs were fixed in the join implementation which affected
the sub-graph pattern grouping (natural join) and optional (left
<p>Pulled new internal function
<code>rasqal_query_results_formatter_get_read_rowsource()</code> out
of <code>rasqal_service_execute()</code> to provide the structure for
executing <code>SERVICE</code> queries in the query engine.
<h3>Literal class changes</h3>
<p><code>rasqal_new_numeric_literal_from_long()</code> added to make an
integer or decimal literal depending if it fits in range.
<p><code>rasqal_xsd_decimal_get_long()</code> added to convert an
arbitrary precision decimal to a C long with an overflow error flag.
<p>xsd:integer subtypes are stored and printed correctly.
Fixes <a href="">Issue #0000454</a>.
<h3>Query class changes</h3>
<p><code>rasqal_query_get_distinct()</code> added to get the distinct
flag from <code>SELECT DISTINCT ...</code> queries.
<p><code>rasqal_query_set_wildcard()</code> added to set the '*' flag
for <code>SELECT *</code> queries
<p><code>rasqal_query_has_variable2()</code> added with variable type
arg deprecating <code>rasqal_query_has_variable()</code>. Note the
warning about using <code>RASQAL_VARIABLE_TYPE_UNKNOWN</code> is
<p>Deprecated <code>rasqal_query_has_variable()</code> for the
above. Lookup by any type.</p>
<p><code>rasqal_query_set_variable2()</code> added with type arg
deprecating <code>rasqal_query_set_variable()</code>. Note the
warning about using <code>RASQAL_VARIABLE_TYPE_UNKNOWN</code> is
<p>Deprecated <code>rasqal_query_set_variable()</code> for above.
Lookup by any type.</p>
<h3>Query result format changes</h3>
<p>The CSV and TSV query result formats (names <code>csv</code>
and <code>tsv</code> respectively) were altered to match the editor's draft
<a href="">SPARQL 1.1 Query Results CSV and TSV Formats</a>
which includes no header line, no result number and implementing
the specified quoting and end of lines in the specification.
<h3>Variable class changes</h3>
<p><code>rasqal_variables_table_add_variable()</code> added to add an
existing variable to a variables table.
<p><code>rasqal_variables_table_get_by_name()</code> added with
variable type arg.</p>
<p><code>rasqal_variables_table_contains()</code> added to check
if a variable with the given type and name is in the variables table.
<h3><code>roqet(1)</code> utility changes</h3>
<p>Correctly order the help so the <code>-d/--dump-query</code> value
list appears after the option description.
<h3>Porting changes</h3>
<p>Several patches were made to aid compiling on MS Windows were
applied based on those made by the
<a href="">KDE Emerge scripts to build KDE on windows</a>.
This includes a native replacement for the missing gettimeofday()
and timegm() functions. MS Windows remains an unsupported target.
<h3>Other changes</h3>
<p>The minimum Raptor version needed is now 2.0.4
for the <code>raptor_bnodeid_ntriples_write()</code> function.
<p>The test runner was fixed to fail the suite when there are
failures as well as expected failures.
<p>Code style change and cleanup for alloc/free macros. New code style:</p>
<li><code>var = RASQAL_CALLOC(type, nmem, size)</code><br />
Prefering:<br />
<code>var = RASQAL_CALLOC(type, 1, sizeof(*var))</code><br />
when nmem = 1</li>
<li><code>var = RASQAL_CALLOC(type, size)</code></li>
<li><code>RASQAL_FREE(type, var)</code></li>
<p>The consequence here is allocs that mostly fit into 1 line without
so much boilerplate and duplication of types. The
<code>RASQAL_MALLOC</code> and <code>RASQAL_CALLOC</code> macros now
do the cast to the return type. <code>RASQAL_FREE</code> takes the
object type too but always casts arg to void This
<p>Code style change for allocating strings:</p>
<li><code>len = strlen(); malloc(..., len + 1)</code></li>
<li>and <code>memcmp(..., len + 1)</code></li>
<p>Expanded GCC warnings to take advantage of newer analysis which
found several issues:</p>
<li>Use of int for storing string and buffer lengths: replaced many
internal uses with the correct size_t for length computations.</li>
<li>Use of int for storing time: replaced with time_t that may be
<li>Use of <code>void*</code> for pointer differences: replaced
with <code>ptrdiff_t</code> where necessary.</li>
<li>Precision truncation between int and long, size_t.</li>
<li>Precision truncation between float and double.</li>
<p>Made several internal functions to improve the above. There
remain some int / size_t errors in the public API that will need new
API functions to properly fix for 64-bit machines dealing with
strings more than &gt;32bits in length; which should be rare.
<p>Reduced Rasqal's call stack size by ensuring all I/O buffers are
dynamically allocated.
<p><code>configure</code> now always checks for where <code>ceil()</code>,
<code>floor()</code> and <code>round()</code> can be found: in libc
or libm.
<p>The <code>configure</code> default
for <code>--enable-maintainer-mode</code> no longer enables the
debugging symbols. These can be added
with <code>--enable-debug</code>
<p>The <code>configure</code> gains an option
<code>--with-gmp=</code><em>PATH</em> to set the installation path
of the
<a href="">GNU Multiple Precision Arithmetic Library (GMP)</a>
if it is not in the standard lib/include prefix.
<h2 id="rel0_9_26"><a name="rel0_9_26">Rasqal 0.9.26 changes</a></h2>
<p>Issues Fixed:</p>
<li><a href="">Issue #0000430</a>: Incorrect HTML generated with unknown literal types</li>
<li><a href="">Issue #0000431</a>: Only a limited number of literal datatypes are displayable in a HTML format.</li>
<li><a href="">Issue #0000436</a>: queries involving calculations with large numbers return incorrect results unless scientific notation is used</li>
<li><a href="">Issue #0000438</a>: timegm not available on solaris</li>
<li><a href="">Issue #0000439</a>: warning when variable is not selected makes 4store tests to fail</li>
<li><a href="">Issue #0000446</a>: rasqal may require -lm for floor, ceil, round on some systems and architectures</li>
<h3>SPARQL 1.1 Query draft language changes</h3>
<p>Added support for SPARQL 1.1 message digest functions
<code>MD5()</code>, <code>SHA1()</code>, <code>SHA224()</code>,
<code>SHA256()</code>, <code>SHA384()</code> and <code>SHA512()</code></p>
<h3>Query engine changes</h3>
<p>Many internal query engine changes to more accuractly compute
variable scope, use and binding to better support more complex
queries with scopes such as <code>UNION</code> (now mostly working)
and sub-<code>SELECT</code> (execution is not yet supported).
<p>Added <code>rasqal_world_set_warning_level()</code> to set the
query warning level in the 0...100 range where 0 is no warnings, 50
is the default and 100 is all warnings.
<p>Query errors now fail with regular errors not fatal errors that
<code>abort()</code>. Query parsing errors are not work killing the
process. Also adjusted some error paths to prevent reporting 2
errors at once.
<p><code>rasqal_op</code> enumeration gains values
<code>RASQAL_EXPR_MD5</code>, <code>RASQAL_EXPR_SHA1</code>,
<code>RASQAL_EXPR_SHA224</code>, <code>RASQAL_EXPR_SHA256</code>,
<code>RASQAL_EXPR_SHA384</code> and <code>RASQAL_EXPR_SHA512</code>
for message digest expressions corresponding to SPARQL 1.1 message
digest functions.
<p>Added message digest support either built with internal MD5 and
SHA1 which are always available, or with libmhash which provides the
full list of message digests that SPARQL 1.1 requires (and is
<p>Make <code>ROUND()</code> work with XSD Decimal when compiled
against <a href="">GNU MP</a>.
<p>Check for overflow when converting a string to int and if
resulting long won't fit in an int, turn it into a decimal.
Fixes <a href="">Issue #0000436</a>.
<p>Removed Query Engine V1 that was long disabled.
<code>configure</code> loses
the <code>--with-query-engine-version</code> option.
<h3>Query results formatter class changes</h3>
<p>Fixed HTML query results generating invalid HTML.
Fixes <a href="">Issue #0000430</a>
<p>Support writing additional literal types in HTML query results.
Fixes <a href="">Issue #0000431</a>
<p>The JSON query result format now accepts the
<code>application/sparql-results+json</code> mime type, as specified
in the
<a href="">Serializing SPARQL Query Results in JSON</a>
W3C WG Note.
<h3><code>roqet(1)</code> utility changes</h3>
<p>Added options <code>-W</code>
/ <code>--warnings</code> <em>level</em> (default 50) to set the
warning level and <code>-E</code> to ignore errors.
<h3>Other changes</h3>
<p><code>configure</code> gains a <code>--enable-debug</code> option
to enable or disable the debugging messages. Useful for when
building using <code></code> from GIT.
<p>Removed internal test/debug 'redland' triples store that has not
worked for some time. Removed the <code>--with-triples-source</code>
and <code>--with-redland-config</code> options from <code>configure</code>.
<p>Add a portable version of <code>timegm()</code> when it is not
present in the system (such as Solaris).
Fixes <a href="">Issue #0000438</a>.
<p>Added <code>configure</code> tests
for <code>ceil()</code>, <code>floor()</code>
and <code>round()</code> that look for them in libc or libm.
Fixes <a href="">Issue #0000446</a>.
<p>Fixed up several code paths with problems found
by <a href="">clang</a>, mostly unused
variables, unnecessary calculations but a couple of bad accesses.
<h2 id="rel0_9_25"><a name="rel0_9_25">Rasqal 0.9.25 changes</a></h2>
<p>Issues Fixed:</p>
<li><a href="">Issue #0000421</a>: Use raptor_syntax_description_validate() to validate Query Results formats</li>
<li><a href="">Issue #0000427</a>: INSERT/DELETE with &quot;&quot;&quot; quoting doesn't quite work</li>
<li><a href="">Issue #0000428</a>: @lang doesn't work with &quot;&quot;&quot;:</li>
<h3>SPARQL 1.1 Query draft language changes</h3>
<p>Added support for SPARQL 1.1 numeric functions <code>ABS()</code>,
<code>ROUND()</code>, <code>CEIL()</code> and <code>FLOOR()</code>.
<p>Added support for SPARQL 1.1 <code>BIND(expr as ?var)</code>
using existing <code>RASQAL_GRAPH_PATTERN_OPERATOR_LET</code>.
<p>Added support for SPARQL 1.1 <code>CLEAR</code> and
<code>DROP</code> to use optional <code>SILENT</code> keyword.
<p>Added support for SPARQL 1.1 <code>RAND()</code> along with a
query API feature for user setting of the random seed.</p>
<p>Added support for SPARQL 1.1 TZ()</p>
<p>Fixed SPARQL 1.1 <code>ENCODE_FOR_URI()</code> to not preserve
language and datatype of input.
<p>Fixed support for SPARQL 1.1 <code>BNODE()</code> to work with no
argument given.
<p>Fixed SPARQL 1.1 <code>GROUP BY</code> to allow an optional
<code>AS ?var</code>.
<p>Fixed support for """-quoted and '''-quoted strings not over-quoting
and adding support for optional language.
<a href="">Issue #0000427</a>
<a href="">Issue #0000428</a>.
<h3>DateTime class changes</h3>
<p>Added <code>rasqal_xsd_datetime_get_tz_as_counted_string()</code>
to get back the timezone string component of a datetime.
<h3>Datatype class changes</h3>
<p><code>rasqal_xsd_format_double()</code> now correctly formats
numbers that have no trailing 0s.
<h3>Decimal class changes</h3>
<p>Added <code>rasqal_xsd_decimal_abs()</code>,
<code>rasqal_xsd_decimal_ceil()</code> and
<code>rasqal_xsd_decimal_floor()</code> to support the ABS(),
ROUND(), CEIL() and FLOOR() functions for decimals.
<h3>Expression class changes</h3>
<p>rasqal_op gains
<code>RASQAL_EXPR_CEIL</code> and
<code>RASQAL_EXPR_FLOOR</code> for numeric operations,
<code>RASQAL_EXPR_RAND</code> for SPARQL 1.1 <code>RAND()</code>
and <code>RASQAL_EXPR_TZ</code> for SPARQL 1.1 TZ() timezone accessor.
<p>Added an evaluation context structure
<code>rasqal_evaluation_context</code> for the information needed to
evaluate any <code>rasqal_expression</code> tree. This makes
expression evaluation independent of a query, but still tied to a
rasqal world and (via variables) a variables table. Added constructor
<code>rasqal_new_evaluation_context()</code> to set the locator and
flags, destructor <code>rasqal_free_evaluation_context()</code>,
method <code>rasqal_evaluation_context_set_base_uri()</code> to
set/reset the shared reference to the context base URI
and method <code>rasqal_evaluation_context_set_rand_seed()</code>
to set the random seed for the evaluation.
<p>Added <code>rasqal_expression_evaluate2()</code> taking just an
expression and an evaluation context.
<p><code>rasqal_expression_evaluate()</code> is deprecated for the
<p>Added new method
<code>rasqal_xsd_datetime_get_tz_as_counted_string()</code> for
executing <code>RASQAL_EXPR_TZ</code> for SPARQL 1.1 TZ().
<h3>Query Engine changes</h3>
<p>Initialise seed for RAND() from either a mixture of system sources
or from a value set by user. The user value can be set with new
query feature <code>RASQAL_FEATURE_RAND_SEED</code>. Uses
<code>rasqal_evaluation_context_set_rand_seed()</code> on the query's
internal evaluation context.
<p>Enable <code>rasqal_query_set_store_results()</code> to actually
work after a query prepare.
<p>Handle evaluation of <code>FILTER</code> over an empty inner graph
pattern such as in a query like <code>ASK WHERE { FILTER ( TRUE ) }</code>
<p>Ignore errors in executing SPARQL 1.1 project expression
<code>AS</code> variables.
<p>Update <code>rasqal_literal_as_boolean()</code>,
<code>rasqal_literal_as_integer</code> and
<code>rasqal_literal_as_floating</code> when evaluating NULL to
return a type error not an assertion failure or abort (in debug
<p>Change internal error handling to separate a NULL return from an
error return when evaluating expressions. Updated lots of callers of
expression evaluation to handle a NULL expression response. Needed
since now NULL is a valid expression evalution in some cases; like
STRLANG() on non-simple literals.
<p>Updated to use <code>rasqal_evaluation_context</code> for
expression evaluation.
<p>Handle support executing empty graph patterns such as in queries
like <code>SELECT (expr AS ?var) WHERE {}</code> which just evaluates
<code>expr</code> and returns a single row with a single result.
<h3>Query Result Formatter class changes</h3>
<p>Handle NULL values for RDF and Tables results.
<h3>Other changes</h3>
<p>Added <code>rasqal_world_get_query_language_description()</code>
to get a description of a query language replacing and deprecating
<p>More fixes to check-query test script.
<p>Make GPL V2 or newer explicit in LICENSE.html.
<h2 id="rel0_9_24"><a name="rel0_9_24">Rasqal 0.9.24 Changes</a></h2>
<h3>SPARQL 1.1 Update draft Language changes</h3>
<p>Added support for <code>CLEAR</code> and <code>DROP</code>
applying to more than one graph. The options are now: just default
graph with <code>DEFAULT</code>, all named graphs with
<code>NAMED</code> and all graphs with <code>ALL</code>.
<p>Added support for optional <code>SILENT</code> flag before most
update operations.
<p>Added support for <code>ADD</code>, <code>MOVE</code> and
<code>COPY</code> operations which both operate between two graphs -
either named or default. The source graph is stored in the update
structure <code>graph_uri</code> field and the destination graph in
the <code>document_uri</code> field; the names have no meaning here
since both are graphs and a NULL value signifies the default graph.
<p>Added support for <code>DELETE WHERE {}</code> writing the triple
results into the <code>delete_templates</code> field of the update
<p>Added support for multiple update operations in one 'query'
separated by ';'.
<p><code>GROUP_CONCAT()</code> now sets the
<code>RASQAL_EXPR_FLAG_AGGREGATE</code> rasqal_expression flag
like the other builtin aggregate expressions.
<h3>Query Engine changes</h3>
<p>Fixed a few memory leaks in aggregate operation with
<code>GROUP</code> and with <code>HAVING</code>.
<h3>Literal API changes</h3>
<p>Fixed a memory leak with datetime literals.
<h3>Update API changes</h3>
<p><code>rasqal_update_type</code> gains new enum values
<code>RASQAL_UPDATE_TYPE_MOVE</code> and
<code>RASQAL_UPDATE_TYPE_COPY</code> for the SPARQL 1.1 Update ADD,
MOVE and COPY operations respectively.
<p>Added enum <code>rasqal_update_graph_applies</code> to specify
scope that update applies to beyond one graph to either just the
default graph, to all named graphs or to all graphs. Applies to
CLEAR and DROP operations only
<h3>Other changes</h3>
<p>Make all object destructors simply return on a NULL object
pointer. This was already done but with different code styles.
<h2 id="rel0_9_23"><a name="rel0_9_23">Rasqal 0.9.23 Changes</a></h2>
<p>Fixed Issues:</p>
<li><a href="">0000407</a>: ORDER BY does not appear to handle undefined values correctly</li>
<li><a href="">0000414</a>: Type of operation->insert_templates depends on Update syntax</li>
<li><a href="">0000415</a>: Graph pattern operator not correctly filled out in SPARQL 1.1 Updates</li>
<li><a href="">0000417</a>: SELECT DISTINCT sometimes returns duplicates</li>
<h3>Graph pattern class changes</h3>
<p>Added <code>rasqal_graph_pattern_get_flattened_triples()</code> to
flatten a recursive basic/graph graph pattern
to a sequence of triples or triple patterns (have variables).
<h3>SPARQL Query Language changes</h3>
<p>Fix the parsing of SPARQL 1.1 Update draft INSERT and DELETE to
return sequences of triples in the insert_templates and
delete_templates fields as documented. It would previously sometimes
return that but mostly return a sequence of recursive graph patterns.
<p>When a syntax error happens due to use of a language feature, do
proper error handling (no aborting) and clean up parsing resources.
<h2 id="rel0_9_22"><a name="rel0_9_22">Rasqal 0.9.22 Changes</a></h2>
<p>This means: functions, enums and types were added, removed and changed.</p>
<p>Consequently the shared library major soname version has changed from 2 to 3.</p>
<p>The main changes in this release were to add more draft SPARQL 1.1
features and to use Raptor V2.</p>
<p>Rasqal now depends on Raptor V2. Raptor V1 is not supported. The
minimum Raptor2 version is 2.0.0.
<p>Given the the large dependency change above that requires
recompiling with some breakage, this release makes an ABI and API
break. All deprecated functions, types and other deprecated
functionality have been removed. The libtool library version
was bumped to 3.0.0. The detailed API changes are described in the
Changes section of the
<a href="">Rasqal reference manual</a>.
<h3>Query Engine Changes</h3>
<p>Query engine initialises start of execution datetime to enable a
<code>NOW()</code> function to provide a stable value during a single
<h3>Query Language Changes</h3>
<p>Split query language support into more languages with aliases:
<li><code>sparql</code> (and alias <code>sparql10</code>): SPARQL 1.0 query with no 1.1 features.</li>
<li><code>sparql11-query:</code> SPARQL 1.1 query.</li>
<li><code>sparql11-update:</code> SPARQL 1.1 update.</li>
<li><code>sparql11:</code> SPARQL 1.1 with both query and update.</li>
<li><code>laqrs:</code> LAQRS experimental language with all of above plus experiments.</li>
<h3>LAQRS Query Language changes</h3>
<p>Added experimental datetime builtin methods:</p>
<li><code>NOW()</code> / <code>CURRENT_DATETIME()</code>: Synonyms
to return an XSD datetime for the current wall clock date and time.
At the first execution / preparation of the query, the value is set
as a constant throughout the life of the query execution.
<li><code>FROM_UNIXTIME()</code>: turns an integer value into an XSD DateTime.
<li><code>TO_UNIXTIME()</code>: turns an XSD DateTime into an integer value.
<p>These functions are not opposites and will not roundtrip date
times since they do not take into consideration leap seconds or
daylight saving time changes.
<h3>SPARQL Query Language changes</h3>
<p>Fixed SPARQL 1.1 draft <code>isNUMERIC()</code> which was stored
wrongly in the parse tree as <code>RASQAL_EXPR_ISLITERAL</code>.
<p>Added SPARQL 1.1 draft dateTime accessor builtin functions
along with expression execution support.</p>
<p>Added SPARQL 1.1 draft string builtin functions
along with expression execution support.</p>
<h3>Data Graph class changes</h3>
<p>Removed deprecated <code>rasqal_new_data_graph()</code>
constructor replaced by <code>rasqal_new_data_graph_from_uri()</code>
with additional arguments.
<h3>Datetime class changes</h3>
<p>Added <code>rasqal_xsd_datetime</code> class to the public API
implementing the XML Schema datatypes (XSD) dateTime with microsecond
accuracy (where present) and timezone offsets of minutes accuracy.
The new class has constructors:</p>
<p>and methods:</p>
<h3>Expression class changes</h3>
<p><code>rasqal_expression_evaluate()</code> now evaluates the new
SPARQL 1.1 draft strings and datetime builtin functions.
<p><code>rasqal_op</code> gains new values for SPARQL 1.1 builtin
<p><code>rasqal_op</code> gains new values for LAQRS experimental
builtin functions:</p>
<p><code>rasqal_new_function_expression()</code> constructor gained
<code>params</code> and <code>flags</code> arguments to handle
aggregate expressions. This was renamed from
<p>Removed deprecated <code>rasqal_new_function_expression2()</code>
replaced by <code>rasqal_new_function_expression()</code> with same
<p>Added constructor <code>rasqal_new_expr_seq_expression()</code>
replacing <code>rasqal_new_coalesce_expression()</code> and taking an
op argument to use for different expression operations.
<p>Removed method <code>rasqal_new_coalesce_expression()</code>
replaced by <code>rasqal_new_expr_seq_expression()</code> with
additional op argument.
<p><code>rasqal_expression_evaluate()</code> evalutes experimental
LAQRS datetime builtin methods <code>NOW()</code>,
<code>CURRENT_DATETIME()</code>, <code>FROM_UNIXTIME()</code> and
<p>Fixed <code>RASQAL_EXPR_DATATYPE</code> expression execution to
return the result rather than the function argument.
<h3>Literal class changes</h3>
<p>Support XSD dateTime literals. <code>rasqal_literal</code> value
union gains a datetime field.</p>
<p>Added new constructor
<code>rasqal_new_datetime_literal_from_datetime()</code> to make a
datetime literal.</p>
<p><code>rasqal_literal_set_typed_value()</code> turns xsd:dateTime
literals into <code>rasqal_xsd_datetime</code> objects.
<p><code>rasqal_literal_equals_flags()</code> and
<code>rasqal_literal_compare()</code> now use <code>rasqal_datetime</code>
equality and comparison methods.
<p>Added new accessor <code>rasqal_literal_as_counted_string()</code>
get the string version of its and its length, letting the caller
avoid strlen() on the result.
<h3>Query class changes</h3>
<p>Added method <code>rasqal_query_get_result_type()</code>
to get the expected result type based on the query structure.
<p>Added method <code>rasqal_query_set_store_results</code> to enable
storing results of an execution.</p>
<p>Removed deprecated methods:
replaced by using
<code>rasqal_world_set_log_handler()</code> calling a
<p>Removed deprecated methods:
that have moved to methods on the rasqal_world object:
<code>rasqal_world_set_default_generate_bnodeid_parameters()</code> and
<code>rasqal_world_set_generate_bnodeid_handler()</code> respectively.
<p><code>rasqal_query_add_data_graph()</code> was altered to take a
single <code>rasqal_data_graph</code> argument instead of uri, name
and flags. This was renamed from <code>rasqal_query_add_data_graph2()</code>.
<code>rasqal_query_add_data_graph2()</code> replaced by
<code>rasqal_query_add_data_graph()</code> with same arguments.
<h3>Query Results class changes</h3>
<p>Added support for query result rewinding, if the results
were stored in execution via <code>rasqal_query_set_store_results()</code>,
new method <code>rasqal_query_results_rewind()</code> may be called
to reset back to the initial binding result.
<p>Added <code>rasqal_query_results_get_row_by_offset()</code> to
access stored query result rows if storing results was enabled by
<p>Enum <code>rasqal_query_results_type</code> gains value
<code>RASQAL_QUERY_RESULTS_UNKNOWN</code> for when a query result
type is unknown or yet to be determined.
<p>Added method <code>rasqal_query_results_get_type()</code>
to get the query result type.
<p><code>rasqal_query_results_read()</code> was altered to take a
name, mime_type, format_uri, base_uri args instead of format_uri,
base_uri. This was renamed from <code>rasqal_query_results_read2()</code>.
<p>Removed <code>rasqal_query_results_read2()</code>
replaced by <code>rasqal_query_results_read()</code> with the same arguments.
<p><code>rasqal_query_results_write()</code> was altered to take a
name, mime_type, format_uri, base_uri args instead of format_uri,
base_uri. This was renamed from <code>rasqal_query_results_write2()</code>.
<p>Removed <code>rasqal_query_results_write2()</code>
replaced by <code>rasqal_query_results_write()</code> with same arguments.
<h3>Query Results Formatter class changes</h3>
<p>Added new constructor
to get a query result formatter based on guessing from format URI, name,
mime type, some initial content or an identifier using
<p>Removed <code>rasqal_new_query_results_formatter2()</code>
constructor replaced by
<code>rasqal_new_query_results_formatter()</code> constructor.
<p>Removed deprecated
replaced by
<code>rasqal_new_query_results_formatter_for_content()</code> with
additional arguments.
<p>Added world method
<code>rasqal_world_guess_query_results_format_name()</code> to guess
format based on format URI, mime type, some initial content or an
<p>Added guessing based on identifier/filename suffix for the 'rdf'
(.rdf), 'turtle' (.ttl, .n3) and 'xml' (.srx) formatters.
<p>Added reading support for the existing 'rdfxml' and 'turtle' query
result formatters to make both of these read/write formatters.
<code>rasqal_world_get_query_results_format_description()</code> to
get the list of query results format syntaxes using a
<code>raptor_syntax_description</code> structure. This replaced and
deprecates the <code>rasqal_query_results_formats_enumerate()</code>
and <code>rasqal_query_results_formatter_get_mime_type()</code>
<p>This change allows the query result formats to be identified and
discovered by multiple names (aliases) and URI strings when using the
<code>rasqal_new_query_results_formatter2()</code> constructor.
<p><code>rasqal_new_query_results_formatter()</code> constructor was
altered to take name, format type, format URI args instead of just
name, format URI. This was renamed from
<p><code>rasqal_query_results_formats_check()</code> was altered to
take name, format URI, mime_type flags instead of name, uri and
type. This was renamed from <code>rasqal_query_results_formats_check2()</code>.
<p>Removed <code>rasqal_query_results_formats_check2()</code>
replaced by <code>rasqal_query_results_formats_check()</code> with
the same arguments.
<p>Removed <code>rasqal_query_results_formats_enumerate()</code> replaced by
using static syntax description approach.
<p>Removed <code>rasqal_query_results_formatter_get_mime_type()</code>
replaced by using fields of <code>raptor_syntax_description</code> structure
returned by <code>rasqal_world_get_query_results_format_description()</code>.
<h3>Variable class changes</h3>
<p>Removed deprecated constructors
<code>rasqal_new_variable()</code> replaced by the
<code>rasqal_variables_table_add()</code> method on a variables table
to create and add a variable in a context.
<h3>Other changes</h3>
<p>Replaced all uses of <code>strcpy()</code> with
<code>memcpy()</code> and known lengths.
<p>Refactored huge <code>rasqal_expression_evaluate()</code> switch
and case code into sub-methods preparing for possible later change to
a jump table based on expression operation.
<p><code>rasqal_xsd_decimal_as_string()</code>: Fix decimal to string
xsd lexical form details: rounding precision, format details (such as
0.0 not 0.0E0) when built with MPFR or GMP instead of the (imprecise)
<code>double</code> implementation.
<p>Fix xsd double lexical form formatting to use capital E.
<p>Started creating <code>check-query</code> query test runner utility.
<h2 id="rel0_9_21"><a name="rel0_9_21">Rasqal 0.9.21 Changes</a></h2>
<p>The main changes in this release are to add support for features of
<a href="">SPARQL 1.1 Query</a>
W3C working draft of 14 October 2010:
<li>Executing grouping of results: <code>GROUP BY</code></li>
<li>Executing aggregate expressions: <code>AVG</code>, <code>COUNT</code>, <code>GROUP_CONCAT</code>, <code>MAX</code>, <code>MIN</code>, <code>SAMPLE</code>, <code>SUM</code></li>
<li>Executing filtering of aggregate expressions: <code>HAVING</code></li>
<li>Parsing of new syntax: <code>BINDINGS</code>, <code>isNUMERIC()</code>, <code>MINUS</code>, sub <code>SELECT</code> and <code>SERVICE</code>.</li>
<p>Fixed Issues:</p>
<li><a href="">0000388</a>: Can only write JSON format for variable binding and boolean results</li>
<h3>Query Engine changes</h3>
<p>Support executing new SPARQL 1.1 draft function
<p>Support executing built-in aggregate expressions:</p>
<li><code>COUNT(*)</code> and <code>COUNT(expr)</code></li>
<li><code>GROUP_CONCAT(expr)</code> with optional <code>;separator = 'string'</code></li>
<p>with and without <code>DISTINCT</code> across the arguments.</p>
<p>Support executing grouping of results with <code>GROUP BY</code>
(or implicitly if aggregate function was given) and
<code>HAVING</code> to filter groups.
<h3>LAQRS Query Language changes</h3>
<p>Explain more carefully that <code>EXPLAIN</code> and
<code>COALESCE()</code> are LAQRS only and remain experimental.
<h3>SPARQL Query Language changes</h3>
<p>Separate SPARQL 1.0 and SPARQL 1.1 draft language names giving query
languages <em>sparql</em> (with alias <em>sparql10</em> for SPARQL
1.0), <em>sparql11</em> for SPARQL 1.1 and <em>laqrs</em> for
experiments. The <em>sparql</em> name without a version currently
points to SPARQL 1.0 but over time will advance to be SPARQL 1.1
<p>Added support for parsing (not executing) new SPARQL 1.1 draft tokens:
<code>BINDINGS</code> for variable bindings, <code>UNDEF</code>,
<code>SERVICE</code> and <code>MINUS</code>.
<p>Added support for parsing and executing new SPARQL 1.1 draft
<code>isNUMERIC()</code> expression.
<p>Added support for parsing (not executing) new SPARQL 1.1 draft
sub-<code>SELECT</code> queries.
<p>Support for parsing and executing built-in (not user) aggregate expressions:
<code>COUNT(*)</code> and <code>COUNT(expr)</code>,
<code>GROUP_CONCAT(expr)</code> with optional <code>;separator = 'string'</code>,
with and without <code>DISTINCT</code> across the arguments.
<p>Added support for executing grouping of results with <code>GROUP BY</code>
(or implicitly if aggregate function was given) and <code>HAVING</code>
to filter groups.
<h3>Bindings class changes</h3>
<p>Added a class to support for SPARQL 1.1 draft
<code>BINDINGS</code> in a query specifying a set of variable
bindings and a sequence of rows of values to bind to them. Intended
for applying to a SPARQL 1.1 draft query <code>SERVICE</code>
<p>Added bindings class rasqal_bindings with constructor
<code>rasqal_new_bindings</code>, destructor
<code>rasqal_free_bindings()</code> and method
<p>Added accessor methods for getting bindings variables and rows
<code>rasqal_query_get_bindings_rows_sequence()</code> and
<h3>Data Graph class changes</h3>
<p>Turn a data graph into a reference-counted class and add support
for specifying the format of a data graph for parsing after
<p>typedef <code>rasqal_data_graph</code> gains new optional
format_type, format_name and format_uri fields for describing the
format of the graph an optional uri field for base URI and
a usage field.
<p>Added constructor
<code>rasqal_new_data_graph_from_uri()</code> with format_type,
format_name and format_uri args deprecating rasqal_new_data_graph()
without them, which always guessed the format.
<p>Added constructor
<code>rasqal_new_data_graph_from_iostream()</code> taking a
raptor_iostream arg to allow getting data graphs from non-URIs which
could be strings, memory etc.
<p>Added copy constructor
<code>rasqal_new_data_graph_from_data_graph()</code> for data graphs.
<h3>Expression and literal class changes</h3>
<p>Added support for SPARQL 1.1 draft <code>isNUMERIC()</code>
expressions. The <code>rasqal_op</code> gains a new
<code>RASQAL_EXPR_ISNUMERIC</code> value.
<p>Added <code>rasqal_expression_op_label()</code> to return
the label for an expression operation.
<p>Added <code>rasqal_expression_compare()</code> to compare
<p>Added <code>rasqal_expression_is_aggregate()</code> to test if an
expression is an aggregate one - has an aggregate operation or
user-defined function.
<p>Added <code>rasqal_literal_type_label()</code> to return
the label for a literal type.
<h3>Graph pattern class changes</h3>
<p><code>rasqal_graph_pattern_operator</code> enumeration gains
new values for SPARQL 1.1 draft features:
<code>RASQAL_GRAPH_PATTERN_OPERATOR_SERVICE</code> for service binding and
<code>RASQAL_GRAPH_PATTERN_OPERATOR_MINUS</code> for minus operation
between graph patterns.
<p>Added new constructor <code>rasqal_new_single_graph_pattern()</code>
for use with service and minus graph patterns.
<p>Added <code>rasqal_graph_pattern_get_variable()</code> method to
get the variable for SPARQL 1.1 draft <code>BIND</code> and LAQRS
<code>LET</code> graph patterns.
<p>Added <code>rasqal_graph_pattern_get_service()</code> method to
get the service object for SPARQL 1.1 draft <code>SERVICE</code>
graph pattern.
<h3>Query class changes</h3>
<p>Added <code>rasqal_query_add_data_graph2()</code> to
add a previously constructed data graph to a query
deprecating <code>rasqal_query_add_data_graph()</code> that
did construct and add in one go.
<p>Added <code>rasqal_query_add_data_graphs()</code> to
add a sequence of data graphs to a query.
<p>Added <code>rasqal_query_add_data_graph_from_iostream()</code>
using new <code>rasqal_new_data_graph_from_iostream()</code>.
<p>Note in the docs for <code>rasqal_query_set_limit()</code> and
<code>rasqal_query_set_offset()</code> that with the new query engine
approach, you cannot set the limit or offset until the query is
prepared which is after parsing.
<h3>Query results class changes</h3>
<p>Add a formatter to write a variable bindings query results in
Turtle format with the schema used for the W3C DAWG and SPARQL
Working group test cases.
<p><code>rasqal_query_results_formats_check2()</code> added with new
flags arg for asking for a format to read or write, deprecating
<code>rasqal_query_results_formats_check()</code> without it.
<h3>Row class changes</h3>
<p>The <code>rasqal_row</code> gains a <code>group_id</code> field
for returning group boundaries. Change of groups should be detected
by a change in IDs between rows.
<h3>Service class changes</h3>
<p>Added a <code>rasqal_service</code> class for executing remote
queries against a SPARQL HTTP protocol endpoint and getting back a
query results set. The data graphs attached get turned into
<code>default-graph-uri</code> and <code>named-graph-uri</code> URI
parameters to the request.
<p>Added constructor <code>rasqal_new_service()</code>,
destructor <code>rasqal_free_service()</code> and methods
<code>rasqal_service_set_www()</code> to set the WWW object
<code>rasqal_service_set_format()</code> to set the accept
request header and
<code>rasqal_service_execute()</code> to execute the query
returning the results.
<h3>Triples source class changes</h3>
<p>Add a way for a triples source factory to return meaningful errors
by adding a new <code>init_triples_source</code> factory method to
the <code>rasqal_triples_source_factory</code> that takes a
<code>rasqal_triples_error_handler</code> callback. The
ranges 1 to 2 are supported.
<p>Add a way for a triples source to indicate support for optional
features by adding a <code>support_feature</code> method toe the
<code>rasqal_triples_source</code> structure. The
<code>RASQAL_TRIPLES_SOURCE_MAX_VERSION</code> is now 2 and
ranges 1 to 2 are supported.
<p>Added enum <code>rasqal_triples_source_feature</code> with
to indicate a triple source supports reading data graphs from
a <code>raptor_iostream</code>.
<h3>Variable class changes</h3>
<p>Now a reference-counted class.</p>
<p>Deprecated <code>rasqal_new_variable()</code> and
<code>rasqal_new_variable_typed()</code> for
<h3>Internal changes</h3>
<p>All destructors accept NULL objects and do nothing.
<p>Add a Raptor V2-style raptor_syntax_description data model to
Rasqal and use it to initialise query languages. It is not currently
exposed in the API and may not be until Rasqal requires Raptor V2 when
it can share code.
<p>Added an internal <code>rasqal_bindings</code> structure
for SPARQL 1.1 <code>BINDINGS</code>.
<p>Add an internal query results modifiers structure
rasqsal_solution_modifier class for use in storing group by, having,
limit, offset information which together SPARQL 1.1 documentationc
calls modifiers.
<p>Added rowsources for grouping, executing aggregated queries across
groups, having filters per group. Modified the projection rowsource
to handle aggregation.
<h3><code>roqet(1)</code> utility changes</h3>
<p>Added support for serializing to graphs or bindings with the same
Raptor serializer / Rasqal result formatter name such as for example
<p>Added <code>-F NAME</code> option for specifying the data graph
format; otherwise Raptor uses the guessing mechanism.</p>
<p>Added support for reading a data graph from standard input (stdin)
when the <code>-D</code> / <code>--data</code> , <code>-G</code> /
<code>--name</code> or <code>-s</code> / <code>--source</code>
options are used with value <code>'-'</code>.
<p>Added <code>-p</code> / <code>--protocol</code>
<em>SERVICE-URI</em> option to execute a remote query at a SPARQL
HTTP protocol URI. This is used with <code>-e</code> <em>query
string</em> to specify the query to execute remotely.
<h3>Configuration and build changes</h3>
<p>Use AC_LANG_SOURCE for gcc flag test.
<h3>Other changes</h3>
<p>The srxread and srxwrite example programs now build when Rasqal is
configured and built with raptor V2.
<h2 id="rel0_9_20"><a name="rel0_9_20">Rasqal 0.9.20 Changes</a></h2>
<p>The main changes in this release are:</p>
<li>Support more SPARQL 1.1 Query and Update draft syntax and some
execution semantics for new built-in expressions.</li>
<li>Support building with Raptor V2 API as well as Raptor V1 API. The Raptor V2 API is only used if <code>--enable-raptor2</code> is given to <code>configure</code>.</li>
<p>Fixed Issues:</p>
<li><a href="">0000352</a>: CONSTRUCT with a LIMIT doesn't limit query results</li>
<li><a href="">0000353</a>: CONSTRUCT with an ORDER always(?) returns an empty graph</li>
<li><a href="">0000354</a>: Comparing xsd:int and xsd:integer fails in SPARQL</li>
<li><a href="">0000360</a>: [PATCH] HTML Table results format</li>
<li><a href="">0000374</a>: Solaris 10 'make check' failures</li>
<li><a href="">0000377</a>: Cannot format results in roqet</li>
<li><a href="">0000378</a>: Crash when cleaning up after a failed query containing unsupported syntax</li>
<h3>Query API changes</h3>
<p>Moved generate blank node ID functionality to world class.
Deprecated <code>rasqal_query_set_generate_bnodeid_handler()</code>
for new function (with different handler signature)
<p>Added <code>rasqal_query_get_having_conditions_sequence()</code> and
<code>rasqal_query_get_having_condition()</code> for getting access
to the HAVING expression list in a query.
<h3>Expression and literal class changes</h3>
<p>Added new literal type <code>RASQAL_LITERAL_INTEGER_SUBTYPE</code>
to let subtypes of <code>xsd:integer</code> work in data and
expression evaluation.
<p>Add support for SPARQL 1.1 draft <code>FILTER</code> expression
operators including execution in the expression evaluation and
writing the expression as SPARQL:</p>
<th>New <code>rasqal_op</code> enum</th>
<th>SPARQL 1.1 expression</th>
<td>IF(condition expression, expr if true, expr if false)</td>
<td>URI(uri string)</td>
<td>IRI(iri string)</td>
<td>STRLANG(literal string, language string)</td>
<td>STRDT(literal string, datatype URI)</td>
<td>BNODE() and BNODE(string)</td>
<td>Expr IN ( list )</td>
<td>Expr NOT IN ( list )</td>
<p>Added expression evaluation and expression formatting support for
the above new (non-aggregate) expression operations in:
<code>rasqal_expression_is_constant()</code> and
<p>Added <code>rasqal_op</code> enumeration values for built-in
aggregate functions <code>RASQAL_EXPR_GROUP_CONCAT</code> and
<code>RASQAL_EXPR_SAMPLE</code> but no expression execution.
<p>Added new bitflags <code>rasqal_expression_flags</code> for
<code>rasqal_expression</code> flags with initial bitflags
<code>RASQAL_EXPR_FLAG_DISTINCT</code> for distinct (aggregate functions) and
<code>RASQAL_EXPR_FLAG_AGGREGATE</code> for aggregate functions.
<p>Added <code>rasqal_new_function_expression2()</code> for functions
with parameters and optional bit flags deprecating
<code>rasqal_new_function_expression()</code>. This is not
capable of adding a user extension aggregate function.
<p>Added new <code>rasqal_new_aggregate_function_expression()</code>
constructor for making a 1-arg built-in aggregate functions.
This is not capable of adding a user extension aggregate function.
<p>The never used <code>RASQAL_EXPR_GROUP_COND_ASC</code> and
<code>RASQAL_EXPR_GROUP_COND_DESC</code> are marked as obsolete.
<p>Updated documentation for <code>rasqal_expression_visit()</code>,
<code>rasqal_graph_pattern_visit_fn</code> and
<code>rasqal_expression_visit_fn</code> typedef to match what the code
actually does.</p>
<p>Added <code>rasqal_new_group_concat_expression()</code> for
building SPARQL GROUP_CONCAT() expressions with flags, non-empty list
of expressions and optional literal separator.
<h3>SPARQL query language changes</h3>
<p>Support latest
<a href="">SPARQL 1.1 Query W3C working draft of 1 June 2010</a>
syntax such as:</p>
<p>For SPARQL 1.1 Query, allow <code>DISTINCT</code> optionally before extension function
expressions with new flag <code>RASQAL_EXPR_FLAG_DISTINCT</code>.</p>
<p>Added draft SPARQL 1.1 Query <code>IF()</code>, <code>URI()</code>,
<code>IRI()</code>, <code>STRLANG()</code>, <code>STRDT()</code> and
<code>BNODE()</code> (with optional expression arg) built-in
<p>Added draft SPARQL 1.1 Query <code>IN()</code> and <code>NOT IN()</code>
<p>Adjust draft SPARQL 1.1 Query select expression syntax to latest
version: '(' Expr 'AS' Var ')' with required braces.
<p>Added draft SPARQL 1.1 Query aggregate functions
<code>GROUP_CONCAT()</code> and <code>SAMPLE()</code>
with new expression enum
<code>RASQAL_EXPR_SAMPLE</code> as well as formatting to SPARQL and
placeholder expression handling implementation - no aggregate expression
evaluation. Supports the optional <code>; SEPARATOR =
"string"</code> syntax for GROUP_CONCAT().
<p>Add support for draft SPARQL 1.1 Query syntax
<code>GROUP BY</code> a list of select expressions and
<code>HAVING</code> with a list of expressions.
<p>Add partial support for draft SPARQL 1.1 Query extension (aggregate)
functions with DISTINCT and parameters.
<p>Support latest
<a href="">SPARQL 1.1 Update W3C working draft of 1 June 2010</a>
syntax such as:</p>
<li><code>CLEAR GRAPH DEFAULT</code></li>
<li><code>CLEAR GRAPH <em>uri</em></code></li>
<li><code>DELETE DATA { ... }</code></li>
<li><code>DELETE DATA { GRAPH <em>uri</em> { ... } } INSERT DATA { GRAPH <em>uri</em> { ... } }</code></li>
<li><code>DELETE WHERE { ... }</code></li>
<li><code>DELETE WHERE { GRAPH <em>uri</em> { ... } }</code></li>
<li><code>DELETE { ... } WHERE { ... }</code></li>
<li><code>DROP GRAPH <em>uri</em></code></li>
<li><code>DROP SILENT GRAPH <em>uri</em></code></li>
<li><code>INSERT DATA { ... }</code></li>
<li><code>INSERT { GRAPH <em>uri</em> { ... } } WHERE { ... }</code></li>
<li><code>LOAD <em>uri</em> INTO DEFAULT</code></li>
<li><code>LOAD <em>uri</em> INTO <em>uri</em></code></li>
<li><code>LOAD <em>uri</em></code></li>
<li><code>WITH <em>uri</em> DELETE { ... } INSERT { ... } USING NAMED <em>uri</em> WHERE { ... }</code></li>
<p>Not all cases may be covered
yet since the grammar is hard to implement and may be ambiguous.
<h3>LAQRS syntax support</h3>
<p>Start giving deprecated messages for LAQRS <code>SELECT ... AS
varname</code> (bare variable name) instead of the draft SPARQL 1.1
Query <code>SELECT ... AS ?varname</code> with $ or ? symbol.
<h3>Query engine changes</h3>
<p>Make query result limit and offset work when no <code>ORDER
BY</code> is part of the query (yes - this is a well-defined count of
under-defined actual results) with the original query engine.
Related to
<a href="">Issue#0000352</a>.
<p>Add datatype support for <code>xsd:date</code> for value
normalization and comparisons.
<p>Handle when results are sorted before used to build triples via
<code>CONSTRUCT</code>, which has no practical use since triples are
not ordered and is less efficient since you have to read all the
results into memory. Anyway, it works now.
<h3>Query results formatter class changes</h3>
<p>Added an HTML Table results format (name 'table') by Nicholas J Humfrey
using patch from
<a href="">Issue#0000360</a>.
<p>A NULL base_uri is valid in
<h3>World class changes</h3>
<p>Moved generate blank node ID functionality to
world class, deprecating the query class methods.
<code>rasqal_world_set_generate_bnodeid_handler()</code> with new
handler typedef <code>rasqal_generate_bnodeid_handler2</code>.
<h3>Other changes</h3>
<p>Made all rasqal destructors simply return when given a
<code>NULL</code> object pointer. They mostly did this already.
<p>Updated <code></code> based on fedora spec (not tested)
<p>Replace <code>strncpy()</code> with <code>memcpy()</code> since
the the <code>strncpy()</code> zero-checking and zero-filling
semantics are never needed.
<p>Minimum raptor version is now 1.4.19 so that the
<code>raptor_world</code> typedef is always available.
<h2 id="rel0_9_19"><a name="rel0_9_19">Rasqal 0.9.19 Changes</a></h2>
<p>The only change to this release is to fix the pkg-config
<code>rasqal.pc</code> file to to restore the dependency on raptor
which was accidently deleted. Lesson learnt: do not commit code
after midnight local time.
<h2 id="rel0_9_18"><a name="rel0_9_18">Rasqal 0.9.18 Changes</a></h2>
<p>The main changes in this release are:</p>
<li>Add initial draft parsing and API (NOT execution) support for
<a href="">SPARQL 1.1 Update W3C Working Draft of 2010-01-26</a>.</li>
<li>Add public APIs (row, results, result formatter, variables table) so that query results can be built, read and written without a query.</li>
<li>Add API resilience checks for invalid NULL pointer arguments.</li>
<p>Fixed Issues:</p>
<li><a href="">0000320</a>: Add a void* user_data field to rasqal_variable</li>
<li><a href="">0000323</a>: Official MIME Type for JSON isn't text/json</li>
<li><a href="">0000343</a>: Mime type for 'table' results format is text/plan</li>
<li><a href="">0000345</a>: MIME Type and URI for TSV and CSV</li>
<li><a href="">0000347</a>: rasqal linking fix</li>
<h3>Query API Changes</h3>
<p>A user data <code>void* user_data</code> field was added to the
<code>rasqal_variable</code> structure to allow application code to
store additional information.</p>
<p>Added a new <code>rasqal_query_verb</code> enum value for SPARQL
1.1 (draft) Update: <code>RASQAL_QUERY_VERB_UPDATE</code> which
indicates that a sequence of update operations are available in the
query structure, rather than a query (SELECT, ASK, DESCRIBE).
<p>Added a <code>rasqal_update_operation</code> class for holding
an updates that adds and/or removes triples from a graph (with
possible conditional where) or does a graph administration
operation on a graph.
<p>Added an <code>rasqal_update_type</code> enum for the types of
graph update - clear, drop, delete, insert and, load.
<p>Added <code>rasqal_update_type_label()</code> to get a label for
a rasqal-update_type.
const char* rasqal_update_type_label(rasqal_update_type type);
<p>Added an <code>rasqal_update_flags</code> enum for capturing
update operations flags such as SPARQL 1.1 Update <code>SILENT</code>
for silent graph administration operations and <code>DATA</code> for
bulk insert/delete data, rather than graph pattern templates with
<p>Added <code>rasqal_query_get_update_operations_sequence()</code>
to get the sequence of updates from a query. Added
<code>rasqal_query_get_update_operation()</code> get an individual
update operation from a query via an index.</p>
raptor_sequence* rasqal_query_get_update_operations_sequence(rasqal_query* query);
rasqal_update_operation* rasqal_query_get_update_operation(rasqal_query* query,
int idx);
<h3>Query Results Class Changes</h3>
<p><code>rasqal_new_query_results()</code> added to public API to
construct a standalone query result set without being the result of a
query execution. (The destructor is already present). Added method
<code>rasqal_query_results_add_row()</code> to add a row to a query
result set.
rasqal_query_results* rasqal_new_query_results(rasqal_world* world,
rasqal_query* query, rasqal_query_results_type type,
rasqal_variables_table* vars_table);
int rasqal_query_results_add_row(rasqal_query_results* query_results,
rasqal_row* row);
<p><code>rasqal_query_results_type</code> enum added to public API
for use with <code>rasqal_new_query_results()</code>.
<h3>Query Results Formatter Class Changes</h3>
<p>Registered URIs for the CSV and TSV query result formats and fixed
the mime types for those as well as the JSON format as reported in issues
<a href="">Issue #0000345</a>
<a href="">Issue #0000323</a>.
<p>Added <code>rasqal_new_query_results_formatter2()</code> with
format name, mime type and URI args deprecating
<code>rasqal_new_query_results_formatter()</code> and
rasqal_query_results_formatter* rasqal_new_query_results_formatter2(rasqal_world* world,
const char *name, const char *mime_type, raptor_uri* format_uri);
<p>Added <code>rasqal_query_results_write2()</code> and
<code>rasqal_query_results_read2()</code> with both name and
mime_type args deprecating <code>rasqal_query_results_write()</code>
and <code>rasqal_query_results_read()</code> respectively.
int rasqal_query_results_write2(raptor_iostream *iostr,
rasqal_query_results *results, const char* name, const char* mime_type,
raptor_uri *format_uri, raptor_uri *base_uri);
int rasqal_query_results_read2(raptor_iostream *iostr,
rasqal_query_results *results, const char* name, const char* mime_type,
raptor_uri *format_uri, raptor_uri *base_uri);
<h3>Query Result Row Class</h3>
<p>Export the query result row class to the public API to allow
creating standalone query results set without a query.
<p>Added <code>rasqal_new_row_for_size()</code>,
<code>rasqal_free_row()</code> to construct and destruct a row and
<code>rasqal_row_set_value_at()</code> to set row literal values.
rasqal_row* rasqal_new_row_for_size(rasqal_world* world, int size);
void rasqal_free_row(rasqal_row* row);
int rasqal_row_set_value_at(rasqal_row* row, int offset,
rasqal_literal* value);
<h3>Variables Table Class</h3>
<p>Added variables table class <code>rasqal_variables_table</code> to
the public API to allow use in creating a standalone query results.
<p>Added <code>rasqal_new_variables_table()</code> and
<code>rasqal_free_variables_table()</code> to construct and destroy a
variables table. Added method
<code>rasqal_variables_table_add()</code> to add a variable to the
variables table.
rasqal_variables_table* rasqal_new_variables_table(rasqal_world* world);
void rasqal_free_variables_table(rasqal_variables_table* vt);
rasqal_variable* rasqal_variables_table_add(rasqal_variables_table* vt,
rasqal_variable_type type, const unsigned char *name,
rasqal_literal *value);
<h3>SPARQL Changes</h3>
<p>Added syntax-only and API support (<strong>no execution</strong>)
for the
<a href="">SPARQL 1.1 Update W3C Working Draft of 2010-01-26</a>
syntax. These are only available when using the 'laqrs' query
language name, until SPARQL 1.1 is stable.</p>
<p>Added new lexer support for keywords: WITH, CLEAR, CREATE, SILENT,
<p>Added <code>CLEAR</code> and <code>CLEAR GRAPH uri</code></p>
<p>Added <code>DROP GRAPH uri</code></p>
<p>Added <code>INSERT DATA { triples }</code></p>
<p>Added <code>DELETE templates</code> to delete multiple subgraphs.</p>
<p>Added <code>DELETE DATA { triples }</code></p>
<p>Added <code>LOAD uri</code> and <code>LOAD uri INTO graph-uri</code></p>
<p>Added <code>WITH uri DELETE { ... } INSERT { ... } WHERE ...</code>
update form since other combinations are ambiguous.
<p><strong>NOTE:</strong> The older LAQRS experimental INSERT and
DELETE formats are supported but deprecated.</p>
<h3>Query Engine changes</h3>
<p>Nobody reported it, but decimal division was totally broken. Fixed
it to do division and not add!
<h3>Other Changes</h3>
<p>Multiple code style updates and code file reorganizing.
<p>Link <code>roqet</code> directly with <code>-lraptor</code> to get
raptor symbols used linked directly, to enable alternate library
linking approaches to work. Based on the request in
<a href="">Fixes Issue#0000347</a>
<a href="">Fedora bug 564885</a>.
<p>Added checks for the public API methods to ensure NULL pointers
are not accepted or used.
<p>Added example code for constructing a query result set without a query
<p>Updated <code>configure</code> and the build system to use silent
rules for the maintainer (by default), or when
<code>--enable-silent-rules</code> is passed to
<code>configure</code>. This feature requires building with automake
1.11 which requires autoconf 2.62 or newer when building from GIT.
<p><code></code> script was updated to enforce the
autotools versions above.</p>
<p>The rasqal.pc file now uses the Requires.private field for raptor;
it should only be in the link line with<br />
<code>pkg-config --static ...</code> is used.
<p>Enforce that only raptor versions &lt;1.9.0 are supported. No
Raptor2 or Raptor2 alpha support yet.
<h2 id="rel0_9_17"><a name="rel0_9_17">Rasqal 0.9.17 Changes</a></h2>
<p>This means: functions and structs were removed, modified and added.</p>
<p>Consequently the shared library major soname version has changed from 1 to 2.</p>
<p>The main change in this release is to add a
<a href="#query-engine-0917">new query engine</a>
and to enable it as the default query engine. It supports more
of the SPARQL query algebra such as groups and optionals. There
were many other changes and fixes.
<p>Fixed Issues: (most of them in query engine 2)</p>
<li><a href="">Issue#0000077</a>: OPTIONAL messes up query results </li>
<li><a href="">Issue#0000128</a>: GROUP graph pattern support in the query engine</li>
<li><a href="">Issue#0000168</a>: Wrong processing of the function "bound" with "OPTIONAL"</li>
<li><a href="">Issue#0000258</a>: Using FILTER with OPTIONAL in SPARQL queries</li>
<li><a href="">Issue#0000261</a>: Some SPARQL queries with multiple OPTIONAL patterns fail to return results</li>
<li><a href="">Issue#0000271</a>: rasqal library does not compile cleanly when using g++ compiler</li>
<li><a href="">Issue#0000279</a>: JSON query binding serializer is returning illegal JSON - extra double quotes before "ordered" and "distinct"</li>
<li><a href="">Issue#0000305</a>: bound gives incoherent results</li>
<h3>Rasqal world API changes</h3>
<p>Added methods for setting of an already-opened raptor library to pass
into rasqal, rather than it creating one itself.
<code>rasqal_world_open()</code> can then be called to do the actual
int rasqal_world_open(rasqal_world* world);
void rasqal_world_set_raptor(rasqal_world* world,
raptor_world* raptor_world_ptr);
raptor_world *rasqal_world_get_raptor(rasqal_world* world);
<p>Exported new C defines for the library versions:
<code>RASQAL_VERSION</code> in 6-digit integer MMNNRR format (Major, miNor, Release),
<code>RASQAL_VERSION_STRING</code> in string "MM.NN.RR" format,
<code>RASQAL_VERSION_MAJOR</code> for integer major version number,
<code>RASQAL_VERSION_MINOR</code> for integer minor version number and
<code>RASQAL_VERSION_RELEASE</code> for integer release number.
<code>rasqal_features_enumerate()</code> gains an
initial rasqal_world argument to become a method of the world class:
int rasqal_features_enumerate(rasqal_world* world,
const rasqal_feature feature, const char **name,
raptor_uri **uri, const char **label);
<code>rasqal_feature_from_uri()</code> gains an initial
rasqal_world argument to become a method of the world class:
rasqal_feature rasqal_feature_from_uri(rasqal_world* world,
raptor_uri *uri);
<h3>Data Graph API changes</h3>
<p>API CHANGE: The <code>rasqal_data_graph</code> structure gains a
new world reference pointer field.
<code>rasqal_new_data_graph()</code> gains an initial
rasqal_world argument:
rasqal_data_graph* rasqal_new_data_graph(rasqal_world* world,
raptor_uri* uri, raptor_uri* name_uri, int flags);
<h3>Expression API changes</h3>
<code>rasqal_op</code> enumeration gains values for LAQRS
(possible SPARQL 1.1) expression operators:
<code>RASQAL_EXPR_MIN</code> and
It also gains <code>RASQAL_EXPR_COALESCE</code> for LAQRS experimental
coalesce expression <code>COALESCE(<em>expression list</em>)</code>
The <code>rasqal_expression</code> structure gains a new world reference
pointer field.
All <code>rasqal_expression</code> constructors gain an
initial rasqal_world argument:
rasqal_expression* rasqal_new_0op_expression(rasqal_world* world,
rasqal_op op);
rasqal_expression* rasqal_new_1op_expression(rasqal_world* world,
rasqal_op op, rasqal_expression* arg);
rasqal_expression* rasqal_new_2op_expression(rasqal_world* world,
rasqal_op op, rasqal_expression* arg1, rasqal_expression* arg2);
rasqal_expression* rasqal_new_3op_expression(rasqal_world* world,
rasqal_op op, rasqal_expression* arg1, rasqal_expression* arg2,
rasqal_expression* arg3);
rasqal_expression* rasqal_new_string_op_expression(rasqal_world* world,
rasqal_op op, rasqal_expression* arg1, rasqal_literal* literal);
rasqal_expression* rasqal_new_literal_expression(rasqal_world* world,
rasqal_literal* literal);
rasqal_expression* rasqal_new_function_expression(rasqal_world* world,
raptor_uri* name, raptor_sequence* args);
rasqal_expression* rasqal_new_cast_expression(rasqal_world* world,
raptor_uri* name, rasqal_expression *value);
<code>rasqal_expression_evaluate()</code> gains an initial
rasqal_world argument:
rasqal_literal* rasqal_expression_evaluate2(rasqal_world *world,
raptor_locator *locator, rasqal_expression* e, int flags);
<p>Added <code>rasqal_graph_pattern_get_origin()</code>
to get the graph from a GRAPH graph pattern:
rasqal_literal* rasqal_graph_pattern_get_origin(rasqal_graph_pattern* gp);
<p>Added <code>rasqal_graph_pattern_set_filter_expression()</code>
and <code>rasqal_graph_pattern_get_filter_expression()</code>
methods to set/get an expression for a filter graph pattern:</p>
int rasqal_graph_pattern_set_filter_expression(rasqal_graph_pattern* gp,
rasqal_expression* expr);
rasqal_graph_pattern_get_filter_expression(rasqal_graph_pattern* gp);
<h3>Graph Pattern API changes</h3>
<p><code>rasqal_graph_pattern_operator</code> enumeration gains
<code>RASQAL_GRAPH_PATTERN_OPERATOR_FILTER</code> for a filter graph pattern
and <code>RASQAL_GRAPH_PATTERN_OPERATOR_LET</code> for LAQRS experimental
assignment 'graph pattern'.
Removed functions
<code>rasqal_graph_pattern_get_constraint_sequence()</code> and
These are replaced by filter graph pattern with expression - functions
<code>rasqal_graph_pattern_set_filter_expression</code> and
<h3>LAQRS Changes</h3>
<p>LAQRS is now available in the configuration and does not need to
be explicitly selected with <code>configure</code>.</p>
<p>Add <code>SUM()</code>, <code>AVG()</code>, <code>MIN()</code> and
<code>MAX()</code> aggregate expressions to LAQRS. Supported in
syntax only, not in any of the query engines.
<p>Add <code>LET ?var := expression</code> experimental syntax.
Query engine 2 can execute this.</p>
<p>Add <code>COALESCE(<em>expression list</em>)</code> experimental
expression to return the first defined expression value in the
list. Query engines 1 and 2 can execute this.</p>
<h3>Literal API changes</h3>
Reordered <code>rasqal_literal_type</code> enumeration
to match numeric type promotion order: float is now between integer and double.
Also added
<code>RASQAL_LITERAL_XSD_STRING</code> for xsd:string typed literals and
<code>RASQAL_LITERAL_UDT</code> for unknown data typed literals.
Both were separated out of <code>RASQAL_LITERAL_STRING</code> which
is now for RDF plain literals and plain/typed turned into RDF terms only
<p>Added <code>rasqal_literal_get_rdf_term_type()</code> method to return
the RDF term type of a literal as a <code>rasqal_literal_type</code>
- uri, blank node, literal or cannot be represented (e.g. qname or
internal literal types).
rasqal_literal_type rasqal_literal_get_rdf_term_type(rasqal_literal* l);
<p>Added <code>rasqal_literal_same_term()</code> method to perform
SPARQL sameTerm() comparison.
int rasqal_literal_same_term(rasqal_literal* l1, rasqal_literal* l2);
<p>Added <code>rasqal_literal_is_rdf_literal()</code> method
to check if a literal is an RDF literal (not qname or other internal
int rasqal_literal_is_rdf_literal(rasqal_literal* l);
<h3>Prefix API changes</h3>
The <code>rasqal_prefix</code> structure gain a new world reference
pointer field.
<code>rasqal_new_prefix()</code> gains an initial rasqal_world argument:
rasqal_prefix* rasqal_new_prefix(rasqal_world* world,
const unsigned char* prefix, raptor_uri* uri);
<h3>Query API changes</h3>
<p>Added <code>rasqal_query_dataset_contains_named_graph()</code>
method to check if a named graph is in a dataset:</p>
int rasqal_query_dataset_contains_named_graph(rasqal_query* query,
raptor_uri *graph_uri);
<h3>Query Formatter Changes</h3>
<p>SPARQL <code>DESCRIBE</code> no longer writes commas between terms.
<h3>Query Results API changes</h3>
<p>Added <code>rasqal_query_results_get_query()</code> method to get
the associated query:</p>
rasqal_query_results_get_query(rasqal_query_results* query_results);
<p>Added <code>rasqal_graph_pattern_variable_bound_in()</code> method
to check if a graph pattern in a query defines a variable</p>
int rasqal_graph_pattern_variable_bound_in(rasqal_graph_pattern *gp,
rasqal_variable *v);
<h3>Query Results Formatter Changes</h3>
<p>SPARQL/JSON: Do not emit double " for distinct/ordered flags.
Fixes <a href="">Issue #0000279</a>
<p>Added comma-separated values (CSV), tab-separated values (TSV) and
text table output formats with names <code>csv</code>,
<code>tsv</code> and <code>table</code>.
<h3>RDQL Changes</h3>
<p>Some updates to handle refactored query list of constraint
expressions switching to a filter graph pattern. RDQL only
has 0 or 1 such expressions in a single query.
<h3>SPARQL Changes</h3>
<p>Ensure <em>GroupOrUnionGraphPattern</em> rule constructs the
sequence of graph patterns in document order.
<p><em>OptionalGraphPattern</em> rule is now a list of 1 group graph
<p>Fix support for <code>&lt;&gt;</code> URI literal.
<p>Support <code>\b</code>, <code>\f</code>, <code>\'</code> and
<code>\"</code> escapes in all types of quoted literals.
<p>Fixed optional <code>WHERE</code> in parser to match SPARQL
grammar - optional for <code>DESCRIBE</code>, but required for
<code>SELECT</code>, <code>CONSTRUCT</code> and <code>ASK</code>
<h3>Triples Source API changes</h3>
The <code>rasqal_triples_source</code> and
<code>rasqal_triples_source_factory</code> structures
gain API version fields that must be set to a known API version.
The <code>rasqal_set_triples_source_factory()</code> function for
registering a triples source factory now take a function with an int
error return code, and it returns an int now:</p>
int rasqal_set_triples_source_factory(rasqal_world* world,
rasqal_triples_source_factory_register_fn register_fn,
void* user_data);
<h3>Variable API changes</h3>
The <code>rasqal_variable</code> structure gains a variables table
<h3>Other API changes</h3>
<p><code>rasqal_triple_parts</code> adds value
<code>RASQAL_TRIPLE_NONE</code> for no parts.
<p><code>rasqal_compare_flags</code> enumeration gains
<code>RASQAL_COMPARE_URI</code> - now also provides RDQL string to
bool comparison.
<code>rasqal_new_xsd_decimal()</code> gains an initial rasqal_world argument:
rasqal_xsd_decimal* rasqal_new_xsd_decimal(rasqal_world* world);
<p>Removed <code>rasqal_triple_flags</code> enumeration with unused
values: <code>RASQAL_TRIPLE_FLAGS_EXACT</code>,
<h3>Configure and Build Changes</h3>
<p>configure now prefers <code>pkg-config raptor</code> to
<code>raptor-config</code> but will accept both for now.
<code>pkg-config</code> will not allow compiling against raptor in
source tree in future.
<p>Added <code>--with-query-engine-version</code> to configure
to allow selecting default query engine version - values 1 or 2.
This is allowed for people to switch to old engine if necessary
for some existing query that the new engine cannot handle. This
option will be removed at some point.
<a href="">SHAVE support</a>
(<code>git clone git://</code> )
to <em>"make autotools output sane"</em> which amounts to much less
verbose messages when compiling. It is now enabled for the
<p><code>rasqal-config(1)</code> is now a wrapper around
<code>pkg-config rasqal</code>. Consequently <code>--prefix=DIR</code>
and <code>--libtool-libs</code> are ignored.
<h3 id="query-engine-0917"><a name="query-engine-0917">Query Engine Changes</a></h3>
<p>An entirely new query execution engine was written. The existing
query execution engine was refactored out of a mess of
<code>rasqal_query</code> and <code>rasqal_query_results</code> code
and data. It is the default query engine as of Rasqal 0.9.17</p>
<p>The query engine to use can be selected at configure time wiht
<code>--with-query-engine-version</code> to allow switching to old
engine if necessary for some existing query that the new engine
cannot handle. This option will be removed at some point.
<p>The interface between the query API and the query engine is now
via the <code>rasqal_rowsource</code> abstraction - an evaluation of
a query returns a rowsource that generates the result rows of
variable bindings.
<p>Rewrote <code>query_results</code> class to be a pure wrapper
around the rowsource and variables table, handling such things like
generating triples (CONSTRUCT) from rows, creating a boolean result
(ASK) by counting at least 1 result rows and generating syntax
results using a query results formatter.</p>
<p>Added a new <code>rasqal_query_execution_factory</code>
abstraction to provide the interface that the query execution engines
implement to return a rowsource to get the results.</p>
<p>Both query engines can potentially be selected at
runtime from the query API but <strong>ONLY</strong> when rasqal is
built for development (<code>configure --enable-maintainer-mode</code>).
<li>If the envariable <code>RASQAL_DEBUG_ENGINE</code>
is set with value 1 or 2, the query execution engine is chosen.
<li>The <code>roqet(1)</code> utility gains a <code>-g</code> /
<code>--engine</code> argument.
<p><strong>Query engine 1 (existing)</strong>:<br />
Existing lazy evaluated engine that is hard
to refactor. Internally, implemented by functions named
Execution factory instance <code>rasqal_query_engine_1</code>
<p><strong>Query engine 2 (new)</strong>:<br />
Based on transforming a tree of SPARQL algebra nodes constructed from
the query, into a tree of rowsource-generating expressions that when
evaluated at the top, returns the result rows. Each algebra node
type and each rowsource type has it's own set of module unit tests
Execution factory instance <code>rasqal_query_engine_algebra</code>
<p>Removed query engine core legacy support for <code>CONSTRUCT *</code> -
never in the SPARQL 1.0 language.
<p>Pulled out row sorting code from query engine 1 into a
rasqal_engine_sort module so it can be used by all query engines.
<p>Implemented rowsource abstraction <code>rasqal_rowsource</code> for
the following types of rowsources:</p>
<li><em>empty rowsource</em>: always returns no rows</li>
<li><em>filter rowsource</em>: filter an inner rowsource with an expression - used for SPARQL <code>FILTER</code></li>
<li><em>graph rowsource</em>: apply a graph variable to an inner rowsource - used for SPARQL <code>GRAPH</code> matching</li>
<li><em>join rowsource</em>: join two inner rowsources on common variables and an expression. Two types of join supported: left outer join used for SPARQL <code>OPTIONAL</code> and natural join for groups of graph patterns.</li>
<li><em>project rowsource</em>: pick [project] certain variables from an inner rowsource</li>
<li><em>query engine execution rowsource</em>: rows generated by a query execution engine</li>
<li><em>row sequence rowsource</em>: built from a sequence of rows</li>
<li><em>SPARQL xml rowsource</em>: make rows from SPARQL Results XML syntax</li>
<li><em>triples rowsource</em>: create a rowsource by binding variables to an RDF graph sort rowsource: sorts the inner rowsource by an order expression - used for SPARQL <code>ORDERBY</code></li>
<li><em>union rowsource</em>: union/concatenation of two inner rowsources - used for SPARQL <code>UNION</code></li>
<p>Renamed row abstraction from <code>rasqal_query_result_row</code>
to <code>rasqal_row</code> since it is independent of query results
and shorter.
<p>Use new <code>rasqal_engine_error</code> enumeration for query
engine/internal errors - OK, FAILED or FINISHED rather than altering
<code>rasqal_query_results</code> object fields directly.
<p>Documented query execution engine internals as autodocs.
<p>Added a query algebra abstraction <code>rasqal_algebra</code> with
node type <code>rasqal_algebra_node_operator</code> based on SPARQL
are not needed by the query execution engines since they are handled
by the high level query API - such as SLICE (limit and offset) and
TOLIST (turning results into user data)
<p>Added a variables table abstraction <code>rasqal_variables_table</code>
pulled out of the internal query results and query structures which now
point to it. Constructor <code>rasqal_new_variables_table()</code>,
destructor <code>rasqal_free_variables_table()</code>
and methods <code>rasqal_variables_table_add()</code>,
<code>rasqal_variables_table_get_named_variables_sequence()</code> and
<p>Allow queries with no graph pattern to be accepted such as SPARQL
<code>DESCRIBE <em>uri</em></code> (which the query engine does not
execute at present but now is at least parsed).
<p>Do not warn about unbound variables for variables bound in GRAPH and
SELECT expressions.
<p>Renamed query language-specific factory class for creating query
structure from SPARQL and RDQL syntaxes from <code>struct
rasqal_query_engine_factory</code> to
<code>rasqal_query_language_factory</code> since it is about the
language, not the engine.
<p>Query engine known problems:</p>
<li>Variable binding/use scope is not calculated correctly.</li>
<li>Consequently no queries with <code>UNION</code> work correctly.</li>
<li>Also consequently, some <code>OPTIONAL</code> queries execute and return results when they shouldn't due to scoping of variable rules especially in nested optionals.</li>
<li><code>DISTINCT</code> uses RDF literal equality not RDF sameTerm equality and thus returns results not to spec.</li>
<li><code>xsd:date</code> comparison is not date-aware, it uses a simple string equality</li>
<li><code>REDUCED</code> is not implemented.</li>
<p>Summary of the approved
<a href="">DAWG SPARQL 1.0 tests</a>
as of Rasqal SVN r15841</p>
Fail: 22 (4.99 %)
algebra 4
dataset 3
distinct 4
graph 2
open-world 3
optional 4
reduced 2
Pass: 419 (95.01 %)
<p>The above results in EARL:
<a href="">RDF/XML</a>
<a href="">Turtle</a>
<h3>Internal Changes</h3>
<p>Added sparql algebra tests based on the examples in the SPARQL 1.0 Query Language Specification section
<a href="">12.2.1 Converting Graph Patterns</a>
Optionally support the experimental raptor V2 API.
<p>Lots of resiliency fixes in the case of out of memory - Lauri Aalto.
<p>Adjusted internal test suite to use a perl <code>improve</code>
script that generates and uses an RDF-based manifest. The test
running is now much more consise when successful.
<p>Switch to final DAWG approved testsuite files from
<a href=""></a>
at CVS Revision 1.6 1008
<h2 id="rel0_9_16"><a name="rel0_9_16">Rasqal 0.9.16 Changes</a></h2>
<p>This means: functions were removed, modified and added.</p>
<p>Consequently the shared library major soname version has changed from 0 to 1.</p>
<p>The header files moved to be installed in
<em>PREFIX</em>/include/rasqal such as
<code>/usr/include/rasqal</code> for usual installs.</p>
<p><strong>NOTE:</strong> In the next release of rasqal, the
<code>rasqal-config</code> utility that provides the compile and link
args will be deprecated, generate a warning when run and will turn into a
wrapper for <code>pkg-config rasqal ...</code>
It will be removed in a future release.</p>
<h3>Major Changes (break ABI and API)</h3>
<p>Removed <code>rasqal_init()</code> and <code>rasqal_finish()</code>
<p>Added a new <code>rasqal_world</code> object to manage
library allocations and classes with new library
constructor/initializing function
<code>rasqal_world *rasqal_new_world(void)</code>
and destructor/cleanup function:
<code>void rasqal_free_world(rasqal_world*)</code>
<p>The following functions now take a <code>librdf_world*
world</code> argument as the first argument:
<code>rasqal_query_results_formats_check ()</code>,
<p>Removed deprecated
<code>rasqal_expression_foreach()</code> functions,
<code>RASQAL_LITERAL_FLOATING</code> macro and
<code>rasqal_expression_foreach_fn</code> typedef.
Modified <code>rasqal_triples_match</code> struct to add a
rasqal_world* world field.
<p>There is no more static data such as error pointers, arrays of
query languages, URI objects; it is all attached to the rasqal_world
<h3>Misc changes</h3>
<p>Fixed memory leaks in lang() expression evaluation. (Lauri Aalto)</p>
<p>Made several low-memory resiliance fixes in query construction and
execution. (Lauri Aalto)</p>
<p>Library requires raptor 1.4.17 or newer to get the newly public
raptor SAX2 API for reading SPARQL XML Results format.</p>
<p>Updated mpfr configure check to look for modern functions rather
than functions that are also in the older gmp-mpfr library too.
<p>Only the first error is reported for syntax errors in lex/parse
of SPARQL and RDQL since the lack of error recovery means that the
consequent messages are of little use.</p>
<p>Fatal errors in SPARQL and RDQL lexer/parser no longer does an
abort, but exits via setjmp/longjmp.</p>
<h3>Query Engine Changes</h3>
<p>Added internal rowsource class to get rows from an execution
engine or a syntax (query result formatter).</p>
<h3>Graph Pattern Class Changes</h3>
<p>Modified <code>rasqal_graph_pattern_add_sub_graph_pattern()</code> to
have an int return value for catching allocation failures.
<h3>Query Class Changes</h3>
<p>Modified <code>rasqal_query_add_variable()</code> and
<code>rasqal_query_add_prefix()</code> to have int return values for
catching allocation failures.
<h3>Query Results Class Changes</h3>
<p>Updated the internals to allow construction of a query result
outside the query engine, such as from a syntax.
<p>Added <code>rasqal_query_results_read()</code> to read a query
results from an iostream in some format.
<p>Modified <code>rasqal_query_results_formats_enumerate()</code> to add
a flags argument with
choose formats for read or write enumeration.</p>
<p>Removed function
<code>rasqal_query_results_formats_enumerate_full</code> now handled
by <code>rasqal_query_results_formats_enumerate()</code>.</p>
<p>Added <code>rasqal_query_results_formatter_read()</code> to read
query results from a syntax via an iostream.</p>
<h3>Variable Class Changes</h3>
<p>Added <code>rasqal_new_variable_from_variable()</code> copy
<h2 id="rel0_9_15"><a name="rel0_9_15">Rasqal 0.9.15 Changes</a></h2>
<h3>General Changes</h3>
<p>Many updates for better SPARQL support. Rasqal 0.9.15 passes over
92% of the DAWG SPARQL Test Suite as of 2007-11-13.</p>
<p>Rasqal still does not support either <code>UNION</code> or
<code>GROUP</code> and <code>OPTIONAL</code> remains buggy. There
remain a few other minor areas not yet completely supported such as
XSD <code>date</code> and XSD <code>dateTime</code> equality and
<p><b>WARNING: ABI AND API CHANGE in Rasqal 0.9.16. The next
release of Rasqal will be incompatible with this one.</b></p>
<p>It will have both ABI and API changes that will require source
<p>The shared library major soname will change from 0 to 1.</p>
<p>The header files will move to be installed in
<em>PREFIX</em>/include/rasqal such as
<code>/usr/include/rasqal</code> for usual installs.</p>
<p>The full details of the API change have not been decided but the
driving change is that using the library will be done via a new
Rasqal world object,k will now be used to working like a Redland
<code>librdf_world</code>. All constructors will take this world
object as an argument and all static data will be indirected from the
object. Handlers such as the uri_handler/data and error handlers
will also move to be set/get via the world object.
<p>There are almost certainly other API changes and cleanups that
will be done, and some possibly some of the data structures may be
made internal.</p>
<p>Fixed issues:</p>
<li><a href="">Issue#0000190</a>: Memory leaks in rasqal_literal.c</li>
<li><a href="">Issue#0000191</a>: RAPTOR_API in rasqal.h</li>
<li><a href="">Issue#0000193</a>: SPARQL "ASK" always returns true</li>
<li><a href="">Issue#0000196</a>: Memory leak with RASQAL_REGEX_PCRE</li>
<li><a href="">Issue#0000197</a>: Problem with float comparison in rasqal</li>
<li><a href="">Issue#0000198</a>: rasqal_redland.c compilation errors</li>
<li><a href="">Issue#0000199</a>: SPARQL effective boolean value: empty string literal not false</li>
<li><a href="">Issue#0000200</a>: SPARQL filter scope</li>
<li><a href="">Issue#0000201</a>: SPARQL langMatches patch</li>
<li><a href="">Issue#0000203</a>: API declarations for Symbian portability</li>
<li><a href="">Issue#0000204</a>: SPARQL WHERE is optional</li>
<li><a href="">Issue#0000219</a>: SPARQL BASE makes rasqal query->locator.uri a dangling pointer</li>
<li><a href="">Issue#0000220</a>: Query offset off by one</li>
<li><a href="">Issue#0000221</a>: rasqal_literal_as_integer() with RASQAL_LITERAL_INTEGER literals</li>
<li><a href="">Issue#0000225</a>: SPARQL parser leaks memory on syntax error</li>
<li><a href="">Issue#0000234</a>: $dir quoting</li>
<li><a href="">Issue#0000235</a>: $(EXEEXT) in tests</li>
<li><a href="">Issue#0000236</a>: EOL issues when building svn version on cygwin</li>
<h3>SPARQL Query Language Changes</h3>
<p>Many updates to support the SPARQL
<a href="">Candidate Recommendation</a> and
<a href="">Proposed Recommendation</a> versions of the language including:</p>
<li>Added <code>REDUCED</code> syntax support (no query engine support)</li>
<li>Added <code>SAMETERM()</code> support.</li>
<li>Allowing numbers at the start of local names.</li>
<li>Allowing <code>@</code><em>lang</em> and
<code>^^</code><em>datatype</em> after triple-quoted literals.</li>
<li>Make unary + and - work</li>
<li>Remove <code>CONSTRUCT *</code> that is no longer in the spec</li>
<li>Removed hexadecimal literals which were never in the spec</li>
<li>Made queries with the <code>ASK</code> verb work again.</li>
<li>Made <code>LANG()</code> and <code>DATATYPE()</code> work to
spec on typed literals.</li>
<li>Remove warning about optional SPARQL <code>WHERE</code>
although it is still a dumb idea to have useless keywords.</li>
<h3>Query Engine Changes</h3>
<p>Many internal changes were made including refactoring the engine
core and adding of additional internal documentation for the engine
<p>Substantial improvements were made to datatypes support:</p>
<li>SPARQL / XQuery / XPath numeric type promotion is now supported,
including derived types of <code>xsd:integer</code> etc.</li>
<li>Added XSD <code>xsd:decimal</code> implementation either using
GNU MP, MPFR, C99 <code>_Decimal</code> (but I have yet to find a
working implementation) or by default and inaccurately, C
<li>Added XSD <code>xsd:dateTime</code> initial support for validation.</li>
<li>Numeric operations such as +, -, *, / and ! as well as comparisons
are now done in the appropriate datatype (which may be a promotion).</li>
<p>Improved the way that literal equality and comparisons work
especially with respect to datatypes. Triple pattern matching
(equality) works with RDF terms. SPARQL <code>FILTER</code> literal
equality and comparisons follow SPARQL rules with possible numeric
type promotion, then using RDF Term if the types are different.
<code>ORDER</code> comparison or <code>DISTINCT</code> equality
checks use RDF Term. RDQL execution uses it's own existing "stringy"
<p>Set the query base URI.</p>
<p>Make queries that bind the origin (SPARQL <code>GRAPH</code>)
match correctly against the default graph.
<p>Memory reduction in stack usage when evaluation expressions
(such as SPARQL <code>FILTER</code>s).</p>
<h3>Public API changes</h3>
<p>Added <code>rasqal_home_url_string</code> static constant.</p>
<p>Added <code>rasqal_xsd_decimal</code> class and API calls
described below.</p>
<p>Added a <code>decimal</code> part to the rasqal_literal union
value for <code>RASQAL_LITERAL_DECIMAL</code> types.</p>
<p>Added a <code>parent_type</code> part to the rasqal_literal when
the type can be promoted.</p>
<p>Added <code>RASQAL_EXPR_SAMETERM</code> expression</p>
<p>Added <code>RASQAL_COMPARE_RDF</code> and
<code>RASQAL_COMPARE_URI</code> comparison types for RDF Term
comparison rules and allowing URI comparison (without
<code>STR()</code>) respectively.</p>
<p>Added <code>rasqal_new_typed_literal()</code> to make an RDF typed
literal from a type and string (no language).</p>
<p>Added <code>rasqal_new_float_literal()</code> for wrapping a C
<code>float</code> as XSD float.</p>
<p>Added new decimal literal constructor
rasqal_literal* rasqal_new_decimal_literal_from_decimal(const unsigned char *string, rasqal_ xsd_decimal* decimal)
<p>Added <code>rasqal_literal_datatype</code> method to get the datatype
URI of a literal.</p>
<p>Added <code>rasqal_literal_value</code> method to get the literal
value of a literal, looking up any variables to their value.
FIXME should this not involve query results?
<p>Added addition <code>rasqal_triple_parts</code> enums:
<code>RASQAL_TRIPLE_GRAPH</code> for just the named graph part
<code>RASQAL_TRIPLE_SPO</code> for subject, predicate and objects and
<code>RASQAL_TRIPLE_SPOG</code> for all parts including named graph.
<h3>Decimal Class</h3>
<p>A new <code>rasqal_xsd_decimal</code> class was added to handle
XSD decimals with accurate decimal arithmetic.</p>
rasqal_xsd_decimal* rasqal_new_xsd_decimal(void);
void rasqal_free_xsd_decimal(rasqal_xsd_decimal* dec);
double rasqal_xsd_decimal_get_double(rasqal_xsd_decimal* dec);
int rasqal_xsd_decimal_set_double(rasqal_xsd_decimal* dec, double d);
iint rasqal_xsd_decimal_set_string(rasqal_xsd_decimal* dec, const char* string);
int rasqal_xsd_decimal_set_long(rasqal_xsd_decimal* dec, long l);
int rasqal_xsd_decimal_print(rasqal_xsd_decimal* dec, FILE* stream);
char* rasqal_xsd_decimal_as_string(rasqal_xsd_decimal* dec);
char* rasqal_xsd_decimal_as_counted_string(rasqal_xsd_decimal* dec, size_t* len_p);
<p>Numeric methods (writing to the <code>result</code> argument):</p>
int rasqal_xsd_decimal_add(rasqal_xsd_decimal* result,
rasqal_xsd_decimal* a, rasqal_xsd_decimal* b);
int rasqal_xsd_decimal_subtract(rasqal_xsd_decimal* result,
rasqal_xsd_decimal* a, rasqal_xsd_decimal* b);
int rasqal_xsd_decimal_multiply(rasqal_xsd_decimal* result,
rasqal_xsd_decimal* a, rasqal_xsd_decimal* b);
int rasqal_xsd_decimal_divide(rasqal_xsd_decimal* result,
rasqal_xsd_decimal* a, rasqal_xsd_decimal* b);
int rasqal_xsd_decimal_negate(rasqal_xsd_decimal* result,
rasqal_xsd_decimal* a);
<p>Comparison methods:</p>
int rasqal_xsd_decimal_compare(rasqal_xsd_decimal* a, rasqal_xsd_decimal* b);
int rasqal_xsd_decimal_equals(rasqal_xsd_decimal* a, rasqal_xsd_decimal* b);
int rasqal_xsd_decimal_is_zero(rasqal_xsd_decimal* d);
<h3>Query Results Formatter Class Changes</h3>
<p>Updated to the 4th version of the SPARQL XML Results format by
removing the <code>ordered</code> and <code>distinct</code>
attributes. Removed support for all the earlier versions 1 to 3.</p>
<h3><code>roqet</code> Utility Changes</h3>
<p>Added <code>-D</code> / <code>--data</code> options for specifying
data URis for the default graph and <code>-G</code> /
<code>--named</code> for URIs of named graphs (the existing
<code>-s</code> is a also a synonym for the latter).
<h3>Other Changes</h3>
<p>Many internal fixes and cleanups after failures so that memory is
not lost and/or rasqal does not crash. These many changes were
primarily made by Lauri Aalto.</p>
<p>Several portability fixes for helping with low-memory, embedded
systems and using a compiler that is not gcc.
<p>The SPARQL test runner <code>check-sparql</code> was improved to
read the SPARQL XML Results format (but not via
<code>XML::Simple</code> because it is insanely complex and
counterintuitive), handle DAWG test manifests and generate EARL
reports. It also has new help and usage messages.
<h2 id="rel0_9_14"><a name="rel0_9_14">Rasqal 0.9.14 Changes</a></h2>
<h3>General Changes</h3>
<p>Added syntax and API support (but no query engine support)
for <b>experimental</b> extensions to SPARQL called
<a href="">LAQRS</a>:
LAQRS Adds to Querying RDF in SPARQL.
<p>Updated the query results formatter to allow bette