Documentation
¶
Index ¶
- Constants
- Variables
- func BackendConnectionsVirtualRelationScan(shs []shard.ShardHostCtl) (*tupleslot.TupleTableSlot, error)
- func ClientsVirtualRelationScan(_ context.Context, clients []client.ClientInfo) (*tupleslot.TupleTableSlot, error)
- func FilterRows(tts *tupleslot.TupleTableSlot, where lyx.Node) (*tupleslot.TupleTableSlot, error)
- func FloatOidFD(stmt string) pgproto3.FieldDescription
- func GetVPHeader(stmts ...string) []pgproto3.FieldDescription
- func GroupBy(tts *tupleslot.TupleTableSlot, gb spqrparser.GroupByClause) (*tupleslot.TupleTableSlot, error)
- func HostsVirtualRelationScan(shards []*topology.DataShard, ihc map[string]tsa.CachedCheckResult) *tupleslot.TupleTableSlot
- func InstanceVirtualRelationScan(_ context.Context, ci connmgr.ConnectionMgr) *tupleslot.TupleTableSlot
- func IntOidFD(stmt string) pgproto3.FieldDescription
- func KeyRangeVirtualRelationScan(krs []*kr.KeyRange, locks []string) *tupleslot.TupleTableSlot
- func KeyRangeVirtualRelationScanExtended(krs []*kr.KeyRange, locks []string, dists []*distributions.Distribution) (*tupleslot.TupleTableSlot, error)
- func MatchRow(row [][]byte, nameToIndex map[string]int, condition lyx.Node) (bool, error)
- func MoveTasksVirtualRelationScan(ts map[string]*tasks.MoveTask, dsIDColTypes map[string][]string, ...) (*tupleslot.TupleTableSlot, error)
- func PreparedStatementsVirtualRelationScan(_ context.Context, shs []shard.PreparedStatementsMgrDescriptor) *tupleslot.TupleTableSlot
- func ProcessOrderBy(data [][][]byte, colOrder map[string]int, order lyx.Node) ([][][]byte, error)
- func RedistributeTasksVirtualRelationScan(tasks []*tasks.RedistributeTask) (*tupleslot.TupleTableSlot, error)
- func ReferenceRelationsScan(rrs []*rrelation.ReferenceRelation) *tupleslot.TupleTableSlot
- func RelationsVirtualRelationScan(dsToRels map[string][]*distributions.DistributedRelation) (*tupleslot.TupleTableSlot, error)
- func TSAVirtualRelationScan(cacheEntries map[pool.TsaKey]pool.CachedEntry) *tupleslot.TupleTableSlot
- func TaskGroupBoundsCacheVirtualRelationScan(boundsMap map[string][][][]byte, indexMap map[string]int, ...) (*tupleslot.TupleTableSlot, error)
- func TaskGroupsVirtualRelationScan(groups map[string]*tasks.MoveTaskGroup, ...) *tupleslot.TupleTableSlot
- func TextOidFD(stmt string) pgproto3.FieldDescription
- func UniqueIndexesVirtualRelationScan(idToidxs map[string]*distributions.UniqueIndex) *tupleslot.TupleTableSlot
- type Operator
- type SortableWithContext
- type TEXTOperator
Constants ¶
const ( ASC = iota DESC )
Variables ¶
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 GroupBy ¶
func GroupBy(tts *tupleslot.TupleTableSlot, gb spqrparser.GroupByClause) (*tupleslot.TupleTableSlot, error)
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 ¶
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 PreparedStatementsVirtualRelationScan ¶
func PreparedStatementsVirtualRelationScan(_ context.Context, shs []shard.PreparedStatementsMgrDescriptor) *tupleslot.TupleTableSlot
func ProcessOrderBy ¶
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 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 SortableWithContext ¶
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 {
}