Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

UpdateBase Class Reference

Common class for update statements. More...

Inheritance diagram for UpdateBase:
Inheritance graph
[legend]

List of all members.

Public Types

enum  Type { InsertUpdate, DeleteUpdate }

Public Member Functions

 UpdateBase (const UpdateBase &other)
UpdateBaseoperator= (const UpdateBase &other)
bool operator== (const UpdateBase &other) const
bool operator!= (const UpdateBase &other) const
Type type () const
 Retrurns the type of the UpdateBase.
void addData (const PatternBase &pattern)
 Adds a graph pattern to the data part of this statement.
void addData (const Value &s, const Value &p, const Value &o)
 Adds a triple to the data part of this statement.
QList< PatternBasedata () const
 Returns all the patterns in the data part of this statement.
void addRestriction (const PatternBase &pattern)
 Adds a graph pattern to the restrictions of this statement.
void addRestriction (const Value &s, const Value &p, const Value &o)
 Adds a triple to the restrictions of this statement.
void addRestriction (const Value &s, const ValueChain &chain, const Value &o)
 Adds a triple chain to the statement's restrictions.
QList< PatternBaserestrictions () const
 Returns all the patterns in the restrictions of this statement.
Filter filter () const
 Returns the current statement's restriction filter, or NULL if there is none.
void setFilter (const Filter &filter)
 Sets a global filter on the statement's restrictions.
QString sparql (Options::SparqlOptions options=Options::DefaultSparqlOptions) const

Protected Member Functions

 UpdateBase (const ResourceValue &graph=ResourceValue())
 UpdateBase (UpdateBaseData *data)

Protected Attributes

QSharedDataPointer
< UpdateBaseData > 
d

Detailed Description

Common class for update statements.

The UpdateBase class is the base for the Sparql statements used to modify a graph, that is Insert and Delete. You will never use this class directly, only its subclasses.


Member Function Documentation

void UpdateBase::addData ( const PatternBase pattern  ) 

Adds a graph pattern to the data part of this statement.

You will most likely use this function to insert PatternGroup instances into the data part.

The user keeps the ownership of the pattern and must free it.

void UpdateBase::addData ( const Value s,
const Value p,
const Value o 
)

Adds a triple to the data part of this statement.

The user keeps the ownership of the variables and must free them.

void UpdateBase::addRestriction ( const PatternBase pattern  ) 

Adds a graph pattern to the restrictions of this statement.

You will most likely use this function to insert PatternGroup instances into the restrictions.

The user keeps the ownership of the pattern and must free it.

void UpdateBase::addRestriction ( const Value s,
const Value p,
const Value o 
)

Adds a triple to the restrictions of this statement.

The user keeps the ownership of the variables and must free them.

void UpdateBase::addRestriction ( const Value s,
const ValueChain &  chain,
const Value o 
)

Adds a triple chain to the statement's restrictions.

See also:
PatternGroup::addPattern(const Value *s, const ValueChain &chain, const Value *o)

The user keeps the ownership of the variables and must free them.

QList< PatternBase > UpdateBase::data (  )  const

Returns all the patterns in the data part of this statement.

Note that this list is actually a tree, since it can contain PatternGroup instances, that contains restrictions themselves.

QList< PatternBase > UpdateBase::restrictions (  )  const

Returns all the patterns in the restrictions of this statement.

Note that this list is actually a tree, since it can contain PatternGroup instances, that contains restrictions themselves.

void UpdateBase::setFilter ( const Filter filter  ) 

Sets a global filter on the statement's restrictions.

More specific filters applying only to a subset of the restrictions can be done setting filters on PatternGroup instances and adding those instances to the restrictions.


The documentation for this class was generated from the following files:
 All Classes Functions Enumerations