|
RPNX::QueryGraph
Typed, memoized, concurrent query evaluation for C++23
|
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)
[]T)Lists are encoded as:
A string is encoded as []byte.
map<K, V>)A map is encoded as a List of key-value pairs, where each pair is encoded as (key K, value V).
A QueryClassDump consists of:
(input_type TYPESIG, output_type TYPESIG, instances map<[]byte, QueryInstanceDump>)
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>.
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.
A SubqueryClassDump consists of:
(input_type TYPESIG, output_type TYPESIG, instances map<[]byte, 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.
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.