render

package
v0.0.0-...-250b45b Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatArgs

func FormatArgs(args []interface{}) []string

FormatArgs formats arguments into string slice. Ref: https://github.com/go-mysql-org/go-mysql/blob/33ea963610607f7b5505fd39d0955b78039ef783/server/stmt.go#L186

Types

type AsyncRender

type AsyncRender struct {
	// contains filtered or unexported fields
}

func NewAsyncRender

func NewAsyncRender(render Render) *AsyncRender

func (*AsyncRender) Push

func (a *AsyncRender) Push(frame *Frame)

func (*AsyncRender) Start

func (a *AsyncRender) Start()

type CSVRender

type CSVRender struct {
	// contains filtered or unexported fields
}

func (*CSVRender) Close

func (r *CSVRender) Close() error

func (*CSVRender) Open

func (c *CSVRender) Open(file string) error

func (*CSVRender) Push

func (c *CSVRender) Push(frame *Frame)

type ConsoleRender

type ConsoleRender struct{}

func (ConsoleRender) Push

func (c ConsoleRender) Push(frame *Frame)

type Frame

type Frame struct {
	Ident string
	Query string
	Args  []interface{}
	TiDB  QueryResult
	MySQL QueryResult
}

type HTMLRender

type HTMLRender struct {
	// contains filtered or unexported fields
}

func (*HTMLRender) Close

func (c *HTMLRender) Close() error

func (*HTMLRender) Open

func (c *HTMLRender) Open(file string) error

func (*HTMLRender) Push

func (c *HTMLRender) Push(frame *Frame)

type QueryResult

type QueryResult struct {
	Result   *mysql.Result
	Error    error
	Duration time.Duration
}

type Render

type Render interface {
	Push(frame *Frame)
}

Jump to

Keyboard shortcuts

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