// GetGlobalStatusVar implements GlobalVarAccessor GetGlobalStatusVar interface. func (c *Context) GetGlobalStatusVar(ctx context.Context, name string) (string, error) { v := variable.GetStatusVar(name) if v == nil { return "", terror.UnknownStatusVar.Gen("unknown status variable: %s", name) } return v.Value, nil }
// SetGlobalStatusVar implements GlobalVarAccessor SetGlobalStatusVar interface. func (c *Context) SetGlobalStatusVar(ctx context.Context, name string, value string) error { v := variable.GetStatusVar(name) if v == nil { return terror.UnknownStatusVar.Gen("unknown status variable: %s", name) } v.Value = value return nil }
// GetGlobalStatusVar implements GlobalVarAccessor.GetGlobalStatusVar interface. func (s *session) GetGlobalStatusVar(ctx context.Context, name string) (string, error) { // TODO: get global status variables from store. v := variable.GetStatusVar(name) if v == nil { return "", terror.UnknownStatusVar.Gen("unknown status variable:%s", name) } return v.Value, nil }
// SetGlobalStatusVar implements GlobalVarAccessor.SetGlobalStatusVar interface. func (s *session) SetGlobalStatusVar(ctx context.Context, name string, value string) error { // TODO: set global status variables from store. v := variable.GetStatusVar(name) if v == nil { return terror.UnknownStatusVar.Gen("unknown status variable:%s", name) } v.Value = value return nil }