{"modulePath":"github.com/viant/sqlparser","version":"v0.13.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package expr\n\n## Functions\n\n```go\nfunc Identity(node node.Node) node.Node\n```\nIdentity returns ident or selector expr\n\n```go\nfunc NewSelector(name string) node.Node\n```\nNewSelector returns\n\n## Types\n\n```go\ntype Binary struct {\n\tX, Y node.Node\n\tOp   string\n}\n```\nBinary represents binary expr\n\n```go\nfunc NewBinary(x node.Node) *Binary\n```\nNewBinary returns a binary expr\n\n```go\nfunc (b *Binary) HasIdentifier() bool\n```\nHasIdentifier returns true if x or y opperand is identity\n\n```go\nfunc (b *Binary) HasPlaceholder() bool\n```\nHasPlaceholder returns true if x or y operand is placeholder\n\n```go\nfunc (b *Binary) Ident() *Ident\n```\n\n```go\nfunc (b *Binary) Identifier() node.Node\n```\nIdentifier returns an identifier node or nil\n\n```go\nfunc (b *Binary) Normalize() *Binary\n```\n\n```go\nfunc (b *Binary) Parenthesis() *Parenthesis\n```\nParenthesis returns parenthesis\n\n```go\nfunc (b *Binary) Placeholder() *Placeholder\n```\nPlaceholder returns  placeholder\n\n```go\nfunc (b *Binary) Predicate() (node.Node, *Values, error)\n```\nPredicate binary predicate or nil\n\n```go\nfunc (b *Binary) SelectorIdent(root string) *Ident\n```\n\n```go\nfunc (b *Binary) Values() (*Values, error)\n```\nValues returns expression values\n\n```go\nfunc (b *Binary) Walk(fn func(ident node.Node, values *Values, operator, parentOperator string) error) error\n```\n\n```go\ntype Call struct {\n\tX    node.Node\n\tArgs []node.Node\n\tRaw  string\n}\n```\nCall represents a call. Named arguments are \\*Binary nodes with Op \"=\u003e\", a \\*Raw argument name in X, and the argument expression in Y.\n\n```go\ntype Case struct {\n\tX Qualify\n\tY node.Node\n}\n```\nCase represents a WHEN condition (X) and THEN result (Y). A first entry with only X holds a simple CASE selector; an entry with only Y holds ELSE. This keeps all expressions traversable without changing the public Switch or Case field layout.\n\n```go\ntype Collate struct {\n\tX         node.Node\n\tCollation string\n}\n```\nCollate represents collate expression.\n\n```go\ntype FieldAccess struct {\n\tX    node.Node\n\tName string\n}\n```\nFieldAccess selects a field of a computed value, such as an array element.\n\n```go\ntype Ident struct {\n\tName string\n}\n```\nIdent represent an identifier\n\n```go\ntype Literal struct {\n\tValue string\n\tKind  string\n}\n```\nLiteral represents a literal\n\n```go\nfunc NewBoolLiteral(v string) *Literal\n```\nNewBoolLiteral returns bool literal\n\n```go\nfunc NewIntLiteral(v string) *Literal\n```\nNewIntLiteral returns an int literal\n\n```go\nfunc NewNullLiteral(v string) *Literal\n```\nNewNullLiteral returns null literal\n\n```go\nfunc NewNumericLiteral(v string) *Literal\n```\nNewNumericLiteral returns numeric literal\n\n```go\nfunc NewStringLiteral(v string) *Literal\n```\nNewStringLiteral returns string literal\n\n```go\ntype NullTreatment struct {\n\tX    node.Node\n\tMode string\n}\n```\nNullTreatment applies IGNORE NULLS or RESPECT NULLS to an aggregate argument.\n\n```go\ntype Parenthesis struct {\n\tRaw string\n\tX   node.Node\n}\n```\nParenthesis represents parenthesis expr\n\n```go\nfunc NewParenthesis(raw string) *Parenthesis\n```\nNewParenthesis returns a parenthesis expr\n\n```go\ntype Placeholder struct {\n\tName     string\n\tComments string\n}\n```\nPlaceholder represetns a placeholder\n\n```go\nfunc NewPlaceholder(name string) *Placeholder\n```\nNewPlaceholder returns a placeholder\n\n```go\ntype Qualify struct {\n\tX node.Node\n}\n```\nQualify represents qualify node\n\n```go\nfunc NewQualify() *Qualify\n```\nNewQualify returns qualify node\n\n```go\ntype Range struct {\n\tMin node.Node\n\tMax node.Node\n}\n```\nRange represents a range expr\n\n```go\ntype Raw struct {\n\tRaw      string\n\tX        node.Node\n\tUnparsed string\n}\n```\nRaw represetns a raw expr\n\n```go\nfunc NewRaw(raw string) *Raw\n```\nNewRaw create a raw valie\n\n```go\ntype Selector struct {\n\tName       string\n\tExpression string\n\tX          node.Node\n}\n```\nSelector represent identifier selector\n\n```go\ntype Star struct {\n\tX        node.Node\n\tExcept   []string\n\tComments string\n}\n```\nStar represents a star expr\n\n```go\nfunc NewStar(x node.Node, comments string) *Star\n```\nNewStar returns a start expr\n\n```go\ntype Subscript struct {\n\tX     node.Node\n\tIndex node.Node\n}\n```\nSubscript accesses an element of X using an index expression.\n\n```go\ntype Switch struct {\n\tRaw string\n\tIdent\n\tCases []*Case\n}\n```\nSwitch represetns a switch expr\n\n```go\ntype Unary struct {\n\tOp string\n\tX  node.Node\n}\n```\nUnary represents  unary expr\n\n```go\nfunc NewUnary(op string) *Unary\n```\nNewUnary crates an unary expr\n\n```go\ntype Value struct {\n\tPlaceholder bool\n\tRaw         string\n\tValue       interface{}\n\tKind        string\n}\n```\nValue represents predicate value\n\n```go\nfunc NewValue(raw string) (*Value, error)\n```\n\n```go\nfunc (v *Value) AsInt() (int, bool)\n```\n\n```go\ntype Values struct {\n\tIdx int\n\tX   []Value\n}\n```\n\n```go\nfunc NewValues(n node.Node) (*Values, error)\n```\nNewValues creates predicate values\n\n```go\nfunc (v *Values) Values(placeholderProvider func(idx int) interface{}) []interface{}\n```\nValues returns values\n\n```go\ntype Window struct {\n\tX           node.Node\n\tPartitionBy []node.Node\n\tOrderBy     []*WindowOrder\n\tFrame       *WindowFrame\n}\n```\nWindow is a function call with an inline OVER specification.\n\n```go\ntype WindowBound struct {\n\tX    node.Node\n\tKind string\n}\n```\nWindowBound is CURRENT ROW, UNBOUNDED PRECEDING/FOLLOWING, or an offset bound.\n\n```go\ntype WindowFrame struct {\n\tUnit       string\n\tStart, End *WindowBound\n}\n```\nWindowFrame represents ROWS or RANGE, with an optional BETWEEN end bound.\n\n```go\ntype WindowOrder struct {\n\tX         node.Node\n\tDirection string\n}\n```\nWindowOrder is an expression and its optional ASC/DESC direction.\n\n","path":"github.com/viant/sqlparser/expr","name":"expr","synopsis":"","isRedistributable":true}
