![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
SQL function provsql.view_circuit() – GraphViz DOT circuit visualisation.
More...
#include "postgres.h"#include "fmgr.h"#include "catalog/pg_type.h"#include "utils/uuid.h"#include "executor/spi.h"#include "provsql_shmem.h"#include "provsql_utils.h"#include "DotCircuit.h"#include <csignal>#include <utility>#include <sstream>#include <algorithm>
Go to the source code of this file.
Functions | |
| static vector< pair< int, int > > | parse_array (string s) |
| Parse a PostgreSQL text representation of an array of integer pairs. | |
| static std::string | view_circuit_internal (Datum token, Datum token2prob, Datum is_debug) |
Build a GraphViz DOT representation of the provenance circuit at token. | |
| Datum | view_circuit (PG_FUNCTION_ARGS) |
| PostgreSQL-callable wrapper for view_circuit(). | |
SQL function provsql.view_circuit() – GraphViz DOT circuit visualisation.
Implements provsql.view_circuit(), which serialises the provenance circuit rooted at a given UUID token to a GraphViz DOT string using the DotCircuit class. The returned string can be rendered to an image with dot(1) or graph-easy(1).
An SPI query retrieves the optional provenance-mapping labels (human- readable identifiers for input gates) and attaches them to the DOT nodes before calling DotCircuit::render().
Definition in file view_circuit.cpp.
|
static |
Parse a PostgreSQL text representation of an array of integer pairs.
| s | String in the form {{a,b},{c,d},...}. |
Definition at line 40 of file view_circuit.cpp.

| Datum view_circuit | ( | PG_FUNCTION_ARGS | ) |
PostgreSQL-callable wrapper for view_circuit().
Definition at line 177 of file view_circuit.cpp.

|
static |
Build a GraphViz DOT representation of the provenance circuit at token.
| token | Datum containing the root provenance gate UUID. |
| token2prob | Datum with the OID of the probability mapping relation. |
| is_debug | Datum boolean; if true, include debug information. |
Definition at line 75 of file view_circuit.cpp.

