Updates

## Updates Updates — Graph update operations |

## Synopsis

                        rasqal_update_operation;
    enum                rasqal_update_type;
    enum                rasqal_update_flags;

## Description

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.

## Details

### rasqal_update_operation

    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_operation;

Update operation - changing the dataset

rasqal_update_type `type`; | type of update
raptor_uri *`graph_uri`; | optional graph URI (clear, drop, load, with ... delete/insert)
raptor_uri *`document_uri`; | optional document URI (load)
raptor_sequence *`insert_templates`; | optional sequence of triple templates to insert
raptor_sequence *`delete_templates`; | optional sequence of triple templates to delete
rasqal_graph_pattern *`where`; | optional where template (insert/delete)
int `flags`; | update flags - bit-or of flags defined in rasqal_update_flags

### enum rasqal_update_type

    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,

      /* internal */
      RASQAL_UPDATE_TYPE_LAST = RASQAL_UPDATE_TYPE_UPDATE
    } rasqal_update_type;

Update type being performed.

`RASQAL_UPDATE_TYPE_UNKNOWN` | Internal
`RASQAL_UPDATE_TYPE_CLEAR` | Clear graph.
`RASQAL_UPDATE_TYPE_CREATE` | Create graph.
`RASQAL_UPDATE_TYPE_DROP` | Drop graph.
`RASQAL_UPDATE_TYPE_LOAD` | Load graph.
`RASQAL_UPDATE_TYPE_UPDATE` | Insert or Delete graph or triples.
`RASQAL_UPDATE_TYPE_LAST` | Internal

### enum rasqal_update_flags

    typedef enum {
      RASQAL_UPDATE_FLAGS_SILENT = 1,
      RASQAL_UPDATE_FLAGS_DATA = 2,
    } rasqal_update_flags;

Flags for graph update operations

`RASQAL_UPDATE_FLAGS_SILENT` | the update operation should be silent
`RASQAL_UPDATE_FLAGS_DATA` | the update operation is triple data not templates