![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
SQL function provsql.to_provxml() – XML/JSON circuit export.
More...
#include "postgres.h"#include "fmgr.h"#include "catalog/pg_type.h"#include "utils/uuid.h"#include "provsql_shmem.h"#include "provsql_utils.h"#include <set>#include <csignal>#include <utility>#include <sstream>#include <list>#include <algorithm>#include "provenance_evaluate_compiled.hpp"
Go to the source code of this file.
Functions | |
| static string | xmlEscape (const std::string &input) |
Escape special XML characters in input. | |
| bool | join_with_temp_uuids (Oid table, const std::vector< std::string > &uuids) |
| Join a provenance mapping table with a set of UUIDs using SPI. | |
| static string | to_provxml_internal (Datum tokenDatum, Datum table) |
| Build an XML provenance representation for a circuit token. | |
| Datum | to_provxml (PG_FUNCTION_ARGS) |
| PostgreSQL-callable wrapper for to_provxml(). | |
Variables | |
| const char * | drop_temp_table |
| DROP TABLE statement for the per-query temporary provenance mapping table. | |
SQL function provsql.to_provxml() – XML/JSON circuit export.
Implements provsql.to_provxml(), which serialises the provenance circuit rooted at a given UUID token to an XML string. The XML representation can be used for export, interchange, or display.
The implementation retrieves the circuit from the mmap store via SPI, traverses it depth-first, and builds the XML document using string operations. Special XML characters in node labels are escaped by the local xmlEscape() helper.
Definition in file to_prov.cpp.
| bool join_with_temp_uuids | ( | Oid | table, |
| const std::vector< std::string > & | uuids | ||
| ) |
Join a provenance mapping table with a set of UUIDs using SPI.
| table | OID of the provenance mapping relation. |
| uuids | List of UUID strings to join against. |
true if a temporary table was created (caller must drop it). Definition at line 245 of file provenance_evaluate_compiled.cpp.

| Datum to_provxml | ( | PG_FUNCTION_ARGS | ) |
PostgreSQL-callable wrapper for to_provxml().
Definition at line 136 of file to_prov.cpp.

|
static |
Build an XML provenance representation for a circuit token.
| tokenDatum | Datum containing the root provenance gate UUID. |
| table | Datum with the OID of the provenance mapping table. |
Definition at line 65 of file to_prov.cpp.


|
static |
Escape special XML characters in input.
| input | String to escape. |
Definition at line 42 of file to_prov.cpp.

|
extern |
DROP TABLE statement for the per-query temporary provenance mapping table.
Definition at line 51 of file provenance_evaluate_compiled.cpp.