We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Storing as documented:
#!/usr/bin/env node const N3 = require('n3') const { DataFactory } = N3 const { namedNode, literal, defaultGraph, quad } = DataFactory const store = new N3.Store() store.add( namedNode('http://ex.org/Pluto'), namedNode('http://ex.org/type'), namedNode('http://ex.org/Dog') ) store.add( namedNode('http://ex.org/Mickey'), namedNode('http://ex.org/type'), namedNode('http://ex.org/Mouse') ) // Retrieve all quads for (const quad of store) console.log(quad); console.log(store.size)
results in this output
Quad { id: '', _subject: DefaultGraph { id: '' }, _predicate: DefaultGraph { id: '' }, _object: DefaultGraph { id: '' }, _graph: DefaultGraph { id: '' } } 1
I don't understand the details of store.add vs. store.addQuad but the latter works:
store.add
store.addQuad
store.addQuad(quad( namedNode('http://ex.org/Pluto'), namedNode('http://ex.org/type'), namedNode('http://ex.org/Dog') )) store.addQuad(quad( namedNode('http://ex.org/Mickey'), namedNode('http://ex.org/type'), namedNode('http://ex.org/Mouse') ))
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Storing as documented:
results in this output
I don't understand the details of
store.add
vs.store.addQuad
but the latter works:The text was updated successfully, but these errors were encountered: