opcode

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PulloutValue = PulloutOpcode(iota)
	PulloutIn
	PulloutNotIn
	PulloutExists
)

This is the list of PulloutOpcode values.

View Source
const (
	AggregateUnassigned = AggregateOpcode(iota)
	AggregateCount
	AggregateSum
	AggregateMin
	AggregateMax
	AggregateCountDistinct
	AggregateSumDistinct
	AggregateGtid
	AggregateRandom
	AggregateCountStar
)

These constants list the possible aggregate opcodes.

Variables

View Source
var (
	// OpcodeType keeps track of the known output types for different aggregate functions
	OpcodeType = map[AggregateOpcode]querypb.Type{
		AggregateCountDistinct: sqltypes.Int64,
		AggregateCount:         sqltypes.Int64,
		AggregateCountStar:     sqltypes.Int64,
		AggregateSumDistinct:   sqltypes.Decimal,
		AggregateSum:           sqltypes.Decimal,
		AggregateGtid:          sqltypes.VarChar,
	}
)
View Source
var SupportedAggregates = map[string]AggregateOpcode{
	"count": AggregateCount,
	"sum":   AggregateSum,
	"min":   AggregateMin,
	"max":   AggregateMax,

	"count_distinct": AggregateCountDistinct,
	"sum_distinct":   AggregateSumDistinct,
	"vgtid":          AggregateGtid,
	"count_star":     AggregateCountStar,
	"random":         AggregateRandom,
}

SupportedAggregates maps the list of supported aggregate functions to their opcodes.

Functions

This section is empty.

Types

type AggregateOpcode

type AggregateOpcode int

AggregateOpcode is the aggregation Opcode.

func (AggregateOpcode) MarshalJSON

func (code AggregateOpcode) MarshalJSON() ([]byte, error)

MarshalJSON serializes the AggregateOpcode as a JSON string. It's used for testing and diagnostics.

func (AggregateOpcode) String

func (code AggregateOpcode) String() string

type PulloutOpcode

type PulloutOpcode int

PulloutOpcode is a number representing the opcode for the PulloutSubquery primitive.

func (PulloutOpcode) MarshalJSON

func (code PulloutOpcode) MarshalJSON() ([]byte, error)

MarshalJSON serializes the PulloutOpcode as a JSON string. It's used for testing and diagnostics.

func (PulloutOpcode) String

func (code PulloutOpcode) String() string

Jump to

Keyboard shortcuts

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