package query

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

Index

Variables

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

Functions

func ToYdb

func ToYdb(args ...interface{}) (params []table.ParameterOption, _ error)

Types

type AutoDeclareBind

type AutoDeclareBind struct{}

func (AutoDeclareBind) RewriteQuery

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

type Bind

type Bind interface {
	RewriteQuery(query string, args ...interface{}) (
		yql string, newArgs []interface{}, _ error,
	)
}

type Bindings

type Bindings []Bind

func (Bindings) RewriteQuery

func (bindings Bindings) RewriteQuery(query string, args ...interface{}) (
	yql string, _ *table.QueryParameters, err error,
)

type NumericArgsBind

type NumericArgsBind struct{}

func (NumericArgsBind) RewriteQuery

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

type PositionalArgsBind

type PositionalArgsBind struct{}

func (PositionalArgsBind) RewriteQuery

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

type TablePathPrefixBind

type TablePathPrefixBind string

func (TablePathPrefixBind) NormalizePath

func (tablePathPrefix TablePathPrefixBind) NormalizePath(folderOrTable string) string

func (TablePathPrefixBind) RewriteQuery

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

Source Files

bind.go bind_auto_declare.go bind_helpers.go bind_numeric_args.go bind_params.go bind_positional_args.go bind_table_path_prefix.go errors.go params.go

Version
v3.44.0-rc2
Published
Apr 4, 2023
Platform
darwin/amd64
Imports
16 packages
Last checked
4 minutes ago

Tools for package owners.