Comments (4)
That's embarassing. The instructions are wrong.
When a named graph doesn't exist yet, you need to do create_named_graph/3
rather than open_named_graph/3
. I'll update the readme.
from terminus_store_prolog.
open_directory_store
won't create the directory, so if it doesn't exist, it'll throw that exception.
Try to create an empty directory, then opening that as a store. Does that work?
from terminus_store_prolog.
That was my first guess. I tried it moments ago but got a failure:
$ mkdir testdir
Then:
?- use_module(library(terminus_store)). true.
?- open_directory_store("testdir", Store), open_write(Store, Builder), open_named_graph(Store, "sometestdb", DB), nb_add_triple(Builder, "Subject", "Predicate", value("Object")), nb_commit(Builder, Layer), nb_set_head(DB, Layer).
false.
?- trace.
true.
[trace] ?- open_directory_store("testdir", Store), open_write(Store, Builder), open_named_graph(Store, "sometestdb", DB), nb_add_triple(Builder, "Subject", "Predicate", value("Object")), nb_commit(Builder, Layer), nb_set_head(DB, Layer).
Call: (11) terminus_store:open_directory_store("testdir", _5708) ? creep
Exit: (11) terminus_store:open_directory_store("testdir", <store_blob>) ? creep
Call: (11) terminus_store:open_write(<store_blob>, _5714) ? creep
Exit: (11) terminus_store:open_write(<store_blob>, <layer_builder>) ? creep
Call: (11) terminus_store:open_named_graph(<store_blob>, "sometestdb", _5730) ? creep
Fail: (11) terminus_store:open_named_graph(<store_blob>, "sometestdb", _5730) ? creep
false.
from terminus_store_prolog.
Changing the called predicate indeed makes the query succeed.
from terminus_store_prolog.
Related Issues (20)
- Bare labels not being type checked in schema checking phase HOT 1
- Pack cannot be installed in Ubuntu 18 HOT 2
- Pack cannot be installed on macOS HOT 10
- Non-necessary use proprietary compound term with zero arguments in clause head? HOT 1
- make `nb_remove_triple` work with non-ground parameters
- open_directory_store when directory does not exist HOT 1
- resolve the hard coded shared lib mess HOT 12
- create_or_open_named_graph HOT 1
- values must be atoms or strings HOT 3
- calling open_write more than once workflow is baffling HOT 1
- add predicates for retrieving the label list HOT 1
- improve bitmap indexing HOT 2
- terminus_store:subject_predicate_lookup_object/2 leaves choice point. HOT 2
- implement nondet query predicates without creating lookup blobs HOT 1
- Error in README.md HOT 1
- Pack won't install/compile on macOS Apple Silicon HOT 2
- Implement label deletion
- pack_install fails HOT 1
- Archive terminus_store_prolog HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terminus_store_prolog.