scalarappendix

package
v0.1.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(rows []plantree.RowWithPredicates, opts Options) (string, error)

Render renders the configured scalar appendices without a leading separator.

func ValidateSections

func ValidateSections(sections Sections) error

ValidateSections validates an ordered print-section list.

Types

type Options

type Options struct {
	// Sections selects appendix sections.
	// A nil value uses the default SectionPredicates section.
	// An explicitly empty value renders no appendix sections.
	Sections *Sections

	// ShowScalarVars prints scalar assignment variable names in semantic appendix sections.
	ShowScalarVars bool

	// ResolveScalarVars replaces direct scalar variable aliases in semantic appendix sections.
	ResolveScalarVars bool

	// ResolveScalarVarsRecursive recursively resolves scalar variable aliases in semantic appendix sections.
	ResolveScalarVarsRecursive bool
}

Options configures appendix rendering.

type Section

type Section string

Section selects one appendix section printed after a rendered tree table.

const (
	// SectionPredicates prints predicate-like scalar links.
	SectionPredicates Section = "predicates"
	// SectionOrdering prints ordering scalar links for sort operators.
	SectionOrdering Section = "ordering"
	// SectionAggregate prints grouping and aggregate scalar links for aggregate operators.
	SectionAggregate Section = "aggregate"
	// SectionTyped prints all typed scalar links as a raw debug dump.
	SectionTyped Section = "typed"
	// SectionFull prints all scalar links, including unnamed links, as a raw debug dump.
	SectionFull Section = "full"
)

func ParseSection

func ParseSection(s string) (Section, error)

ParseSection parses one print-section name. Valid values are "predicates", "ordering", "aggregate", "typed", and "full" (case-insensitive).

type Sections

type Sections []Section

Sections is an ordered list of appendix sections.

func ParseSections

func ParseSections(s string) (Sections, error)

ParseSections parses a comma-separated print-section list. An empty string returns an empty list, which renders no appendix sections.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL