| Rasqal RDF Query Library Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
rasqal_update_operation; enum rasqal_update_type; enum rasqal_update_flags; enum rasqal_update_graph_applies;
This class provides a object to record a graph update operation with adding and/or removing triples, using a templated insert/delete with optional where clause. It is designed to be able to record the SPARQL 1.1 (Draft) update format, and is a work in progress as of February 2010.
typedef struct {
rasqal_update_type type;
raptor_uri* graph_uri;
raptor_uri* document_uri;
raptor_sequence* insert_templates;
raptor_sequence* delete_templates;
rasqal_graph_pattern* where;
int flags;
rasqal_update_graph_applies applies;
} rasqal_update_operation;
Update operation - changing the dataset
For LOAD and CLEAR if applies is set (not 0) then the operation
applies to just those graph(), otherwise it applies to the graph_uri.
For ADD, MOVE and COPY the source graph is stored in graph_uri
field and the destination graph in the document_uri field. The
field names have no meaning in this case since both values are
always present, always graphs and a NULL value signifies the
default graph.
rasqal_update_type |
type of update |
| optional graph URI (clear, drop, load, with ... delete, insert); source graph (add, move, copy) | |
| optional document URI (load); destination graph (add, move, copy) | |
optional sequence of rasqal_triple to insert. Data triples if flags is RASQAL_UPDATE_FLAGS_DATA set, templates otherwise. |
|
| optional sequence of rasqal_triple templates to delete | |
rasqal_graph_pattern * |
optional where template (insert/delete) |
| update flags - bit-or of flags defined in rasqal_update_flags | |
rasqal_update_graph_applies |
the graph(s) that the update operation applies to, or graph_uri if RASQAL_UPDATE_GRAPH_ONE
|
typedef enum {
/* internal */
RASQAL_UPDATE_TYPE_UNKNOWN = 0,
RASQAL_UPDATE_TYPE_CLEAR = 1,
RASQAL_UPDATE_TYPE_CREATE = 2,
RASQAL_UPDATE_TYPE_DROP = 3,
RASQAL_UPDATE_TYPE_LOAD = 4,
RASQAL_UPDATE_TYPE_UPDATE = 5,
RASQAL_UPDATE_TYPE_ADD = 6,
RASQAL_UPDATE_TYPE_MOVE = 7,
RASQAL_UPDATE_TYPE_COPY = 8,
/* internal */
RASQAL_UPDATE_TYPE_LAST = RASQAL_UPDATE_TYPE_COPY
} rasqal_update_type;
Update type being performed.
| Internal | |
| Clear graph. | |
| Create graph. | |
| Drop graph. | |
| Load graph. | |
| Insert or Delete graph or triples. | |
| Add graph to another graph. | |
| Move graph to another grpah. | |
| Copy graph to another graph. | |
| Internal |
typedef enum {
RASQAL_UPDATE_FLAGS_SILENT = 1,
RASQAL_UPDATE_FLAGS_DATA = 2
} rasqal_update_flags;
Bitflags for graph update operations