librasqal(3)
librasqal(3) β the Rasqal RDF query library π
okay bestie, welcome to the Library Functions Manual page for librasqal, aka the Rasqal RDF query library. yes it's a C library, yes it's been here since forever, and yes it absolutely still slays. let's get into it π«Ά
β¨ NAME β¨
librasqal β the Rasqal RDF query library. that's the whole name section, short and iconic π
πΈ SYNOPSIS πΈ
#include <rasqal.h>
rasqal_world*world=rasqal_new_world();
rasqal_query_results *results;
raptor_uri *base_uri=raptor_new_uri("http://example.org/foo");
rasqal_query *rq=rasqal_new_query(world,"rdql",NULL);
const char *query_string="select * from <http://example.org/data.rdf>";
rasqal_query_prepare(rq,query_string,base_uri);
results=rasqal_query_execute(rq);
while(!rasqal_query_results_finished(results)) {
for(i=0;i<rasqal_query_results_get_bindings_count(results);i++) {
const char *name=rasqal_query_results_get_binding_name(results,i);
rasqal_literal *value=rasqal_query_results_get_binding_value(results,i);
/* ... */
}
rasqal_query_results_next(results);
}
rasqal_free_query_results(results);
rasqal_free_query(rq);
raptor_free_uri(base_uri);
rasqal_free_world(world);
cc prog.c -o prog `pkg-config rasqal --cflags` `pkg-config rasqal --libs`
and that's the whole little pipeline β make a world, make a query, prep it, run it, walk the results, free everything like the responsible main character you are π
π DESCRIPTION π
okay so here's the tea. the Rasqal library gives you a high-level interface to a whole bunch of stuff: RDF query parsing, query construction, query execution over an RDF graph, and query results manipulation and formatting. it's giving full-service. π
the library hands you APIs for each of the steps in that process, and it supports handling multiple query language syntaxes β so you're not locked into one vibe.
as of right now, Rasqal supports:
- most of the W3C SPARQL 1.0 Query language π
- some of the SPARQL 1.1 draft β¨
- and it fully supports RDQL β no cap, the whole thing π
and like, Rasqal is not out here doing URI stuff alone. it uses the libraptor(3) library for providing URI handling, WWW content retrieval and other support functions. raptor is the bestie that handles the logistics. π¦
π API REFERENCE π
want the full glow-up? go read the HTML API docs. they may be installed system wide at:
/usr/share/gtk-doc/html/rasqal/
or you can find them on the web at:
http://librdf.org/rasqal/docs/api/
π₯ API CHANGES π₯
check the Raptor API docs changes section at:
http://librdf.org/rasqal/docs/api/rasqal-changes.html
(it says "Raptor API docs changes section" fr fr, that's what the original says, don't come for me π)
π CONFORMING TO π
Rasqal conforms to these, and honestly? iconic lineup:
- SPARQL Query Language for RDF, Eric Prud'hommeaux and Andy Seaborne (eds), W3C Recommendation, 15 January 2008
http://www.w3.org/TR/2008/REC-rdf-sparql-query-20080115/ - SPARQL Query Results XML Format, Jeen Broekstra and Dave Beckett (eds), W3C Recommendation, 15 January 2008.
http://www.w3.org/TR/2008/REC-rdf-sparql-XMLres-20080115/ - RDQL - A Query Language for RDF, Andy Seaborne, W3C Member Submission 9 January 2004
http://www.w3.org/Submission/2004/SUBM-RDQL-20040109/
π¦ SEE ALSO π¦
roqet(1)libraptor(3)
π AUTHOR π
Dave Beckett β http://purl.org/net/dajobe/
lowkey if you're gonna go read the other pages, take snacks, they're worth it π
and that's the whole page, bestie β¨ this gem is from the Library Functions Manual, dated 2011-01-12 β genuinely vintage, genuinely still serving. go write some queries, you're gonna ate π ππ
π¦ where this page comes from
- alpine 3.24: rasqal-doc 0.9.33-r3 Β· LGPL-2.1-or-later
- centos-stream 9: rasqal-devel 0.9.33-18.el9 Β· LGPLv2+ or ASL 2.0
- centos-stream 9: rasqal-devel 0.9.33-18.el9 Β· LGPLv2+ or ASL 2.0
- debian bookworm: librasqal3-dev 0.9.33-2 Β· LGPL-2.1-or-later OR GPL-2.0-or-later OR Apache-2.0+
- debian trixie: librasqal3-dev 0.9.33-2.1+b2 Β· LGPL-2.1-or-later OR GPL-2.0-or-later OR Apache-2.0+
- fedora 43: rasqal-devel 0.9.33-31.fc43 Β· LGPL-2.1-or-later OR Apache-2.0
- fedora 43: rasqal-devel 0.9.33-31.fc43 Β· LGPL-2.1-or-later OR Apache-2.0
- fedora 44: rasqal-devel 0.9.33-32.fc44 Β· LGPL-2.1-or-later OR Apache-2.0
- fedora 44: rasqal-devel 0.9.33-32.fc44 Β· LGPL-2.1-or-later OR Apache-2.0
- nixos 26.05: rasqal 0.9.33
- nixpkgs unstable: rasqal 0.9.33
- opensuse-leap 16.0: librasqal-devel 0.9.33-bp160.1.9 Β· Apache-2.0+ OR GPL-2.0-or-later OR LGPL-2.1-or-later
- opensuse-leap 16.0: librasqal-devel 0.9.33-bp160.1.9 Β· Apache-2.0+ OR GPL-2.0-or-later OR LGPL-2.1-or-later
- opensuse-leap 16.0: librasqal-devel 0.9.33-bp160.1.9 Β· Apache-2.0+ OR GPL-2.0-or-later OR LGPL-2.1-or-later
- opensuse-leap 16.0: librasqal-devel 0.9.33-bp160.1.9 Β· Apache-2.0+ OR GPL-2.0-or-later OR LGPL-2.1-or-later
- ubuntu jammy: librasqal3-dev 0.9.33-0.2ubuntu1 Β· LGPL-2.1-or-later OR GPL-2.0-or-later OR Apache-2.0+
- ubuntu noble: librasqal3-dev 0.9.33-2.1build1 Β· LGPL-2.1-or-later OR GPL-2.0-or-later OR Apache-2.0+
- ubuntu questing: librasqal3-dev 0.9.33-2.1build1
- ubuntu resolute: librasqal3-dev 0.9.33-3 Β· LGPL-2.1-or-later OR GPL-2.0-or-later OR Apache-2.0+
- ubuntu stonking: librasqal3-dev 0.9.33-4 Β· LGPL-2.1-or-later OR GPL-2.0-or-later OR Apache-2.0+
- Copyright (C) 2004-2011 David Beckett - http://www.dajobe.org/
- Copyright (C) 2004-2005 University of Bristol - http://www.bristol.ac.uk/
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms