internalExecutor

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

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(uint64) (string, uint8, bool, error) // type refer: pkg/defines/type.go & func convertEngineTypeToMysqlType
	RowCount() uint64
	Row(uint64) ([]interface{}, error)
	Value(uint64, uint64) (interface{}, error)
	ValueByName(uint64, string) (interface{}, error)
	StringValueByName(uint64, string) (string, 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) Database

func (s *OptsBuilder) Database(db string) *OptsBuilder

func (*OptsBuilder) Finish

func (s *OptsBuilder) Finish() SessionOverrideOptions

func (*OptsBuilder) Internal

func (s *OptsBuilder) Internal(b bool) *OptsBuilder

func (*OptsBuilder) Username

func (s *OptsBuilder) Username(name string) *OptsBuilder

type SessionOverrideOptions

type SessionOverrideOptions struct {
	Database   *string
	Username   *string
	IsInternal *bool
}

Jump to

Keyboard shortcuts

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