sql

package
v0.0.0-...-d4c7a2f Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(stx sessionContext, log timber.Logger, terminateChannel chan bool) error

Types

type DistributedPlanType

type DistributedPlanType int
const (
	DistributedPlanType_NONE     DistributedPlanType = 0
	DistributedPlanType_COMMIT   DistributedPlanType = 1
	DistributedPlanType_ROLLBACK DistributedPlanType = 2
)

type ExpandedPlan

type ExpandedPlan struct {
	Tasks        []ExpandedPlanTask
	Target       PlanTarget
	OutFormats   []pgwirebase.FormatCode
	DistPlanType DistributedPlanType
}

type ExpandedPlanTask

type ExpandedPlanTask struct {
	Query           string
	ReadOnly        bool
	DataNodeShardID uint64
	Type            ast.StmtType
}

type InitialPlan

type InitialPlan struct {
	Types        map[PlanType]InitialPlanTask
	ShardID      uint64
	Target       PlanTarget
	DistPlanType DistributedPlanType
}

type InitialPlanTask

type InitialPlanTask struct {
	Query string
	Type  ast.StmtType
}

type NoahQueryPlanner

type NoahQueryPlanner interface {
	// contains filtered or unexported methods
}

type PlanTarget

type PlanTarget string
const (
	PlanTarget_STANDARD PlanTarget = "STANDARD"
	PlanTarget_INTERNAL PlanTarget = "INTERNAL"
)

type PlanType

type PlanType string
const (
	PlanType_READ      PlanType = "READ"
	PlanType_WRITE     PlanType = "WRITE"
	PlanType_READWRITE PlanType = "READWRITE"
)

type PreparedPortal

type PreparedPortal struct {
	Stmt  *PreparedStatement
	Qargs queryutil.QueryArguments

	// OutFormats contains the requested formats for the output columns.
	OutFormats []pgwirebase.FormatCode
}

PreparedPortal is a PreparedStatement that has been bound with query arguments.

type PreparedStatement

type PreparedStatement struct {
	// Str is the statement string prior to parsing, used to generate
	// error messages. This may be used in
	// the future to present a contextual error message based on location
	// information.
	Str string

	// TypeHints contains the types of the placeholders set by the client. It
	// dictates how input parameters for those placeholders will be parsed. If a
	// placeholder has no type hint, it will be populated during type checking.
	TypeHints queryutil.PlaceholderTypes

	// Statement is the parse tree from pg_query.
	// This is used later to modify the query on the fly.
	Statement ast.Stmt

	Types queryutil.PlaceholderTypes

	Columns []pgproto.FieldDescription

	InferredTypes []types.Type
}

PreparedStatement is a SQL statement that has been parsed and the types of arguments and results have been determined.

type QueryMode

type QueryMode int
const (
	QueryModeStandard QueryMode = 0
	QueryModeExtended           = 1
)

type QueryPlanner

type QueryPlanner interface {
	GetQueryPlan(s *session) (InitialPlan, bool, error)
}

type Session

type Session interface {
	Colony() core.Accessors
	Log() timber.Logger
}

type TransactionQueryPlanner

type TransactionQueryPlanner interface {
	// contains filtered or unexported methods
}

type TransactionState

type TransactionState int
const (
	TransactionState_None   TransactionState = 0
	TransactionState_Active                  = 1
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳