Documentation ¶
Index ¶
- type ExprCtxExtendedImpl
- func (ctx *ExprCtxExtendedImpl) GetBlockEncryptionMode() string
- func (ctx *ExprCtxExtendedImpl) GetCharsetInfo() (string, string)
- func (ctx *ExprCtxExtendedImpl) GetDefaultCollationForUTF8MB4() string
- func (ctx *ExprCtxExtendedImpl) GetEvalCtx() exprctx.EvalContext
- func (ctx *ExprCtxExtendedImpl) GetGroupConcatMaxLen() uint64
- func (ctx *ExprCtxExtendedImpl) GetNoopFuncsMode() int
- func (ctx *ExprCtxExtendedImpl) GetSysdateIsNow() bool
- func (ctx *ExprCtxExtendedImpl) GetWindowingUseHighPrecision() bool
- func (ctx *ExprCtxExtendedImpl) IsUseCache() bool
- func (ctx *ExprCtxExtendedImpl) Rng() *mathutil.MysqlRng
- func (ctx *ExprCtxExtendedImpl) SetSkipPlanCache(reason error)
- type SessionEvalContext
- func (ctx *SessionEvalContext) AppendWarning(err error)
- func (ctx *SessionEvalContext) CtxID() uint64
- func (ctx *SessionEvalContext) CurrentDB() string
- func (ctx *SessionEvalContext) CurrentTime() (time.Time, error)
- func (ctx *SessionEvalContext) ErrCtx() errctx.Context
- func (ctx *SessionEvalContext) GetDefaultWeekFormatMode() string
- func (ctx *SessionEvalContext) GetDivPrecisionIncrement() int
- func (ctx *SessionEvalContext) GetMaxAllowedPacket() uint64
- func (ctx *SessionEvalContext) GetOptionalPropProvider(key exprctx.OptionalEvalPropKey) (exprctx.OptionalEvalPropProvider, bool)
- func (ctx *SessionEvalContext) GetOptionalPropSet() exprctx.OptionalEvalPropKeySet
- func (ctx *SessionEvalContext) GetTiDBRedactLog() string
- func (ctx *SessionEvalContext) Location() *time.Location
- func (ctx *SessionEvalContext) RequestDynamicVerification(privName string, grantable bool) bool
- func (ctx *SessionEvalContext) RequestVerification(db, table, column string, priv mysql.PrivilegeType) bool
- func (ctx *SessionEvalContext) SQLMode() mysql.SQLMode
- func (ctx *SessionEvalContext) Sctx() sessionctx.Context
- func (ctx *SessionEvalContext) TruncateWarnings(start int) []stmtctx.SQLWarn
- func (ctx *SessionEvalContext) TypeCtx() types.Context
- func (ctx *SessionEvalContext) WarningCount() int
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 ¶
func (ctx *ExprCtxExtendedImpl) Rng() *mathutil.MysqlRng
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 ¶
func (ctx *SessionEvalContext) GetOptionalPropProvider(key exprctx.OptionalEvalPropKey) (exprctx.OptionalEvalPropProvider, bool)
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 ¶
func (ctx *SessionEvalContext) Sctx() sessionctx.Context
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.