bind

package
v3.42.11-rc3 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMultipleQueryParameters = errors.New("only one query arg *table.QueryParameters allowed")
)

Functions

func GenerateDeclareSection

func GenerateDeclareSection(args []sql.NamedArg) (string, error)

func ToValue

func ToValue(v interface{}) (_ types.Value, err error)

func ToYdbParam

func ToYdbParam(param driver.NamedValue) (table.ParameterOption, error)

Types

type Binding

type Binding func(b *Bindings)

func WithAutoBindParams

func WithAutoBindParams() Binding

func WithTablePathPrefix

func WithTablePathPrefix(tablePathPrefix string) Binding

type Bindings

type Bindings struct {
	TablePathPrefix string
	AllowBindParams bool
}

func (Bindings) Bind

func (b Bindings) Bind(q string, args ...driver.NamedValue) (
	query string, _ *table.QueryParameters, _ error,
)

func (Bindings) Enabled

func (b Bindings) Enabled() bool

type Declare

type Declare struct {
	Name string
	Type string
}

func (Declare) String

func (d Declare) String() string

Jump to

Keyboard shortcuts

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