RPNX::QueryGraph
Typed, memoized, concurrent query evaluation for C++23
Loading...
Searching...
No Matches
Graph Dump Format

QueryGraph needs to dump the graph to a file for debugging and testing purposes.

The format looks like:

(query_class_dumps map<string, QueryClassDump>, root_node optional NodeReferenceData)

Lists ([]T)

Lists are encoded as:

  • uintany encoded count of items (See RPNX::Serialization docs for details on uintany encoding),
  • followed by that many items.

Strings

A string is encoded as []byte.

Maps (map<K, V>)

A map is encoded as a List of key-value pairs, where each pair is encoded as (key K, value V).

QueryClassDump

A QueryClassDump consists of:

(input_type TYPESIG, output_type TYPESIG, instances map<[]byte, QueryInstanceDump>)

CanonicalErrorResultData

A CanonicalErrorResultData consists of:

(error_typesig TYPESIG, error_data []byte, error_message []char8)

error_typesig is the registered canonical exception type signature. error_data is serialized with querygraph::binary_traits<Error>.

QueryInstanceDump

A QueryInstanceDump consists of:

(status Status, output_data []byte, error_result optional CanonicalErrorResultData, messages []string, dependencies []NodeReferenceData, subqueries map<string, SubqueryClassDump>)

Status is pending, completed, canonical_error, or unexpected_exception. error_result is present only when status is canonical_error.

SubqueryClassDump

A SubqueryClassDump consists of:

(input_type TYPESIG, output_type TYPESIG, instances map<[]byte, SubqueryInstanceDump>)

SubqueryInstanceDump

A SubqueryInstanceDump consists of:

(status Status, output_data []byte, error_result optional CanonicalErrorResultData)

Subquery dumps are nested under the parent query instance that produced or was asked for them. The subquery map key is the subquery_id.

NodeReferenceData

A NodeReferenceData consists of:

(query_id []char8, input_data []byte)

When used as root_node, the debugger should select this node first when opening the dump.