executor

package
Version: v0.2.6 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	Close(rollback bool)

	Query(ctx context.Context, result reflection.Object, sql string, params ...interface{}) error

	Exec(ctx context.Context, sql string, params ...interface{}) (common.Result, error)

	Begin() error

	Commit(require bool) error

	Rollback(require bool) error
}

type PrepareExecutor

type PrepareExecutor struct {
	// contains filtered or unexported fields
}

func NewPrepareExecutor

func NewPrepareExecutor(transaction transaction.Transaction) *PrepareExecutor

func (*PrepareExecutor) Begin

func (exec *PrepareExecutor) Begin() error

func (*PrepareExecutor) Close

func (exec *PrepareExecutor) Close(rollback bool)

func (*PrepareExecutor) Commit

func (exec *PrepareExecutor) Commit(require bool) error

func (*PrepareExecutor) Exec

func (exec *PrepareExecutor) Exec(ctx context.Context, sql string, params ...interface{}) (common.Result, error)

func (*PrepareExecutor) Query

func (exec *PrepareExecutor) Query(ctx context.Context, result reflection.Object, sql string, params ...interface{}) error

func (*PrepareExecutor) Rollback

func (exec *PrepareExecutor) Rollback(require bool) error

type SimpleExecutor

type SimpleExecutor struct {
	// contains filtered or unexported fields
}

func NewSimpleExecutor

func NewSimpleExecutor(transaction transaction.Transaction) *SimpleExecutor

func (*SimpleExecutor) Begin

func (exec *SimpleExecutor) Begin() error

func (*SimpleExecutor) Close

func (exec *SimpleExecutor) Close(rollback bool)

func (*SimpleExecutor) Commit

func (exec *SimpleExecutor) Commit(require bool) error

func (*SimpleExecutor) Exec

func (exec *SimpleExecutor) Exec(ctx context.Context, sql string, params ...interface{}) (common.Result, error)

func (*SimpleExecutor) Query

func (exec *SimpleExecutor) Query(ctx context.Context, result reflection.Object, sql string, params ...interface{}) error

func (*SimpleExecutor) Rollback

func (exec *SimpleExecutor) Rollback(require bool) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL