renderer

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DescribeTableResult

func DescribeTableResult(result pgxspecial.SpecialCommandResult, c *config.Config) (string, error)

DescribeTableResult renders each describe-table section.

func Error

func Error(err error, w io.Writer) error

Error writes the error message writer in red color.

func ExtensionVerboseResult

func ExtensionVerboseResult(result pgxspecial.SpecialCommandResult, c *config.Config) (string, error)

ExtensionVerboseResult renders each verbose extension result.

func GetTableStyle

func GetTableStyle(s *config.Config) renderer.ColorizedConfig

func RowsResult

func RowsResult(result pgxspecial.SpecialCommandResult, c *config.Config) (string, error)

RowsResult renders row-based special command output.

func Table

func Table(data Data, w io.Writer, c *config.Config) error

Types

type ColorField

type ColorField string
const (
	ColorHeader  ColorField = "header"
	ColorColumn  ColorField = "column"
	ColorCaption ColorField = "caption"
)

type Data

type Data interface {
	Columns() []string
	Rows() ([][]any, error)
	Caption() string
}

Jump to

Keyboard shortcuts

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