Documentation ¶
Index ¶
- type InternalExecResult
- type InternalExecutor
- type OptsBuilder
- func (s *OptsBuilder) AccountId(id uint32) *OptsBuilder
- func (s *OptsBuilder) Database(db string) *OptsBuilder
- func (s *OptsBuilder) DefaultRoleId(id uint32) *OptsBuilder
- func (s *OptsBuilder) Finish() SessionOverrideOptions
- func (s *OptsBuilder) Internal(b bool) *OptsBuilder
- func (s *OptsBuilder) UserId(id uint32) *OptsBuilder
- func (s *OptsBuilder) Username(name string) *OptsBuilder
- type SessionOverrideOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InternalExecResult ¶ added in v0.6.0
type InternalExecResult interface { Error() error ColumnCount() uint64 Column(context.Context, uint64) (string, uint8, bool, error) // type refer: pkg/defines/type.go & func convertEngineTypeToMysqlType RowCount() uint64 Row(context.Context, uint64) ([]interface{}, error) Value(context.Context, uint64, uint64) (interface{}, error) ValueByName(context.Context, uint64, string) (interface{}, error) StringValueByName(context.Context, uint64, string) (string, error) Float64ValueByName(context.Context, uint64, string) (float64, error) }
type InternalExecutor ¶
type InternalExecutor interface { // exec sql without returning results set Exec(context.Context, string, SessionOverrideOptions) error // exec sql and return results set Query(context.Context, string, SessionOverrideOptions) InternalExecResult // override session for the executor scope ApplySessionOverride(SessionOverrideOptions) }
type OptsBuilder ¶
type OptsBuilder struct {
// contains filtered or unexported fields
}
func NewOptsBuilder ¶
func NewOptsBuilder() *OptsBuilder
func (*OptsBuilder) AccountId ¶ added in v1.0.0
func (s *OptsBuilder) AccountId(id uint32) *OptsBuilder
func (*OptsBuilder) Database ¶
func (s *OptsBuilder) Database(db string) *OptsBuilder
func (*OptsBuilder) DefaultRoleId ¶ added in v1.0.0
func (s *OptsBuilder) DefaultRoleId(id uint32) *OptsBuilder
func (*OptsBuilder) Finish ¶
func (s *OptsBuilder) Finish() SessionOverrideOptions
func (*OptsBuilder) Internal ¶
func (s *OptsBuilder) Internal(b bool) *OptsBuilder
func (*OptsBuilder) UserId ¶ added in v1.0.0
func (s *OptsBuilder) UserId(id uint32) *OptsBuilder
func (*OptsBuilder) Username ¶
func (s *OptsBuilder) Username(name string) *OptsBuilder
Click to show internal directories.
Click to hide internal directories.