Documentation
¶
Overview ¶
Package graphmodel is the backend-neutral intermediate representation of a rendered query plan graph. It carries the fully resolved graph scope (nodes, edges, labels, tooltips and the optional query text) so that each backend serializer (dot, mermaid, d2, ...) can walk a single shared model instead of traversing the visualize.TreeNode graph and resolving formatting concerns on its own.
It is the graph-scope analog of the per-node label IR: the model owns structure and semantics, and the serializers own only traversal order, markup and escaping. The model itself is free of any backend syntax.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EdgeStyle ¶
type EdgeStyle int
EdgeStyle describes how an edge between plan nodes should be drawn.
type Item ¶
Item is one line of a Label body: either free text (a content line such as the short representation, a scan-info line or a scalar-link line) or a metadata key/value pair. KV is nil for text items and set for pairs.
type KV ¶
KV is a key/value pair, used for metadata pairs, execution-stats pairs and query-stat pairs.
type Label ¶
Label is a backend-neutral representation of a node's label. The sections carry semantic style: Title is bold, Body is plain, and Stats/Summary are italic. Serializers render the sections in field order to reproduce the per-backend layout.
Title holds the node title (already escaped for the dominant backend at build time). The dot HTML path composes Title separately with CENTER alignment; the dot body path deliberately omits it. The mermaid path places Title inline at the top of the label.
type Node ¶
Node is a graph node with its resolved label and tooltip.
Nodes can be shared: the same *Node may appear as the target of edges from multiple parents. Serializers that dedup (for example the mermaid path) use ID as the identity key; serializers that emit a full traversal (for example the dot path) walk Children directly.