W3C home > Mailing lists > Public > www-rdf-interest@w3.org > October 2002

rselect: R(D)QL for Scheme

From: Ashley Yakeley <ashley@semantic.org>
Date: Thu, 24 Oct 2002 19:50:02 -0700
Message-Id: <200210250250.TAA24142@mail4.halcyon.com>
To: "RDF Interest Group" <www-rdf-interest@w3.org>

I have designed a Scheme macro, "rselect" to query RDF databases:

rselect is a Scheme macro that retrieves data from an RDF depository. It 
is assumed that every "item" (resource or literal) has a unique integer 
ID number.

(rselect (rv...) ((subject predicate object)...))

The first argument is a list of zero or more return values.

The second argument is a list of zero or more statements. A statement is 
a list of three items, representing subject, predicate and object 
respectively. An item is one of:

*  a symbol beginning with $. These are considered variables.
*  an expression evaluating to an integer. These are considered to be ID 
numbers.
*  an expression evaluating to a string. These are considered to be 
resource URIs.

rselect returns a list of match lists, one for each set of variables that 
satisfy the statements. A match list is a list of values specified by the 
return value list. A return value is one of:

*  an item. These return ID values in the match lists.
*  the special form (uri item) where item is an item. These return URIs.
*  the special form (literal item) where item is an item. These return 
literals.

Documentation together with interactive examples is available at:
<http://soupserver.sourceforge.net/rselect/>


-- 
Ashley Yakeley, Seattle WA
Received on Thursday, 24 October 2002 22:50:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:56 GMT