Re: Safe delete & insert with Fuseki

2022-03-31 Thread Mikael Pesonen



Only thing I could think of is to try the insert first on some temp 
graph to see if it succeed. That can be unnecessary heavy though.


On 26/03/2022 11.12, Andy Seaborne wrote:


If you put all the changes in one update request, they will be done 
atomically.


DELETE { ... } WHERE { ... }
;
INSERT DATA { ... }

Also, the WHERE clause in a DELETE-INSERT-WHERE can be used to "switch 
off" an operation.


    Andy

On 24/03/2022 13:17, Mikael Pesonen wrote:


We have occasionally an issue with replace where inserting new data 
may fail after old data has been deleted. What is the recommended way 
to do this kind of multipart SPARQL with Fuseki (not java)? First 
option comes to mind is to test if SPARQL insert is correct and WOULD 
be executed. Is this possible?




--
Lingsoft - 30 years of Leading Language Management

www.lingsoft.fi

Speech Applications - Language Management - Translation - Reader's and Writer's 
Tools - Text Tools - E-books and M-books

Mikael Pesonen
System Engineer

e-mail: mikael.peso...@lingsoft.fi
Tel. +358 2 279 3300

Time zone: GMT+2

Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND

Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND



Re: Safe delete & insert with Fuseki

2022-03-28 Thread Mikael Pesonen
Queries don't have common enough selection criteria so they have to
executed separately. Otherwise that would be nice solution.

On Sat, 26 Mar 2022 at 11:12, Andy Seaborne  wrote:

>
> If you put all the changes in one update request, they will be done
> atomically.
>
> DELETE { ... } WHERE { ... }
> ;
> INSERT DATA { ... }
>
> Also, the WHERE clause in a DELETE-INSERT-WHERE can be used to "switch
> off" an operation.
>
>  Andy
>
> On 24/03/2022 13:17, Mikael Pesonen wrote:
> >
> > We have occasionally an issue with replace where inserting new data may
> > fail after old data has been deleted. What is the recommended way to do
> > this kind of multipart SPARQL with Fuseki (not java)? First option comes
> > to mind is to test if SPARQL insert is correct and WOULD be executed. Is
> > this possible?
> >
>


Re: Safe delete & insert with Fuseki

2022-03-26 Thread Andy Seaborne



If you put all the changes in one update request, they will be done 
atomically.


DELETE { ... } WHERE { ... }
;
INSERT DATA { ... }

Also, the WHERE clause in a DELETE-INSERT-WHERE can be used to "switch 
off" an operation.


Andy

On 24/03/2022 13:17, Mikael Pesonen wrote:


We have occasionally an issue with replace where inserting new data may 
fail after old data has been deleted. What is the recommended way to do 
this kind of multipart SPARQL with Fuseki (not java)? First option comes 
to mind is to test if SPARQL insert is correct and WOULD be executed. Is 
this possible?