Documentation
¶
Index ¶
- Variables
- func RegexFlagsToGoFlags(flags string) (syntax.Flags, error)
- type AnyKey
- type ArrayIndexRange
- type ArrayList
- type Current
- type Filter
- type Jsonpath
- type Key
- type Last
- type Method
- type MethodType
- type Operation
- type OperationType
- type Path
- type Paths
- type Regex
- type Root
- type Scalar
- type ScalarType
- type Wildcard
Constants ¶
This section is empty.
Variables ¶
View Source
var MethodTypeStrings = [...]string{ SizeMethod: "size", TypeMethod: "type", AbsMethod: "abs", FloorMethod: "floor", CeilingMethod: "ceiling", }
View Source
var OperationTypeStrings = [...]string{ OpCompEqual: "==", OpCompNotEqual: "!=", OpCompLess: "<", OpCompLessEqual: "<=", OpCompGreater: ">", OpCompGreaterEqual: ">=", OpLogicalAnd: "&&", OpLogicalOr: "||", OpLogicalNot: "!", OpAdd: "+", OpSub: "-", OpMult: "*", OpDiv: "/", OpMod: "%", OpLikeRegex: "like_regex", OpPlus: "+", OpMinus: "-", OpExists: "exists", OpIsUnknown: "is unknown", OpStartsWith: "starts with", }
Functions ¶
func RegexFlagsToGoFlags ¶
RegexFlagsToGoFlags converts a string of flags from `like_regex` to syntax.Flags, to match the flags provided by Postgres' `like_regex` flag interface.
The following flags are defined in Postgres: - i: case-insensitive - s: dot matches newline - m: ^ and $ match at newlines - x: ignore whitespace in pattern (this flag is defined, but not accepted) - q: no special characters
Types ¶
type ArrayIndexRange ¶
type Method ¶
type Method struct {
Type MethodType
}
type MethodType ¶
type MethodType int
const ( InvalidMethod MethodType = iota SizeMethod TypeMethod AbsMethod FloorMethod CeilingMethod )
type Operation ¶
type Operation struct { Type OperationType Left Path Right Path }
type OperationType ¶
type OperationType int
const ( OpInvalid OperationType = iota OpCompEqual OpCompNotEqual OpCompLess OpCompLessEqual OpCompGreater OpCompGreaterEqual OpLogicalAnd OpLogicalOr OpLogicalNot OpAdd OpSub OpMult OpDiv OpMod OpLikeRegex OpPlus OpMinus OpExists OpIsUnknown OpStartsWith )
type Path ¶
type Path interface { // ToString appends the string representation of the path to the given // strings.Builder. This implementation matches // postgres/src/backend/utils/adt/jsonpath.c:printJsonPathItem(). ToString(sb *strings.Builder, inKey, printBrackets bool) // Validate returns an error if there is a semantic error in the path, and // collects all variable names in a map with a strictly increasing index, // indicating the order of their first appearance. Leaf nodes should generally // return nil. Validate(nestingLevel int, insideArraySubscript bool) error }
type ScalarType ¶
type ScalarType int
const ( ScalarInt ScalarType = iota ScalarFloat ScalarString ScalarBool ScalarNull ScalarVariable )
Click to show internal directories.
Click to hide internal directories.