display

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColumnNames

func ColumnNames(columns []*sql.ColumnType) []string

ColumnNames :: extract names from columns

func ColumnValueAsString

func ColumnValueAsString(val interface{}, colType *sql.ColumnType) (result string, err error)

ColumnValueAsString :: convert column value to string

func ColumnValuesAsString

func ColumnValuesAsString(values []interface{}, columns []*sql.ColumnType) ([]string, error)

ColumnValuesAsString :: converts a slice of columns into strings

func ParseJSONOutputColumnValue added in v0.1.2

func ParseJSONOutputColumnValue(val interface{}, colType *sql.ColumnType) (interface{}, error)

segregate data types, ignore string conversion for certain data types : JSON, JSONB, BOOL and so on..

func ShowOutput

func ShowOutput(result *db.QueryResult)

ShowOutput :: displays the output using the proper formatter as applicable

func ShowPaged added in v0.1.1

func ShowPaged(content string)

ShowPaged :: displays the `content` in a system dependent pager

Types

This section is empty.

Jump to

Keyboard shortcuts

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