ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
Loading...
Searching...
No Matches
kcmcp_protocol.cpp File Reference

Implementation of the KCMCP wire codec (see kcmcp_protocol.h). More...

#include "kcmcp_protocol.h"
#include <cerrno>
#include <cstring>
#include <unistd.h>
Include dependency graph for kcmcp_protocol.cpp:

Go to the source code of this file.

Namespaces

namespace  kcmcp

Functions

const char * kcmcp::operation_name (Operation op)
const char * kcmcp::input_format_name (InputFormat fmt)
const char * kcmcp::output_format_name (OutputFormat fmt)
bool kcmcp::parse_request (const std::string &payload, Request &out)
 Decode a REQUEST payload; returns false if structurally malformed.
std::string kcmcp::build_result (OutputFormat fmt, const std::string &meta_json, const std::string &result)
 Build a RESULT payload (result_format byte + meta JSON + result bytes).
std::string kcmcp::build_error (ErrorCode code, const std::string &message)
 Build an ERROR payload (u16 code + UTF-8 message).

Detailed Description

Implementation of the KCMCP wire codec (see kcmcp_protocol.h).

Definition in file kcmcp_protocol.cpp.