util

package
v0.0.0-...-0cdfd1f Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BufferOut

func BufferOut(node ast.Node) (string, error)

BufferOut parser ast node to SQL string

func GenerateDataItem

func GenerateDataItem(columnType string) interface{}

GenerateDataItem rand data interface with given type

func GenerateDataItemString

func GenerateDataItemString(columnType string) string

GenerateDataItemString rand data with given type

func GenerateDateItem

func GenerateDateItem() time.Time

func GenerateFloatItem

func GenerateFloatItem() float64

func GenerateIntItem

func GenerateIntItem() int

func GenerateRandDataItem

func GenerateRandDataItem() interface{}

GenerateRandDataItem rand data item with rand type

func GenerateStringItem

func GenerateStringItem() string

func GenerateTiDBDateItem

func GenerateTiDBDateItem() tidbTypes.Time

func Info

func Info(a ...interface{})

func Rd

func Rd(n int) int

func RdCharset

func RdCharset() string

func RdColumnOptions

func RdColumnOptions(t string) []ast.ColumnOptionType

func RdDataLen

func RdDataLen(columnType string) int

func RdDate

func RdDate() time.Time

func RdDateColumnOptions

func RdDateColumnOptions() (options []ast.ColumnOptionType)

func RdFloat64

func RdFloat64() float64

func RdRange

func RdRange(n, m int) int

func RdString

func RdString(length int) string

func RdStringChar

func RdStringChar(length int) string

func RdType

func RdType() string

func TimeMustParse

func TimeMustParse(layout, value string) time.Time

TimeMustParse wrap time.Parse and panic when error

func Type2Tp

func Type2Tp(t string) byte

Type2Tp conver type string to tp byte TODO: complete conversion map

Types

This section is empty.

Jump to

Keyboard shortcuts

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