ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
Loading...
Searching...
No Matches
probability_store.h
Go to the documentation of this file.
1/**
2 * @file probability_store.h
3 * @brief Write-once probabilities: the entry points other files use.
4 *
5 * See @c probability_store.c for what "written once" means and how a
6 * rolled-back write is undone.
7 */
8#ifndef PROVSQL_PROBABILITY_STORE_H
9#define PROVSQL_PROBABILITY_STORE_H
10
11#include "postgres.h"
12#include "provsql_utils.h"
13
14/**
15 * @brief Write @p token's probability and record the write, so that a
16 * rollback of the current (sub)transaction clears it.
17 *
18 * Raises when the gate carries no probability, when @p prob is outside
19 * [0, 1], and when the gate already holds a different probability.
20 * Writing the value the gate already holds is a no-op.
21 */
22void provsql_set_prob_tracked(const pg_uuid_t *token, double prob);
23
24#endif /* PROVSQL_PROBABILITY_STORE_H */
void provsql_set_prob_tracked(const pg_uuid_t *token, double prob)
Write token's probability and record the write, so that a rollback of the current (sub)transaction cl...
Core types, constants, and utilities shared across ProvSQL.