bind

package
v3.78.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInconsistentArgs         = errors.New("inconsistent args")
	ErrUnexpectedNumericArgZero = errors.New("unexpected numeric arg $0. Allowed only $1 and greater")
)

Functions

func Params

func Params(args ...interface{}) ([]*params.Parameter, error)

Types

type AutoDeclare

type AutoDeclare struct{}

func (AutoDeclare) RewriteQuery

func (m AutoDeclare) RewriteQuery(query string, args ...interface{}) (
	yql string, newArgs []interface{}, err error,
)

type Bind

type Bind interface {
	RewriteQuery(sql string, args ...interface{}) (
		yql string, newArgs []interface{}, _ error,
	)
	// contains filtered or unexported methods
}

func Sort

func Sort(bindings []Bind) []Bind

type Bindings

type Bindings []Bind

func (Bindings) RewriteQuery

func (bindings Bindings) RewriteQuery(query string, args ...interface{}) (
	yql string, parameters []*params.Parameter, err error,
)

type NumericArgs

type NumericArgs struct{}

func (NumericArgs) RewriteQuery

func (m NumericArgs) RewriteQuery(sql string, args ...interface{}) (yql string, newArgs []interface{}, err error)

type PositionalArgs

type PositionalArgs struct{}

func (PositionalArgs) RewriteQuery

func (m PositionalArgs) RewriteQuery(sql string, args ...interface{}) (
	yql string, newArgs []interface{}, err error,
)

type TablePathPrefix

type TablePathPrefix string

func (TablePathPrefix) NormalizePath

func (tablePathPrefix TablePathPrefix) NormalizePath(folderOrTable string) string

func (TablePathPrefix) RewriteQuery

func (tablePathPrefix TablePathPrefix) RewriteQuery(query string, args ...interface{}) (
	yql string, newArgs []interface{}, err error,
)

Jump to

Keyboard shortcuts

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