varsutil

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGlobalSystemVar

func GetGlobalSystemVar(s *variable.SessionVars, key string) (string, error)

GetGlobalSystemVar gets a global system variable.

func GetScopeNoneSystemVar added in v1.0.4

func GetScopeNoneSystemVar(key string) (string, bool, error)

GetScopeNoneSystemVar checks the validation of `key`, and return the default value if its scope is `ScopeNone`.

func GetSessionOnlySysVars added in v1.0.4

func GetSessionOnlySysVars(s *variable.SessionVars, key string) (string, bool, error)

GetSessionOnlySysVars get the default value defined in code for session only variable. The return bool value indicates whether it's a session only variable.

func GetSessionSystemVar

func GetSessionSystemVar(s *variable.SessionVars, key string) (string, error)

GetSessionSystemVar gets a system variable. If it is a session only variable, use the default value defined in code. Returns error if there is no such variable.

func GoTimeToTS

func GoTimeToTS(t time.Time) uint64

GoTimeToTS converts a Go time to uint64 timestamp.

func SetSessionSystemVar

func SetSessionSystemVar(vars *variable.SessionVars, name string, value types.Datum) error

SetSessionSystemVar sets system variable and updates SessionVars states.

Types

This section is empty.

Jump to

Keyboard shortcuts

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