command

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cmd generic.Command, data []byte) *generic.Simple

func ParseQueryResponse added in v1.0.3

func ParseQueryResponse(data []byte) (uint64, error)

Types

type BinaryResultSetRow

type BinaryResultSetRow struct {
	generic.Header

	PktHeader  byte
	NullBitMap []byte
	Values     []columnValue
}

func ParseBinaryResultSetRow

func ParseBinaryResultSetRow(data []byte, columns []*ColumnDefinition, loc *time.Location) (*BinaryResultSetRow, error)

func (*BinaryResultSetRow) NullBitMapGet

func (p *BinaryResultSetRow) NullBitMapGet(index int) bool

type ColumnDefinition

type ColumnDefinition struct {
	generic.Header

	Catalog      string
	Schema       string
	Table        string
	OrgTable     string
	Name         string
	OrgName      string
	NextLength   uint64
	CharacterSet *generic.Collation
	ColumnLength uint32
	ColumnType   generic.TableColumnType
	Flags        generic.ColumnDefinitionFlag
	Decimals     uint8
}

ColumnDefinition https://dev.mysql.com/doc/internals/en/com-query-response.html#column-definition

func ParseColumnDefinition

func ParseColumnDefinition(bs []byte) (*ColumnDefinition, error)

type StmtExecute

type StmtExecute struct {
	generic.Header

	ComStmtExecute     uint8
	StmtId             uint32
	Flags              uint8
	IterationCount     uint32
	NullBitMap         []byte
	NewParamsBoundFlag uint8
	ParamType          []byte
	ParamValue         []byte
}

StmtExecute https://dev.mysql.com/doc/internals/en/com-stmt-execute.html

func NewStmtExecute

func NewStmtExecute() *StmtExecute

func (*StmtExecute) CreateNullBitMap

func (p *StmtExecute) CreateNullBitMap(paramCount int)

func (*StmtExecute) Dump

func (p *StmtExecute) Dump() []byte

func (*StmtExecute) NullBitMapSet

func (p *StmtExecute) NullBitMapSet(paramCount, index int)

type StmtPrepareOKFirst

type StmtPrepareOKFirst struct {
	generic.Header

	Status       uint8
	StmtId       uint32
	ColumnCount  uint16
	ParamCount   uint16
	WarningCount uint16
}

StmtPrepareOKFirst https://dev.mysql.com/doc/internals/en/com-stmt-prepare-response.html#packet-COM_STMT_PREPARE_OK

func ParseStmtPrepareOKFirst

func ParseStmtPrepareOKFirst(data []byte) (*StmtPrepareOKFirst, error)

type TextResultSetRow

type TextResultSetRow struct {
	generic.Header
	Values []columnValue
}

func ParseTextResultSetRow

func ParseTextResultSetRow(data []byte, columns []*ColumnDefinition, loc *time.Location) (*TextResultSetRow, error)

Jump to

Keyboard shortcuts

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