sqlstmt

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReleaseStmt added in v1.1.0

func ReleaseStmt(x *Statement)

ReleaseStmt :

Types

type BuildStatementFunc

type BuildStatementFunc func(stmt Stmt, it interface{}) error

BuildStatementFunc :

type Formatter

type Formatter interface {
	Format(it interface{}) string
	Var(i int) string
}

Formatter :

type Statement

type Statement struct {
	strings.Builder
	// contains filtered or unexported fields
}

Statement :

func AcquireStmt added in v1.1.0

func AcquireStmt(fmt Formatter) *Statement

AcquireStmt :

func NewStatement

func NewStatement(fmt Formatter) (sm *Statement)

NewStatement :

func (*Statement) AppendArgs

func (sm *Statement) AppendArgs(args ...interface{})

AppendArgs :

func (*Statement) Args

func (sm *Statement) Args() []interface{}

Args :

func (*Statement) Format

func (sm *Statement) Format(state fmt.State, verb rune)

Format :

func (*Statement) Reset added in v1.1.0

func (sm *Statement) Reset()

Reset : implement resetter as strings.Builer

func (*Statement) StartTimer

func (sm *Statement) StartTimer()

StartTimer :

func (*Statement) StopTimer

func (sm *Statement) StopTimer()

StopTimer :

func (*Statement) TimeElapsed

func (sm *Statement) TimeElapsed() time.Duration

TimeElapsed :

type StatementBuilder

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

StatementBuilder :

func NewStatementBuilder

func NewStatementBuilder() *StatementBuilder

NewStatementBuilder :

func (*StatementBuilder) BuildStatement

func (sb *StatementBuilder) BuildStatement(stmt Stmt, it interface{}) error

BuildStatement :

func (*StatementBuilder) LookupBuilder

func (sb *StatementBuilder) LookupBuilder(t reflect.Type) (blr BuildStatementFunc, ok bool)

LookupBuilder :

func (*StatementBuilder) SetBuilder

func (sb *StatementBuilder) SetBuilder(it interface{}, p BuildStatementFunc)

SetBuilder :

type Stmt added in v1.1.0

type Stmt interface {
	io.StringWriter
	io.ByteWriter
	fmt.Stringer
	Args() []interface{}
	AppendArgs(args ...interface{})
}

Stmt :

Jump to

Keyboard shortcuts

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