[redland-dev] Add, delete... and modify?

Yann Klis strass at strasslab.net
Tue Aug 16 12:11:47 BST 2005


Dave Beckett a écrit :

>On Tue, 2005-08-16 at 11:38 +0200, Danny Ayers wrote:
>  
>
>>On 8/15/05, Yann Klis <strass at strasslab.net> wrote:
>>
>>But how can I modify
>>    
>>
>>>statements? Am I suppose to delete and then add a statement? What's the
>>>'spirit' behind this?
>>>      
>>>
>>I presume the spirit is that of RDF, where there isn't really a notion
>>of modifying statements - a 'modified' statement is a separate,
>>different logical assertion than the 'original'. But I do think
>>there's a good case for supporting modifier methods in the bindings
>>according to the specific language idioms.
>>    
>>
>
>Yeah, a triple is the atom in RDF (in some sense) and it is
>self-identifying.  I've asked before but still wasn't sure what the
>appropriate API would be.
>
>Maybe model.replace_statement(old_statement, new_statement)
>
>or maybe something more specific:
>  model.update_statement_object(old_statement, new_object)
>but that seems rather specialised.
>
>Either one would mean a lot of internal redland changes in order to make
>this replace function as atomic as possible for all redland storages.
>
>Dave
>
Just to be sure. So, for now, if the object of a triple change, I'm 
supposed to destroy the old statement and add a new one?

Thx,

++

yk


More information about the redland-dev mailing list