contextimpl

package
v1.1.0-beta.0...-a878e1f Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExprCtxExtendedImpl

type ExprCtxExtendedImpl struct {
	*SessionEvalContext
	// contains filtered or unexported fields
}

ExprCtxExtendedImpl extends the sessionctx.Context to implement `expression.BuildContext`

func NewExprExtendedImpl

func NewExprExtendedImpl(sctx sessionctx.Context) *ExprCtxExtendedImpl

NewExprExtendedImpl creates a new ExprCtxExtendedImpl.

func (*ExprCtxExtendedImpl) GetBlockEncryptionMode

func (ctx *ExprCtxExtendedImpl) GetBlockEncryptionMode() string

GetBlockEncryptionMode returns the variable block_encryption_mode

func (*ExprCtxExtendedImpl) GetCharsetInfo

func (ctx *ExprCtxExtendedImpl) GetCharsetInfo() (string, string)

GetCharsetInfo gets charset and collation for current context.

func (*ExprCtxExtendedImpl) GetDefaultCollationForUTF8MB4

func (ctx *ExprCtxExtendedImpl) GetDefaultCollationForUTF8MB4() string

GetDefaultCollationForUTF8MB4 returns the default collation of UTF8MB4.

func (*ExprCtxExtendedImpl) GetEvalCtx

func (ctx *ExprCtxExtendedImpl) GetEvalCtx() exprctx.EvalContext

GetEvalCtx returns the EvalContext.

func (*ExprCtxExtendedImpl) GetGroupConcatMaxLen

func (ctx *ExprCtxExtendedImpl) GetGroupConcatMaxLen() uint64

GetGroupConcatMaxLen returns the value of the 'group_concat_max_len' system variable.

func (*ExprCtxExtendedImpl) GetNoopFuncsMode

func (ctx *ExprCtxExtendedImpl) GetNoopFuncsMode() int

GetNoopFuncsMode returns the noop function mode: OFF/ON/WARN values as 0/1/2.

func (*ExprCtxExtendedImpl) GetSysdateIsNow

func (ctx *ExprCtxExtendedImpl) GetSysdateIsNow() bool

GetSysdateIsNow returns a bool to determine whether Sysdate is an alias of Now function. It is the value of variable `tidb_sysdate_is_now`.

func (*ExprCtxExtendedImpl) GetWindowingUseHighPrecision

func (ctx *ExprCtxExtendedImpl) GetWindowingUseHighPrecision() bool

GetWindowingUseHighPrecision determines whether to compute window operations without loss of precision. see https://dev.mysql.com/doc/refman/8.0/en/window-function-optimization.html for more details.

func (*ExprCtxExtendedImpl) IsUseCache

func (ctx *ExprCtxExtendedImpl) IsUseCache() bool

IsUseCache indicates whether to cache the build expression in plan cache. If SetSkipPlanCache is invoked, it should return false.

func (*ExprCtxExtendedImpl) Rng

Rng is used to generate random values.

func (*ExprCtxExtendedImpl) SetSkipPlanCache

func (ctx *ExprCtxExtendedImpl) SetSkipPlanCache(reason error)

SetSkipPlanCache sets to skip the plan cache and records the reason.

type SessionEvalContext

type SessionEvalContext struct {
	// contains filtered or unexported fields
}

SessionEvalContext implements the `expression.EvalContext` interface to provide evaluation context in session.

func NewSessionEvalContext

func NewSessionEvalContext(sctx sessionctx.Context) *SessionEvalContext

NewSessionEvalContext creates a new SessionEvalContext.

func (*SessionEvalContext) AppendWarning

func (ctx *SessionEvalContext) AppendWarning(err error)

AppendWarning append warnings to the context.

func (*SessionEvalContext) CtxID

func (ctx *SessionEvalContext) CtxID() uint64

CtxID returns the context id.

func (*SessionEvalContext) CurrentDB

func (ctx *SessionEvalContext) CurrentDB() string

CurrentDB returns the current database name

func (*SessionEvalContext) CurrentTime

func (ctx *SessionEvalContext) CurrentTime() (time.Time, error)

CurrentTime returns the current time

func (*SessionEvalContext) ErrCtx

func (ctx *SessionEvalContext) ErrCtx() errctx.Context

ErrCtx returns the errctx.Context

func (*SessionEvalContext) GetDefaultWeekFormatMode

func (ctx *SessionEvalContext) GetDefaultWeekFormatMode() string

GetDefaultWeekFormatMode returns the value of the 'default_week_format' system variable.

func (*SessionEvalContext) GetDivPrecisionIncrement

func (ctx *SessionEvalContext) GetDivPrecisionIncrement() int

GetDivPrecisionIncrement returns the specified value of DivPrecisionIncrement.

func (*SessionEvalContext) GetMaxAllowedPacket

func (ctx *SessionEvalContext) GetMaxAllowedPacket() uint64

GetMaxAllowedPacket returns the value of the 'max_allowed_packet' system variable.

func (*SessionEvalContext) GetOptionalPropProvider

GetOptionalPropProvider gets the optional property provider by key

func (*SessionEvalContext) GetOptionalPropSet

func (ctx *SessionEvalContext) GetOptionalPropSet() exprctx.OptionalEvalPropKeySet

GetOptionalPropSet gets the optional property set from context

func (*SessionEvalContext) GetTiDBRedactLog

func (ctx *SessionEvalContext) GetTiDBRedactLog() string

GetTiDBRedactLog returns the value of the 'tidb_redact_log' system variable.

func (*SessionEvalContext) Location

func (ctx *SessionEvalContext) Location() *time.Location

Location returns the timezone info

func (*SessionEvalContext) RequestDynamicVerification

func (ctx *SessionEvalContext) RequestDynamicVerification(privName string, grantable bool) bool

RequestDynamicVerification verifies user privilege for a DYNAMIC privilege.

func (*SessionEvalContext) RequestVerification

func (ctx *SessionEvalContext) RequestVerification(db, table, column string, priv mysql.PrivilegeType) bool

RequestVerification verifies user privilege

func (*SessionEvalContext) SQLMode

func (ctx *SessionEvalContext) SQLMode() mysql.SQLMode

SQLMode returns the sql mode

func (*SessionEvalContext) Sctx

Sctx returns the innert session context

func (*SessionEvalContext) TruncateWarnings

func (ctx *SessionEvalContext) TruncateWarnings(start int) []stmtctx.SQLWarn

TruncateWarnings truncates warnings begin from start and returns the truncated warnings.

func (*SessionEvalContext) TypeCtx

func (ctx *SessionEvalContext) TypeCtx() types.Context

TypeCtx returns the types.Context

func (*SessionEvalContext) WarningCount

func (ctx *SessionEvalContext) WarningCount() int

WarningCount gets warning count.

Jump to

Keyboard shortcuts

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