Re: [easyrdf] DELETE/INSERT

182 views
Skip to first unread message

Nicholas Humfrey

unread,
Mar 4, 2013, 7:07:45 PM3/4/13
to eas...@googlegroups.com, eas...@googlegroups.com
Hello,

I'm afraid that EasyRdf does not currently support SPARQL 1.1 Update at the moment but it is on the todo list:


However it does support the SPARQL 1.1 HTTP GraphStore protocol:



Sent from my phone


On 4 Mar 2013, at 16:35, Giosia Gentile <gfu...@gmail.com> wrote:

Hi, I'm new. I'm strating to use easyrdf and it was very good!
I have a question: there is a way to do the DELETE/INSERT sparql query (http://www.w3.org/TR/2012/PR-sparql11-update-20121108/#deleteInsert) with easyrdf???
Thank you!!

--
You received this message because you are subscribed to the Google Groups "EasyRdf Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to easyrdf+u...@googlegroups.com.
To post to this group, send email to eas...@googlegroups.com.
Visit this group at http://groups.google.com/group/easyrdf?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Giosia Gentile

unread,
Mar 5, 2013, 3:13:46 AM3/5/13
to eas...@googlegroups.com
Thank you.
Sorry but I'm not expert, please can you explain me how I can do something like DELET/INSERT with easy rdf!!

Thank you.

Nicholas J Humfrey

unread,
Mar 8, 2013, 6:35:13 PM3/8/13
to eas...@googlegroups.com
Sorry I didn't reply to your email sooner.

From your other email, it looks like you have worked out what to do.

nick.


> Thank you.
> Sorry but I'm not expert, please can you explain me how I can do something
> like DELET/INSERT with easy rdf!!
>
> Thank you.
>
> Il giorno marted� 5 marzo 2013 01:07:45 UTC+1, Nicholas Humfrey ha
> scritto:
>>
>> Hello,
>>
>> I'm afraid that EasyRdf does not currently support SPARQL 1.1 Update at
>> the moment but it is on the todo list:
>>
>> https://github.com/njh/easyrdf/issues/66
>>
>> However it does support the SPARQL 1.1 HTTP GraphStore protocol:
>>
>> http://www.w3.org/TR/sparql11-http-rdf-update/
>>
>>
>> Sent from my phone
>>
>>
>> On 4 Mar 2013, at 16:35, Giosia Gentile <gfu...@gmail.com <javascript:>>
>> wrote:
>>
>> Hi, I'm new. I'm strating to use easyrdf and it was very good!
>> I have a question: there is a way to do the DELETE/INSERT sparql query (
>> http://www.w3.org/TR/2012/PR-sparql11-update-20121108/#deleteInsert)
>> with
>> easyrdf???
>>
>> Thank you!!
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups
>> "EasyRdf Discussion" group.
>> To unsubscribe from this group and stop receiving emails from it, send
>> an
>> email to easyrdf+u...@googlegroups.com <javascript:>.
>> To post to this group, send email to eas...@googlegroups.com
>> <javascript:>
>> .

Nicholas Humfrey

unread,
May 27, 2013, 6:20:48 PM5/27/13
to eas...@googlegroups.com
Great, thanks!

nick.


On 23 May 2013, at 18:56, Mochamad Arifin wrote:

> I was create a class for EasyRdf that can perform update Query. see attachment file..
> <EasyRdf_SPARQL_Update.php>

Barış Taşkend

unread,
Jun 19, 2013, 4:03:24 AM6/19/13
to eas...@googlegroups.com

Hi,
I can't run insert query which includes "inserting literal". Can you give me an example which can insert a literal with EasyRdf_SPARQL_Update.php
thx.
23 Mayıs 2013 Perşembe 20:56:48 UTC+3 tarihinde Mochamad Arifin yazdı:
I was create a class for EasyRdf that can perform update Query. see attachment file..

On Tuesday, March 5, 2013 3:13:46 PM UTC+7, Giosia Gentile wrote:

Nicholas Humfrey

unread,
Jul 3, 2013, 6:19:42 PM7/3/13
to eas...@googlegroups.com
Hello,

Sorry for the delay in replying. I was struggling to get Google Groups to release the message - seems to be working now.

I'm afraid that I have not had a chance to merge in EasyRdf_SPARQL_Update.php yet.

I plan to add support for it in the next release.


Maybe Mochamad can help you in the meantime?



nick.
> Visit this group at http://groups.google.com/group/easyrdf.

Nicholas Humfrey

unread,
Aug 12, 2013, 5:44:47 AM8/12/13
to eas...@googlegroups.com

Hello,

I have added an update() method to EasyRdf_Sparql_Client:
https://github.com/njh/easyrdf/blob/master/lib/EasyRdf/Sparql/Client.php#L143

Which you can use to execute any SPARQL 1.1 Update query on a store that supports it.

Would be interested in any feedback - in particular if you think that query() and update() should be throwing exceptions for failed querys, and what you think the return type should be for a successful update().

Next I will be adding insert() and delete() methods...

nick.

 

Arnie Shore

unread,
Aug 12, 2013, 6:19:08 AM8/12/13
to eas...@googlegroups.com
Consistency with SQL operations makes sense to lurker me, so returned
values might consist of an integer count of the number of instances
affected, possibly zero. -AS

Nicholas Humfrey

unread,
Aug 13, 2013, 5:05:08 AM8/13/13
to eas...@googlegroups.com
Unfortunately the SPARQL protocol does not make that information available.

Usually all you get back is the HTTP status code:

I suspect I should therefore return a EasyRdf_Http_Response object.

The alternative is to return true/false, but that is probably less useful.

nick.

Todi Adiyatmo

unread,
Aug 19, 2013, 2:14:28 AM8/19/13
to eas...@googlegroups.com


On Friday, May 24, 2013 12:56:48 AM UTC+7, Mochamad Arifin wrote:
I was create a class for EasyRdf that can perform update Query. see attachment file..

On Tuesday, March 5, 2013 3:13:46 PM UTC+7, Giosia Gentile wrote:

This one work , in order to get it work we must do :
1. Insert this class into the EasyRDF
2. Load this class with include_once on EasyRDF.php 
3. Call the class

Vote for merge into trunk

Nicholas Humfrey

unread,
Aug 20, 2013, 8:30:46 AM8/20/13
to eas...@googlegroups.com
Hello Todi,

There is now update support in the master branch.

Example using local Fuseki instance:

$client = new EasyRdf_Sparql_Client(
'http://localhost:3030/ds/query',
'http://localhost:3030/ds/update'
);

$client->update('INSERT DATA { <s> <p> <o> }');


nick.

Todi Adiyatmo

unread,
Aug 23, 2013, 12:03:10 PM8/23/13
to eas...@googlegroups.com
Ahh cool, so fast :) just gonna fork the master. Please give the example file too. An Insert / Delete command example will be great, tutorial are  rarely found on the net. :) Congrats anyway :) 

Nicholas Humfrey

unread,
Aug 26, 2013, 6:17:58 PM8/26/13
to eas...@googlegroups.com, eas...@googlegroups.com
Yup, will be creating an example :)
They are my preferred way of learning how things work.

nick.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages