package bind

import "github.com/ydb-platform/ydb-go-sdk/v3/internal/bind"

Index

Variables

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 []table.ParameterOption, _ 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, _ *table.QueryParameters, 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,
)

Source Files

auto_declare.go bind.go errors.go numeric_args.go params.go positional_args.go sql_lexer.go table_path_prefix.go

Version
v3.49.1
Published
Aug 3, 2023
Platform
js/wasm
Imports
16 packages
Last checked
2 minutes ago

Tools for package owners.