Show / Hide Table of Contents

Class BaseTransactionalQuadDataset

Abstract Base class for quad datasets that support transactions.
Inheritance
System.Object
BaseQuadDataset
BaseTransactionalQuadDataset
InMemoryQuadDataset
Implements
ISparqlDataset
Inherited Members
BaseQuadDataset.SetActiveGraph(IEnumerable<Uri>)
BaseQuadDataset.SetActiveGraph(Uri)
BaseQuadDataset.SetDefaultGraph(Uri)
BaseQuadDataset.SetDefaultGraph(IEnumerable<Uri>)
BaseQuadDataset.ResetActiveGraph()
BaseQuadDataset.ResetDefaultGraph()
BaseQuadDataset.DefaultGraphUris
BaseQuadDataset.ActiveGraphUris
BaseQuadDataset.UsesUnionDefaultGraph
BaseQuadDataset.IsDefaultGraph(Uri)
BaseQuadDataset.AddQuad(Uri, Triple)
BaseQuadDataset.RemoveQuad(Uri, Triple)
BaseQuadDataset.HasGraph(Uri)
BaseQuadDataset.HasGraphInternal(Uri)
BaseQuadDataset.Graphs
BaseQuadDataset.GraphUris
BaseQuadDataset.GetGraphInternal(Uri)
BaseQuadDataset.HasTriples
BaseQuadDataset.ContainsTriple(Triple)
BaseQuadDataset.ContainsQuad(Uri, Triple)
BaseQuadDataset.Triples
BaseQuadDataset.GetQuads(Uri)
BaseQuadDataset.GetTriplesWithSubject(INode)
BaseQuadDataset.GetQuadsWithSubject(Uri, INode)
BaseQuadDataset.GetTriplesWithPredicate(INode)
BaseQuadDataset.GetQuadsWithPredicate(Uri, INode)
BaseQuadDataset.GetTriplesWithObject(INode)
BaseQuadDataset.GetQuadsWithObject(Uri, INode)
BaseQuadDataset.GetTriplesWithSubjectPredicate(INode, INode)
BaseQuadDataset.GetQuadsWithSubjectPredicate(Uri, INode, INode)
BaseQuadDataset.GetTriplesWithSubjectObject(INode, INode)
BaseQuadDataset.GetQuadsWithSubjectObject(Uri, INode, INode)
BaseQuadDataset.GetTriplesWithPredicateObject(INode, INode)
BaseQuadDataset.GetQuadsWithPredicateObject(Uri, INode, INode)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: VDS.RDF.Query.Datasets
Assembly: dotNetRDF.dll
Syntax
public abstract class BaseTransactionalQuadDataset : BaseQuadDataset, ISparqlDataset
Remarks

The Transaction implementation of dotNetRDF is based upon a MRSW concurrency model, since only one writer may be active changes are immediately pushed to the dataset and visible within the transaction and they are committed or rolled back when Flush() or Discard() are called.

So in practical terms it is perfectly OK for the storage to be updated during a transaction because if the transaction fails the changes will be rolled back because all changes are stored in-memory until the end of the transaction. This may not be an ideal transaction model for all scenarios so you may wish to implement your own version of transactions or code your implementations of the abstract methods accordingly to limit actual persistence to the end of a transaction.

Constructors

| Improve this Doc View Source

BaseTransactionalQuadDataset()

Creates a Transactional Quad Dataset.
Declaration
public BaseTransactionalQuadDataset()
| Improve this Doc View Source

BaseTransactionalQuadDataset(Boolean)

Creates a Transactional Quad Dataset.
Declaration
public BaseTransactionalQuadDataset(bool unionDefaultGraph)
Parameters
Type Name Description
System.Boolean unionDefaultGraph Sets whether the default graph should be the union of all graphs.
| Improve this Doc View Source

BaseTransactionalQuadDataset(Uri)

Creates a Transactional Quad Dataset.
Declaration
public BaseTransactionalQuadDataset(Uri defaultGraphUri)
Parameters
Type Name Description
System.Uri defaultGraphUri Default Graph URI.

Properties

| Improve this Doc View Source

Item[Uri]

Gets a Graph from the dataset.
Declaration
public override IGraph this[Uri graphUri] { get; }
Parameters
Type Name Description
System.Uri graphUri Graph URI.
Property Value
Type Description
IGraph
Overrides
BaseQuadDataset.Item[Uri]

Methods

| Improve this Doc View Source

AddGraph(IGraph)

Adds a Graph to the Dataset.
Declaration
public sealed override bool AddGraph(IGraph g)
Parameters
Type Name Description
IGraph g Graph to add.
Returns
Type Description
System.Boolean
Overrides
BaseQuadDataset.AddGraph(IGraph)
| Improve this Doc View Source

AddGraphInternal(IGraph)

Adds a Graph to the Dataset.
Declaration
protected abstract bool AddGraphInternal(IGraph g)
Parameters
Type Name Description
IGraph g Graph to add.
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Discard()

Ensures that any changes to the Dataset (if any) are discarded.
Declaration
public sealed override void Discard()
Overrides
BaseQuadDataset.Discard()
Remarks
Rollsback the Active Transaction.
| Improve this Doc View Source

DiscardInternal()

Allows the derived dataset to take any post-Discard() actions required.
Declaration
protected virtual void DiscardInternal()
| Improve this Doc View Source

Flush()

Ensures that any changes to the Dataset (if any) are flushed to the underlying Storage.
Declaration
public sealed override void Flush()
Overrides
BaseQuadDataset.Flush()
Remarks
Commits the Active Transaction.
| Improve this Doc View Source

FlushInternal()

Allows the derived dataset to take any post-Flush() actions required.
Declaration
protected virtual void FlushInternal()
| Improve this Doc View Source

GetModifiableGraph(Uri)

Gets a Graph from the Dataset that can be modified.
Declaration
public sealed override IGraph GetModifiableGraph(Uri graphUri)
Parameters
Type Name Description
System.Uri graphUri Graph URI.
Returns
Type Description
IGraph
Overrides
BaseQuadDataset.GetModifiableGraph(Uri)
| Improve this Doc View Source

GetModifiableGraphInternal(Uri)

Gets a Graph from the Dataset that can be modified transactionally.
Declaration
protected abstract ITransactionalGraph GetModifiableGraphInternal(Uri graphUri)
Parameters
Type Name Description
System.Uri graphUri Graph URI.
Returns
Type Description
ITransactionalGraph
| Improve this Doc View Source

RemoveGraph(Uri)

Removes a Graph from the Dataset.
Declaration
public sealed override bool RemoveGraph(Uri graphUri)
Parameters
Type Name Description
System.Uri graphUri Graph URI.
Returns
Type Description
System.Boolean
Overrides
BaseQuadDataset.RemoveGraph(Uri)
| Improve this Doc View Source

RemoveGraphInternal(Uri)

Removes a Graph from the dataset.
Declaration
protected abstract bool RemoveGraphInternal(Uri graphUri)
Parameters
Type Name Description
System.Uri graphUri Graph URI.
Returns
Type Description
System.Boolean

Implements

ISparqlDataset

Extension Methods

Extensions.AsEnumerable<T>(T)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • BaseTransactionalQuadDataset()
    • BaseTransactionalQuadDataset(Boolean)
    • BaseTransactionalQuadDataset(Uri)
  • Properties
    • Item[Uri]
  • Methods
    • AddGraph(IGraph)
    • AddGraphInternal(IGraph)
    • Discard()
    • DiscardInternal()
    • Flush()
    • FlushInternal()
    • GetModifiableGraph(Uri)
    • GetModifiableGraphInternal(Uri)
    • RemoveGraph(Uri)
    • RemoveGraphInternal(Uri)
  • Implements
  • Extension Methods
Back to top Generated by DocFX