Volksdata 1.0b12
RDF library and triple store
Loading...
Searching...
No Matches
Collaboration diagram for RDF Dataset module:

Data Structures

struct  VOLK_DataSet
 RDF Dataset type. More...

Macros

#define VOLK_data_set_new_from_store(...)
 Non-transactional version of VOLK_data_set_new_from_store_txn().

Functions

VOLK_rc VOLK_data_set_add (VOLK_DataSet *ds, const VOLK_Graph *gr)
 Add graphs to the data set.
bool VOLK_data_set_contains (VOLK_DataSet *ds, const VOLK_Graph *gr)
 Check if a graph is in a data set.
void VOLK_data_set_free (VOLK_DataSet *ds)
 Free a data set handle.
VOLK_DataSetVOLK_data_set_new (VOLK_Store *store)
 Create an empty data set.
VOLK_DataSetVOLK_data_set_new_copy (VOLK_DataSet *ds)
 Duplicate a data set.
VOLK_DataSetVOLK_data_set_new_from_store_txn (void *txn, VOLK_Store *store)
 Create a data set populated with a whole store.
VOLK_rc VOLK_data_set_remove (VOLK_DataSet *ds, const VOLK_Graph *gr)
 Remove graphs from the data set.
size_t VOLK_data_set_size (VOLK_DataSet *ds)
 Number of triples in a data set.

Detailed Description

A data set is a set of RDF graphs, backed by a context-aware store. All graphs in a data set belong to the same store.

The data set is not synchronized with changes in the backing store, so that if a graph contained in a data set is deleted from the store, its reference remains in the data set.

Macro Definition Documentation

◆ VOLK_data_set_new_from_store

#define VOLK_data_set_new_from_store ( ...)
Value:
NULL, __VA_ARGS__)
VOLK_DataSet * VOLK_data_set_new_from_store_txn(void *txn, VOLK_Store *store)
Create a data set populated with a whole store.
Definition data_set.c:18

Non-transactional version of VOLK_data_set_new_from_store_txn().

Definition at line 57 of file data_set.h.

Function Documentation

◆ VOLK_data_set_add()

VOLK_rc VOLK_data_set_add ( VOLK_DataSet * ds,
const VOLK_Graph * gr )
inline

Add graphs to the data set.

Parameters
[in]dsDataset to add to.
[in]grGraph to add. It must be in the same store as the data set.
Returns
VOLK_OK on success; VOLK_VALUE_ERR if the graph was not found in the store.

Definition at line 92 of file data_set.h.

◆ VOLK_data_set_contains()

bool VOLK_data_set_contains ( VOLK_DataSet * ds,
const VOLK_Graph * gr )
inline

Check if a graph is in a data set.

Parameters
[in]dsDataset to check.
[in]grGraph to search for.

Definition at line 132 of file data_set.h.

◆ VOLK_data_set_free()

void VOLK_data_set_free ( VOLK_DataSet * ds)

Free a data set handle.

Note that this destroys the graph hash map, but NOT the graphs, which remain in the store.

Parameters
[in]dsDataset handle.

Definition at line 77 of file data_set.c.

◆ VOLK_data_set_new()

VOLK_DataSet * VOLK_data_set_new ( VOLK_Store * store)

Create an empty data set.

Note
At the moment, only the mdb store supports contexts, so data sets cannot be created from any in-memory store.
Parameters
[in]storeStore handle for the graphs in the data set. The store MUST support the VOLK_STORE_CTX feature.

Definition at line 5 of file data_set.c.

◆ VOLK_data_set_new_copy()

VOLK_DataSet * VOLK_data_set_new_copy ( VOLK_DataSet * ds)

Duplicate a data set.

Parameters
[in]dsSource data set.
Returns
New data set or NULL on error.

Definition at line 56 of file data_set.c.

◆ VOLK_data_set_new_from_store_txn()

VOLK_DataSet * VOLK_data_set_new_from_store_txn ( void * txn,
VOLK_Store * store )

Create a data set populated with a whole store.

Parameters
[in]txnOpen, read-write transaction handle. If NULL, a new transaction is opened and closed within the function call.
[in]storeStore handle for the graphs in the data set. The store MUST support the VOLK_STORE_CTX feature.

Definition at line 18 of file data_set.c.

◆ VOLK_data_set_remove()

VOLK_rc VOLK_data_set_remove ( VOLK_DataSet * ds,
const VOLK_Graph * gr )
inline

Remove graphs from the data set.

Parameters
[in]dsDataset to remove from.
[in]grGraph to remove.
Returns
VOLK_OK on success, even if a graph URI was not found in the store. VOLK_NO_ACTION if a URI is not in the data set.

Definition at line 111 of file data_set.h.

◆ VOLK_data_set_size()

size_t VOLK_data_set_size ( VOLK_DataSet * ds)

Number of triples in a data set.

Parameters
[in]dsDataset to measure.
Returns
Number of triples found across all graphs of the data set.

Definition at line 85 of file data_set.c.