wireprotocol

package
v3.30.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: Apache-2.0, Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// server --> client
	TOKEN_SCHEMA_INFO   int16 = 0xA1
	TOKEN_ROW           int16 = 0xA2
	TOKEN_DONE          int16 = 0xFD
	TOKEN_INFO_MESSAGE  int16 = 0xFE
	TOKEN_ERROR_MESSAGE int16 = 0xFF

	// client --> server
	TOKEN_SQL     int16 = 0x01
	TOKEN_PLAN_OP int16 = 0x02
)
View Source
const (
	TYPE_VOID      int8 = 0x00
	TYPE_ID        int8 = 0x01
	TYPE_BOOL      int8 = 0x02
	TYPE_INT       int8 = 0x03
	TYPE_DECIMAL   int8 = 0x04
	TYPE_TIMESTAMP int8 = 0x05
	TYPE_IDSET     int8 = 0x06
	TYPE_STRING    int8 = 0x07
	TYPE_STRINGSET int8 = 0x08
)

Variables

This section is empty.

Functions

func ExpectToken

func ExpectToken(reader io.Reader, token int16) (int16, error)

func ReadError

func ReadError(reader io.Reader) (string, error)

func ReadRow

func ReadRow(reader io.Reader, schema types.Schema) (types.Row, error)

func ReadSchema

func ReadSchema(reader io.Reader) (types.Schema, error)

func WriteDone

func WriteDone() []byte

func WriteError

func WriteError(err error) []byte

func WriteRow

func WriteRow(row types.Row, schema types.Schema) ([]byte, error)

func WriteSchema

func WriteSchema(schema types.Schema) ([]byte, error)

note RelationName and AliasName members from PlannerColumn are not sent over the wire

Types

This section is empty.

Jump to

Keyboard shortcuts

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