[redland-dev] Newbie problem with ruby Redland::Query
Juan Pablo .
xuanpa at gmail.com
Tue Aug 26 07:56:06 BST 2008
Greetings,
I'm trying to learn to use ruby bindings for redland, but I'm failing
to perform a simple query, so I look for some guidance.
I have a very simple rdf file that once loaded into a model, and using
the model.dump_model method looks like:
[file1]:[http://purl.org/dc/elements/1.1/subject]:Subject
[file2]:[http://purl.org/dc/elements/1.1/subject]:Subject
[file3]:[http://purl.org/dc/elements/1.1/subject]:Subject
Then I execute the following query:
q = Redland::Query.new("select * where {?doc
<http://purl.org/dc/elements/1.1/subject> 'Subject'.}")
result=q.execute(model)
print result.count
The problem is I'm getting 1 result from that query, which is the
first statement in the model, when I should get all 3, or so I
think...
Asuming the query is correct, as I copied it from a SPARQL tutorial,
there must be something I'm doing wrong; any idea of what might it be?
Thanks.
More information about the redland-dev
mailing list