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:


πŸ¦‹ SEE ALSO πŸ¦‹


πŸ’– 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