stmt

package
v0.0.0-...-7f9930a Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2015 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ShowNone = iota
	ShowEngines
	ShowDatabases
	ShowTables
	ShowColumns
	ShowWarnings
	ShowCharset
)

Show statement types.

Variables

This section is empty.

Functions

func BindExecArgs

func BindExecArgs(ctx context.Context, args []interface{})

BindExecArgs binds executive args to context.

func ClearExecArgs

func ClearExecArgs(ctx context.Context)

ClearExecArgs clears executive args from context.

func GetExecArgs

func GetExecArgs(ctx context.Context) []interface{}

GetExecArgs gets executive args from context.

Types

type Statement

type Statement interface {
	// Explain gets the execution plans.
	Explain(ctx context.Context, w format.Formatter)

	// IsDDL shows whether the statement is an DDL operation.
	IsDDL() bool

	// OriginText gets the origin SQL text.
	OriginText() string

	// SetText sets the executive SQL text.
	SetText(text string)

	// Exec executes SQL and gets a Recordset.
	Exec(ctx context.Context) (rset.Recordset, error)
}

Statement is an interface for SQL execution. NOTE: all Statement implementations must be safe for concurrent using by multiple goroutines. If the Exec method requires any Execution domain local data, they must be held out of the implementing instance.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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