Code Monkey home page Code Monkey logo

Comments (11)

bnowack avatar bnowack commented on May 19, 2024

ARC doesn't support SPARQL 1.1, just a dialect called SPARQL+.
The equivalent to DROP GRAPH is "DELETE FROM http://example.com/graph"

from arc2.

coreation avatar coreation commented on May 19, 2024

Hi @bnowack, thanks for the quick reply, github probably rendered it but the uri is probably meant to be between < and > symbols correct?

from arc2.

bnowack avatar bnowack commented on May 19, 2024

yes, correct. I'll fix the comment escaping

from arc2.

coreation avatar coreation commented on May 19, 2024

Thanks! That answers all of my questions then.

from arc2.

coreation avatar coreation commented on May 19, 2024

Hm, apparently that doesn't answer all of my questions, I expected the drop or delete to drop my graph, + all of its triples as well. It doesn't seem to do that. Yes _g2t is cleared out, but the triples remain, how can I make sure all of the triples in the graph I want to delete are also deleted?

Edit: The _triples entries are also gone, so my understanding is that you keep all of the predicates, subjects, objects for optimization purposes (perhaps other triples might need them or are using them). My question thus changes to, is this a mem-leak or a contained optimization feature, meaning that if you see no triples is using a certain stored predicate, subject, or object that they are deleted from the back-end.

from arc2.

k00ni avatar k00ni commented on May 19, 2024

I ran into the same problem as @coreation: removing the graph via

DELETE FROM <http://foobar/>

left the triples untouched and all tables except g2t keep their triple-data. Is this intentional or a bug?

I tried removing the triples using:

DELETE FROM <http://foobar/> { ?s ?p ?o . } WHERE { ?s ?p ?o . }

or

DELETE FROM <http://foobar/> { ?s ?p ?o . }

which also doesn't work.

from arc2.

coreation avatar coreation commented on May 19, 2024

I think this repository is not maintained anymore, only PR's are accepted from time to time I'm afraid.

from arc2.

k00ni avatar k00ni commented on May 19, 2024

I implemented a solution in our RDF framework called Saft, which makes use of ARC2 as backend. If this is a bug, i could try to fix it in ARC2 directly.

from arc2.

bnowack avatar bnowack commented on May 19, 2024

Hi,
keeping the term hashes was intentional, so that ARC re-uses internal IDs after their first creation. IIRC, this had a speed benefit when a store frequently gets cleared and re-populated.

For clean DB tables, I used to do a SPOG export + import in a fresh store.

from arc2.

k00ni avatar k00ni commented on May 19, 2024

For clean DB tables, I used to do a SPOG export + import in a fresh store.

Would you explain that further, please? How can i clean the tables when dropping a graph?

from arc2.

bnowack avatar bnowack commented on May 19, 2024

Basically, you can't clean the tables through SPARQL+.

There is a $store->createBackup method, which lets you write a backup file to disk (or alternatively the SPARQL+ query DUMP which returns the backup data).

Then you can reset the store ($store->reset()) and re-import the backup file via a LOAD <path/to/backup-file.spog> query. (If I remember correctly, I haven't looked at the code for quite some time...)

The 2nd step ($store->reset()) cannot be done via the endpoint, and it is not graph-specific but clears all tables. In all other cases, keeping the term hashes is/was intentionally, although I don't fully remember the reasons ;-)

from arc2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.