34#ifndef DATAQUAY_CONNECTION_H
35#define DATAQUAY_CONNECTION_H
42class TransactionalStore;
107 void save(QString filename)
const;
Connection provides a connection interface to TransactionalStore, allowing it to be used in a conveni...
Features getSupportedFeatures() const
Retrieve the set of optional features supported by this Store implementation.
Uri getUniqueUri(QString prefix) const
Get a new URI, starting with the given prefix (e.g.
bool contains(Triple t) const
Return true if the store contains the given triple, false otherwise.
bool add(Triple t)
Add a triple to the store.
void save(QString filename) const
Export the store to an RDF/TTL file with the given filename.
bool remove(Triple t)
Remove a triple from the store.
Connection(TransactionalStore *ts)
Construct a Connection to the given TransactionalStore, through which a series of transactions may be...
~Connection()
Destroy the Connection, first committing any outstanding transaction.
Node complete(Triple t) const
Given a triple in which any two nodes are specified and the other is a wildcard node of type Nothing,...
Uri expand(QString uri) const
Expand the given URI (which may use local namespaces) and prefix-expand it, returning the result as a...
void importString(QString encodedRdf, Uri uri, ImportDuplicatesMode idm, QString format="")
Import the RDF document encoded in the given string into the current store (in addition to its existi...
Triples match(Triple t) const
Return all triples matching the given wildcard triple.
void transactionCommitted()
Forwarded from TransactionalStore.
Node queryOnce(QString sparql, QString bindingName) const
Run a SPARQL query against the store and return the node of the first result for the given query bind...
Triple matchOnce(Triple t) const
Return a triple from the store that matches the given wildcard triple, or the empty triple if none ma...
void rollback()
Roll back the outstanding Transaction, if any, and prepare to begin a new Transaction the next time a...
ChangeSet commitAndObtain()
Commit the outstanding Transaction, if any, and return the changes committed.
void commit()
Commit the outstanding Transaction, if any.
void revert(ChangeSet changes)
Atomically apply the sequence of add/remove changes described in the given ChangeSet,...
Node addBlankNode()
Create and return a new blank node.
ResultSet query(QString sparql) const
Run a SPARQL query against the store and return its results.
void change(ChangeSet changes)
Atomically apply the sequence of add/remove changes described in the given ChangeSet.
void transactionCommitted(const ChangeSet &)
Forwarded from TransactionalStore.
Node represents a single RDF node, with conversions to and from variant types.
Store is an abstract interface for Dataquay RDF data stores.
ImportDuplicatesMode
ImportDuplicatesMode determines the outcome when an import operation encounters a triple in the impor...
TransactionalStore is an RDF data store implementing the Store interface, providing transaction suppo...
Triple represents an RDF statement made up of three Node objects.
Uri represents a single URI.
QList< Change > ChangeSet
A sequence of add/remove operations such as may be enacted by a transaction.
QList< Dictionary > ResultSet
A list of Dictionary types, used to contain a sequence of query results.