engine

package
v0.0.0-...-68ea67d Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: PostgreSQL Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ASC = iota
	DESC
)

Variables

View Source
var BackendConnectionsHeaders = []string{
	"backend_connection_id",
	"router",
	"shard_key_name",
	"hostname",
	"pid",
	"user",
	"dbname",
	"sync",
	"tx_served",
	"tx_status",
	"is_stale",
	"created_at",
}

Functions

func BackendConnectionsVirtualRelationScan

func BackendConnectionsVirtualRelationScan(shs []shard.ShardHostCtl) (*tupleslot.TupleTableSlot, error)

BackendConnections writes backend connection information to the PSQL client.

Parameters: - _ (context.Context): The context for the operation. - shs ([]shard.Shardinfo): The list of shard information. - stmt (*spqrparser.Show): The query itself.

Returns: - error: An error if any occurred during the operation.

func ClientsVirtualRelationScan

func ClientsVirtualRelationScan(_ context.Context, clients []client.ClientInfo) (*tupleslot.TupleTableSlot, error)

Clients retrieves client information based on provided client information, filtering conditions and writes the data to the PSQL client.

Parameters: - ctx (context.Context): The context for the operation. - clients ([]client.ClientInfo): The list of client information to process. - condition (spqrparser.WhereClauseNode): The condition to filter the client information.

Returns: - error: An error if any occurred during the operation.

func FilterRows

func FilterRows(tts *tupleslot.TupleTableSlot, where lyx.Node) (*tupleslot.TupleTableSlot, error)

func FloatOidFD

func FloatOidFD(stmt string) pgproto3.FieldDescription

FloatOidFD generates a pgproto3.FieldDescription object of FLOAT8 type with the provided statement text.

Parameters: - stmt (string): The statement text to use in the FieldDescription.

Returns: - A pgproto3.FieldDescription object initialized with the provided statement text and default values.

func GetVPHeader

func GetVPHeader(stmts ...string) []pgproto3.FieldDescription

func HostsVirtualRelationScan

func HostsVirtualRelationScan(shards []*topology.DataShard, ihc map[string]tsa.CachedCheckResult) *tupleslot.TupleTableSlot

func InstanceVirtualRelationScan

func InstanceVirtualRelationScan(_ context.Context, ci connmgr.ConnectionMgr) *tupleslot.TupleTableSlot

TODO refactor it to make more user-friendly

func IntOidFD

func IntOidFD(stmt string) pgproto3.FieldDescription

IntOidFD generates a pgproto3.FieldDescription object of INT type with the provided statement text.

Parameters: - stmt (string): The statement text to use in the FieldDescription.

Returns: - A pgproto3.FieldDescription object initialized with the provided statement text and default values.

func KeyRangeVirtualRelationScan

func KeyRangeVirtualRelationScan(
	krs []*kr.KeyRange,
	locks []string) *tupleslot.TupleTableSlot

func KeyRangeVirtualRelationScanExtended

func KeyRangeVirtualRelationScanExtended(
	krs []*kr.KeyRange,
	locks []string,
	dists []*distributions.Distribution) (*tupleslot.TupleTableSlot, error)

func MatchRow

func MatchRow(row [][]byte, nameToIndex map[string]int, condition lyx.Node) (bool, error)

MatchRow checks if a row matches a given condition in a WHERE clause.

Parameters: - row ([]string): The row of data to be checked. - nameToIndex (map[string]int): A map that maps column names to their respective indices in the row. - condition (spqrparser.WhereClauseNode): The condition to be checked against the row.

Returns: - bool: True if the row matches the condition, false otherwise. - error: An error if there was a problem evaluating the condition.

func MoveTasksVirtualRelationScan

func MoveTasksVirtualRelationScan(ts map[string]*tasks.MoveTask, dsIDColTypes map[string][]string, moveTaskDsID map[string]string) (*tupleslot.TupleTableSlot, error)

func ProcessOrderBy

func ProcessOrderBy(data [][][]byte, colOrder map[string]int, order lyx.Node) ([][][]byte, error)

func RedistributeTasksVirtualRelationScan

func RedistributeTasksVirtualRelationScan(tasks []*tasks.RedistributeTask) (*tupleslot.TupleTableSlot, error)

func ReferenceRelationsScan

func ReferenceRelationsScan(rrs []*rrelation.ReferenceRelation) *tupleslot.TupleTableSlot

func RelationsVirtualRelationScan

func RelationsVirtualRelationScan(
	dsToRels map[string][]*distributions.DistributedRelation) (*tupleslot.TupleTableSlot, error)

Relations sends information about attached relations that satisfy conditions in WHERE-clause Relations writes relation information to the PSQL client based on the given distribution-to-relations map and condition.

Parameters: - dsToRels (map[string][]*distributions.DistributedRelation): The map of distribution names to their corresponding distributed relations. - condition (spqrparser.WhereClauseNode): The condition for filtering the relations.

Returns: - error: An error if any occurred during the operation.

func TSAVirtualRelationScan

func TSAVirtualRelationScan(cacheEntries map[pool.TsaKey]pool.CachedEntry) *tupleslot.TupleTableSlot

func TaskGroupBoundsCacheVirtualRelationScan

func TaskGroupBoundsCacheVirtualRelationScan(boundsMap map[string][][][]byte, indexMap map[string]int, colTypesMap map[string][]string) (*tupleslot.TupleTableSlot, error)

func TaskGroupsVirtualRelationScan

func TaskGroupsVirtualRelationScan(groups map[string]*tasks.MoveTaskGroup, statuses map[string]*tasks.MoveTaskGroupStatus) *tupleslot.TupleTableSlot

func TextOidFD

func TextOidFD(stmt string) pgproto3.FieldDescription

TextOidFD generates a pgproto3.FieldDescription object with the provided statement text.

Parameters: - stmt (string): The statement text to use in the FieldDescription.

Returns: - A pgproto3.FieldDescription object initialized with the provided statement text and default values.

func UniqueIndexesVirtualRelationScan

func UniqueIndexesVirtualRelationScan(idToidxs map[string]*distributions.UniqueIndex) *tupleslot.TupleTableSlot

Types

type Operator

type Operator interface {
	Less(l []byte, r []byte) bool
}

*

func SearchSysCacheOperator

func SearchSysCacheOperator(oid int) (Operator, error)

type SortableWithContext

type SortableWithContext struct {
	Data     [][][]byte
	ColIndex int
	Order    int
	Op       Operator
}

func (SortableWithContext) Len

func (a SortableWithContext) Len() int

func (SortableWithContext) Less

func (a SortableWithContext) Less(i, j int) bool

func (SortableWithContext) Swap

func (a SortableWithContext) Swap(i, j int)

type TEXTOperator

type TEXTOperator struct {
}

func (*TEXTOperator) Less

func (t *TEXTOperator) Less(l []byte, r []byte) bool

Jump to

Keyboard shortcuts

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