Models an INSERT statement in SPARQL. More...
Public Types | |
enum | ConflictStrategy { Abort, Replace } |
Public Member Functions | |
CUBI_EXPLICIT | Insert (ConflictStrategy strategy=Abort) |
Constructs an empty INSERT statement. | |
Q_DECL_DEPRECATED CUBI_EXPLICIT | Insert (const ResourceValue &graph) |
Constructs an empty INSERT statement. | |
Q_DECL_DEPRECATED | Insert (ConflictStrategy strategy, const ResourceValue &graph) |
Constructs an empty INSERT statement. | |
void | setConflictStrategy (ConflictStrategy strategy) |
ConflictStrategy | conflictStrategy () const |
Models an INSERT statement in SPARQL.
A Insert statement has two parts, the first one, called the "data" part, being the graph pattern that has to be inserted, and the second one, called the "restriction" part, being the pattern that must be matched for the actual insertion to happen. The first part can be manipulated using the UpdateBase::addData() functions, while the second part is manipulated using the UpdateBase::addRestriction() functions.
Most of the useful functions of this class are defined in UpdateBase, which is the common base to Delete and Insert (since they share a very similar structure).
Insert::Insert | ( | ConflictStrategy | strategy = Abort |
) |
Constructs an empty INSERT statement.
The strategy
argument permits switching between regular INSERT
that aborts if existing resources have conflicting data in single-value properties, and INSERT
OR
REPLACE
which overwrites values for single valued properties.
INSERT
INTO
variant is deprecated. New code should create a Graph and add it using UpdateBase::addData(). Insert::Insert | ( | const ResourceValue & | graph | ) |
Constructs an empty INSERT statement.
An optional graph
can be set, if you want to generate a INSERT
INTO
... query.
INSERT
INTO
variant is deprecated. New code should create a Graph and add it using UpdateBase::addData(). Insert::Insert | ( | ConflictStrategy | strategy, | |
const ResourceValue & | graph | |||
) |
Constructs an empty INSERT statement.
An optional graph
can be set, if you want to generate a INSERT
INTO
... query.
The strategy
argument permits switching between regular INSERT
that aborts if existing resources have conflicting data in single-value properties, and INSERT
OR
REPLACE
which overwrites values for single valued properties.
INSERT
INTO
variant is deprecated. New code should create a Graph and add it using UpdateBase::addData().