Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DumpBinaryRow ¶
func DumpBinaryRow(buffer []byte, columns []*Info, row chunk.Row, d *textrow.ResultEncoder) ([]byte, error)
DumpBinaryRow dumps a row to bytes.
func DumpTextRow ¶
func DumpTextRow(buffer []byte, columns []*Info, row chunk.Row, d *textrow.ResultEncoder) ([]byte, error)
DumpTextRow dumps a row to bytes. Each value is produced by the shared textrow serializer and then length-encoded into the text protocol (NULL is the 0xfb marker).
Types ¶
type Info ¶
type Info struct {
DefaultValue any
Schema string
Table string
OrgTable string
Name string
OrgName string
ColumnLength uint32
Charset uint16
Flag uint16
Decimal uint8
Type uint8
}
Info contains information of a column
func ConvertColumnInfo ¶
func ConvertColumnInfo(fld *resolve.ResultField) (ci *Info)
ConvertColumnInfo converts `*ast.ResultField` to `*Info`
func (*Info) Dump ¶
func (column *Info) Dump(buffer []byte, d *textrow.ResultEncoder) []byte
Dump dumps Info to bytes.
func (*Info) DumpWithDefault ¶
func (column *Info) DumpWithDefault(buffer []byte, d *textrow.ResultEncoder) []byte
DumpWithDefault dumps Info to bytes, including column defaults. This is used for ComFieldList responses.
Click to show internal directories.
Click to hide internal directories.