queryexpr

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InvalidArgumentNumberError

type InvalidArgumentNumberError struct {
	Name     string
	Expected int
	Actual   int
}

func (InvalidArgumentNumberError) Error

type InvalidArgumentTypeError

type InvalidArgumentTypeError struct {
	Name     string
	ArgIndex int
	Expected string
}

func (InvalidArgumentTypeError) Error

func (e InvalidArgumentTypeError) Error() string

type InvalidTypeForBetweenError

type InvalidTypeForBetweenError struct {
	TypeName string
}

func (InvalidTypeForBetweenError) Error

type InvalidTypeForIsError

type InvalidTypeForIsError struct {
	TypeName string
}

func (InvalidTypeForIsError) Error

func (n InvalidTypeForIsError) Error() string

type MissingPlaceholderError

type MissingPlaceholderError struct {
	Placeholder string
}

func (MissingPlaceholderError) Error

func (e MissingPlaceholderError) Error() string

type MultiplePlansWithIndexError

type MultiplePlansWithIndexError struct {
	PossibleIndices []string
}

func (MultiplePlansWithIndexError) Error

type NameNotFoundError

type NameNotFoundError string

NameNotFoundError is returned if the given name cannot be found

func (NameNotFoundError) Error

func (n NameNotFoundError) Error() string

type NoPlausiblePlanWithIndexError

type NoPlausiblePlanWithIndexError struct {
	PreferredIndex  string
	PossibleIndices []string
}

func (NoPlausiblePlanWithIndexError) Error

type NodeCannotBeConvertedToQueryError

type NodeCannotBeConvertedToQueryError struct{}

func (NodeCannotBeConvertedToQueryError) Error

type OperandNotANameError

type OperandNotANameError string

func (OperandNotANameError) Error

func (n OperandNotANameError) Error() string

type OperandNotAnOperandError

type OperandNotAnOperandError struct{}

func (OperandNotAnOperandError) Error

func (n OperandNotAnOperandError) Error() string

type PathNotSettableError

type PathNotSettableError struct {
}

func (PathNotSettableError) Error

func (e PathNotSettableError) Error() string

type QueryExpr

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

func DeserializeFrom

func DeserializeFrom(r io.Reader) (*QueryExpr, error)

func Parse

func Parse(expr string) (*QueryExpr, error)

func (*QueryExpr) DeleteAttribute

func (md *QueryExpr) DeleteAttribute(item models.Item) error

func (*QueryExpr) Equal

func (md *QueryExpr) Equal(other *QueryExpr) bool

Equal returns true if a query expression is equal another one. Two query expressions are equal if they have the same query and placeholder values. This is resistant to map ordering.

func (*QueryExpr) EvalItem

func (md *QueryExpr) EvalItem(item models.Item) (types.AttributeValue, error)

func (*QueryExpr) HashCode

func (md *QueryExpr) HashCode() uint64

HashCode will return a hash-code for this query expression. This is to assist with determine whether two queries are the same. If two queries have the same hash code, they may be equals (this will need to be confirmed by calling Equal()). Otherwise, the queries cannot be equals.

func (*QueryExpr) IsModifiablePath

func (md *QueryExpr) IsModifiablePath(item models.Item) bool

func (*QueryExpr) NameParam

func (md *QueryExpr) NameParam(name string) (string, bool)

func (*QueryExpr) Plan

func (md *QueryExpr) Plan(tableInfo *models.TableInfo) (*models.QueryExecutionPlan, error)

func (*QueryExpr) SerializeTo

func (md *QueryExpr) SerializeTo(w io.Writer) error

func (*QueryExpr) SerializeToBytes

func (md *QueryExpr) SerializeToBytes() ([]byte, error)

func (*QueryExpr) SetEvalItem

func (md *QueryExpr) SetEvalItem(item models.Item, newValue types.AttributeValue) error

func (*QueryExpr) String

func (md *QueryExpr) String() string

func (*QueryExpr) ValueParam

func (md *QueryExpr) ValueParam(name string) (types.AttributeValue, bool)

func (*QueryExpr) ValueParamOrNil

func (md *QueryExpr) ValueParamOrNil(name string) types.AttributeValue

func (*QueryExpr) WithCurrentResultSet added in v0.4.0

func (md *QueryExpr) WithCurrentResultSet(currentResultSet *models.ResultSet) *QueryExpr

func (*QueryExpr) WithIndex

func (md *QueryExpr) WithIndex(index string) *QueryExpr

func (*QueryExpr) WithNameParams

func (md *QueryExpr) WithNameParams(value map[string]string) *QueryExpr

func (*QueryExpr) WithValueParams

func (md *QueryExpr) WithValueParams(value map[string]types.AttributeValue) *QueryExpr

type UnrecognisedFunctionError

type UnrecognisedFunctionError struct {
	Name string
}

func (UnrecognisedFunctionError) Error

type ValueMustBeLiteralError

type ValueMustBeLiteralError struct{}

func (ValueMustBeLiteralError) Error

func (n ValueMustBeLiteralError) Error() string

type ValueMustBeStringError

type ValueMustBeStringError struct{}

func (ValueMustBeStringError) Error

func (n ValueMustBeStringError) Error() string

type ValueNotAListError

type ValueNotAListError []string

ValueNotAListError is return if the given name is not a map

func (ValueNotAListError) Error

func (n ValueNotAListError) Error() string

type ValueNotAMapError

type ValueNotAMapError []string

ValueNotAMapError is return if the given name is not a map

func (ValueNotAMapError) Error

func (n ValueNotAMapError) Error() string

type ValueNotConvertableToString

type ValueNotConvertableToString struct {
	Val types.AttributeValue
}

ValueNotConvertableToString indicates that a value is not convertable to a string

func (ValueNotConvertableToString) Error

type ValueNotUsableAsASubref

type ValueNotUsableAsASubref struct {
}

func (ValueNotUsableAsASubref) Error

func (e ValueNotUsableAsASubref) Error() string

type ValuesNotComparable

type ValuesNotComparable struct {
	Left, Right types.AttributeValue
}

ValuesNotComparable indicates that two values are not comparable

func (ValuesNotComparable) Error

func (n ValuesNotComparable) Error() string

type ValuesNotInnableError

type ValuesNotInnableError struct {
	Val types.AttributeValue
}

ValuesNotInnable indicates that a values cannot be used on the right side of an in

func (ValuesNotInnableError) Error

func (n ValuesNotInnableError) Error() string

Jump to

Keyboard shortcuts

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