protocol

package
v0.0.0-...-e6fb8a6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name, version, revision
	ServerHello = iota

	// A block of data (compressed or not)
	ServerData

	// The exception during query execution
	ServerException

	// Query execution progress: rows read, bytes read
	ServerProgress

	// Ping response
	ServerPong

	// All packets were transmitted
	ServerEndOfStream

	// Packet with profiling info
	ServerProfileInfo

	// A block with totals (compressed or not)
	ServerTotals

	// A block with minimums and maximums (compressed or not)
	ServerExtremes

	// A response to TablesStatus request.
	ServerTablesStatusResponse

	// System logs of the query execution
	ServerLog

	// Columns' description for default values calculation
	ServerTableColumns
)
View Source
const (
	// Name, version, revision, default DB
	ClientHello = iota

	// Query id, query settings, stage up to which the query must be executed,
	// whether the compression must be used,
	// query text (without data for INSERTs).
	ClientQuery

	// A block of data (compressed or not)
	ClientData

	// Cancel the query execution
	ClientCancel

	// Check that connection to the server is alive
	ClientPing

	// Check status of tables on the server
	ClientTablesStatusRequest

	// Keep the connection alive
	ClientKeepAlive

	// A block of data (compressed or not)
	ClientScalar
)
View Source
const (
	VERSION_REVISION                                = 54428
	DBMS_MIN_REVISION_WITH_CLIENT_INFO              = 54032
	DBMS_MIN_REVISION_WITH_SERVER_TIMEZONE          = 54058
	DBMS_MIN_REVISION_WITH_QUOTA_KEY_IN_CLIENT_INFO = 54060
	DBMS_MIN_REVISION_WITH_SERVER_DISPLAY_NAME      = 54372
	DBMS_MIN_REVISION_WITH_VERSION_PATCH            = 54401
	DBMS_MIN_REVISION_WITH_CLIENT_WRITE_INFO        = 54420
)
View Source
const (
	TCP  = 1
	HTTP = 2
)
View Source
const (
	VersionName  = "VectorSQL"
	VersionMajor = 19
	VersionMinor = 17
	VersionPatch = 1
	DBMSName     = VersionName
)
View Source
const (
	VERSION_PATCH = 1
)

Variables

This section is empty.

Functions

func ClientPacketType

func ClientPacketType(typ uint64) string

func WriteExceptionResponse

func WriteExceptionResponse(writer *binary.Writer, err error, withStackTrace bool) error

func WriteHelloResponse

func WriteHelloResponse(writer *binary.Writer, clientRevision uint64, displayName string) error

func WritePingResponse

func WritePingResponse(writer *binary.Writer) error

func WriteProgressResponse

func WriteProgressResponse(writer *binary.Writer, pv *sessions.ProgressValues, clientRevision uint64) error

Types

type ExceptionProtocol

type ExceptionProtocol struct {
	Code       int32
	Name       string
	Message    string
	StackTrace string
	Error      error
}

type HTTPClientInfo

type HTTPClientInfo struct {
	HTTPMethod    uint8
	HTTPUserAgent string
}

type HelloProtocol

type HelloProtocol struct {
	ClientName         string
	ClientVersionMajor uint64
	ClientVersionMinor uint64
	ClientRevision     uint64
	Database           string
	User               string
	Password           string
}

func ReadHelloRequest

func ReadHelloRequest(reader *binary.Reader) (*HelloProtocol, error)

type QueryClientInfo

type QueryClientInfo struct {
	QueryKind      uint64
	InitialUser    string
	InitialQueryID string
	InitialAddress string
	QuotaKey       string
	Interface      uint64
	TCPClientInfo
	HTTPClientInfo
}

type QueryProtocol

type QueryProtocol struct {
	QueryID     string
	ClientInfo  *QueryClientInfo
	Stage       uint64
	Compression uint64
	Query       string
}

func ReadQueryRequest

func ReadQueryRequest(reader *binary.Reader, clientRevision uint64) (*QueryProtocol, error)

type TCPClientInfo

type TCPClientInfo struct {
	OSUser             string
	ClientHostName     string
	ClientName         string
	ClientVersionMajor uint64
	ClientVersionMinor uint64
	ClientVersionPatch uint64
	ClientRevision     uint64
}

Jump to

Keyboard shortcuts

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