Needs work
Project:
SPARQL
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
1 Jun 2011 at 16:10 UTC
Updated:
7 Jul 2011 at 19:26 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedThis patch doesn't get all the way there, but is a good start.
-Creates endpoints from a dataset
-Enables querying with calls like
sparql_request($query, NULL, array('endpoint_id' => 1))We will want to see how we could allow multiple files for the dataset.
Comment #2
scor commenteddid you check that this is no longer necessary?
why image?
??
Comment #3
Anonymous (not verified) commentedThis patch cleans up some of the junk that was still in the last patch (though this isn't ready for official "needs review", still)
It also moves to using a serialized array for storing the dataset, though I haven't made the database schema change to reflect that.
I will be posting another patch soon that makes a change to the API.
Comment #4
Anonymous (not verified) commentedWait, what happened to my patch?
Comment #5
scor commentedI was thinking this afternoon: how about using a misc/data column as an alternative to using fields (what we chatted about this morning), kind of the data column in the users table, where you can store whatever data you want (serialized)? the cons if you cannot directly query it in SQL but that might be ok (pros is it is schemaless at the SQL level, and no db overhead).
Comment #6
Anonymous (not verified) commentedhmm, I'm not sure whether you are talking about the dataset column? This doesn't really use fields currently. It uses hook_field_extra_field which is a fake field. So the data is already serialized in the same table. Let me know if I'm misunderstanding.
What I was looking for was a way to do the "Add another" button, and I think I might be able to add that with an example from ajax_example.
Comment #7
scor commentedhow about a simple textarea with one URI per line?
Comment #8
Anonymous (not verified) commentedHm, you're right, that should be a good fix for now. The "Add another" could be added later.
The only thing left to do on this will be the API change. Currently, the sparql_request takes ($query, $endpoint, $options). I would like to change it to ($query, $endpoint) where $endpoint is a SPARQL registry object. That way it will have any additional info (like read keys). If someone wants to use the API without SPARQL registry, they just need to create an object.
Any thoughts on that API change?
Comment #9
scor commentedyes, that API change sounds good.
Comment #10
scor commentedthis patch will need a reroll due to #1176844: Move sparql_endpoint_initialize to main sparql module
Comment #11
Anonymous (not verified) commentedAnd also due to #1211898: Change API to take endpoint object instead of $endpoint + $options if it is committed.
Comment #12
scor commentedwhat type of object? will the API accept any stdClass? or sparqlRegistry?
Comment #13
Anonymous (not verified) commentedSPARQL Registry uses stdClass, it doesn't define it's own class.