Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtuoso 7.1 opes source DELETE DATA issues #198

Closed
feugen24 opened this issue Jun 16, 2014 · 6 comments
Closed

Virtuoso 7.1 opes source DELETE DATA issues #198

feugen24 opened this issue Jun 16, 2014 · 6 comments
Assignees

Comments

@feugen24
Copy link

Hi,

The following command works ok (both commands in a single sparql request):

INSERT DATA
  { 
    GRAPH <http://www.example.com/> 
      { 
        <#book2> <http://example.org/ns#price> 42 .
        <#book2> <http://purl.org/dc/elements/1.1/title>  "David Copperfield"^^<http://www.w3.org/2001/XMLSchema#string>.
        <#book2> <http://purl.org/dc/elements/1.1/creator> "Edmund Wells" .

      } 
  };
DELETE DATA FROM <http://www.example.com/> 
  {
    <#book2> <http://purl.org/dc/elements/1.1/title>   "David Copperfield"^^<http://www.w3.org/2001/XMLSchema#string>.
    <#book2> <http://purl.org/dc/elements/1.1/creator> "Edmund Wells" .

  }

but if I separate them into one "INSERT DATA" sparql request and one "DELETE DATA" then "David Copperfield" is not deleted. This seems to work if i insert
<#book2> <http://purl.org/dc/elements/1.1/title> "David Copperfield"
and remove
<#book2> <http://purl.org/dc/elements/1.1/title> "David Copperfield"
(remove "^^http://www.w3.org/2001/XMLSchema#string" part from the triple)

So how can I remove a triple that contains a literal with type? Note that I want to remove the actual triple(spo not sp* ,by using "delete where")

@HughWilliams
Copy link
Collaborator

I have been able to recreate this issue with both commands in a single sparql request, whereas you said it worked for you and only failed when both queries were executed separately ?

Anyway, I have reported for development to look into ...

@feugen24
Copy link
Author

It fails only on separate requests. More than this, if a triple with a typed literal is present and I execute one insert+delete for that triple then it's deleted.

So:

Empty graph.
Request 1:

INSERT DATA
  { 
    GRAPH <http://www.example.com/> 
      { 

        <#book2> <http://purl.org/dc/elements/1.1/title>  "David Copperfield"^^<http://www.w3.org/2001/XMLSchema#string>.
        <#book2> <http://purl.org/dc/elements/1.1/creator> "Edmund Wells" .

      } 
  };

Data

#book2  http://purl.org/dc/elements/1.1/title   "David Copperfield"^^<http://www.w3.org/2001/XMLSchema#string>
#book2  http://purl.org/dc/elements/1.1/creator     "Edmund Wells"

Request 2:

DELETE DATA FROM <http://www.example.com/> 
  {
    <#book2> <http://purl.org/dc/elements/1.1/title>   "David Copperfield"^^<http://www.w3.org/2001/XMLSchema#string>.
    <#book2> <http://purl.org/dc/elements/1.1/creator> "Edmund Wells" .

  }

Data

#book2  http://purl.org/dc/elements/1.1/title   "David Copperfield"^^<http://www.w3.org/2001/XMLSchema#string>

Request 3:

INSERT DATA
  { 
    GRAPH <http://www.example.com/> 
      { 

        <#book2> <http://purl.org/dc/elements/1.1/title>  "David Copperfield"^^<http://www.w3.org/2001/XMLSchema#string>.
        <#book2> <http://purl.org/dc/elements/1.1/creator> "Edmund Wells" .

      } 
  };
DELETE DATA FROM <http://www.example.com/> 
  {
    <#book2> <http://purl.org/dc/elements/1.1/title>   "David Copperfield"^^<http://www.w3.org/2001/XMLSchema#string>.
    <#book2> <http://purl.org/dc/elements/1.1/creator> "Edmund Wells" .
  }

Now everything is cleared.

@feugen24
Copy link
Author

This also applies to "delete where". The following pattern doesn't work for ""David Copperfield"^^http://www.w3.org/2001/XMLSchema#string" but works for "Edmund Wells".

DELETE { 
graph <http://www.example.com/> {
<#book2> <http://purl.org/dc/elements/1.1/title>   "David Copperfield"^^<http://www.w3.org/2001/XMLSchema#string>.
}
} 
WHERE {
graph <http://www.example.com/> {
<#book2> <http://purl.org/dc/elements/1.1/title>   "David Copperfield"^^<http://www.w3.org/2001/XMLSchema#string>.
}
} 

@kidehen
Copy link

kidehen commented Jun 17, 2014

On 6/17/14 3:58 AM, feugen24 wrote:

This also applies to "delete where". The following pattern doesn't
work for ""David
Copperfield"^^http://www.w3.org/2001/XMLSchema#string" but works for
"Edmund Wells".

|DELETE {
graph http://www.example.com/ {
<#book2> http://purl.org/dc/elements/1.1/title "David Copperfield"^^http://www.w3.org/2001/XMLSchema#string.
}
}
WHERE {
graph http://www.example.com/ {
<#book2> http://purl.org/dc/elements/1.1/title "David Copperfield"^^http://www.w3.org/2001/XMLSchema#string.
}
}
|


Reply to this email directly or view it on GitHub
#198 (comment).

Please repeat test using:

INSERT { graph |http://www.example.com/| {
<#book2> http://purl.org/dc/elements/1.1/title "''David
Copperfield''"^^http://www.w3.org/2001/XMLSchema#string.
}
} ;

DELETE { graph |http://www.example.com/| {
<#book2> http://purl.org/dc/elements/1.1/title "''David
Copperfield''"^^http://www.w3.org/2001/XMLSchema#string.
}
} ;
WHERE {
graph |http://www.example.com/| {
<#book2> http://purl.org/dc/elements/1.1/title "''David
Copperfield''"^^http://www.w3.org/2001/XMLSchema#string.
}
}

Note: " 'David Copperfield' " as opposed to "David Coperfield"

Regards,

Kingsley Idehen
Founder & CEO
OpenLink Software
Company Web: http://www.openlinksw.com
Personal Weblog: http://www.openlinksw.com/blog/~kidehen
Twitter Profile: https://twitter.com/kidehen
Google+ Profile: https://plus.google.com/+KingsleyIdehen/about
LinkedIn Profile: http://www.linkedin.com/in/kidehen

@HughWilliams
Copy link
Collaborator

Note we have a fix for this issue which should be pushed to the git develop/7 branch next week, so check the atom feed for updates:

https://github.com/openlink/virtuoso-opensource/commits/develop%2F7.atom

@openlink
Copy link
Owner

Fix has been puished

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants