diff options
| author | Wim Muskee <wimmuskee@gmail.com> | 2017-01-24 10:23:46 +0100 |
|---|---|---|
| committer | Gunnar Aastrand Grimnes <gromgull@users.noreply.github.com> | 2017-01-24 10:23:46 +0100 |
| commit | a7d2b46b975e49f3f5dfffb10db2ce515b05d509 (patch) | |
| tree | 750b1613eaa74fef9e823d3b8668781c2b6594bf /docs | |
| parent | 71dc600ececc0dd10125b18a937dc34d81feb334 (diff) | |
| download | rdflib-a7d2b46b975e49f3f5dfffb10db2ce515b05d509.tar.gz | |
docs: clarify the use of an identifier when persisting a triplestore (#654)
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/persistence.rst | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/persistence.rst b/docs/persistence.rst index 6ca69829..fbddf38f 100644 --- a/docs/persistence.rst +++ b/docs/persistence.rst @@ -36,11 +36,13 @@ Most cases passing the name of the store to the Graph constructor is enough: graph = Graph(store='Sleepycat') -Most store offering on-disk persistence will need to be opened before reading or writing : +Most store offering on-disk persistence will need to be opened before reading or writing. +When peristing a triplestore (instead of a ConjuntiveGraph quadstore), you need to specify +an identifier with which you can open the graph: .. code-block:: python - graph = Graph('Sleepycat') + graph = Graph('Sleepycat', identifier='mygraph') # first time create the store: graph.open('/home/user/data/myRDFLibStore', create = True) @@ -49,7 +51,7 @@ Most store offering on-disk persistence will need to be opened before reading or graph.add( mytriples ) # when done! - graph.close() + graph.close() |
