MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / Expr

Interface Expr

pkg/sql/sem/tree/expr.go:28–48  ·  view source on GitHub ↗

Expr represents an expression.

Source from the content-addressed store, hash-verified

26
27// Expr represents an expression.
28type Expr interface {
29 fmt.Stringer
30 NodeFormatter
31 // Walk recursively walks all children using WalkExpr. If any children are changed, it returns a
32 // copy of this node updated to point to the new children. Otherwise the receiver is returned.
33 // For childless (leaf) Exprs, its implementation is empty.
34 Walk(Visitor) Expr
35 // TypeCheck transforms the Expr into a well-typed TypedExpr, which further permits
36 // evaluation and type introspection, or an error if the expression cannot be well-typed.
37 // When type checking is complete, if no error was reported, the expression and all
38 // sub-expressions will be guaranteed to be well-typed, meaning that the method effectively
39 // maps the Expr tree into a TypedExpr tree.
40 //
41 // The ctx parameter defines the context in which to perform type checking.
42 // The desired parameter hints the desired type that the method's caller wants from
43 // the resulting TypedExpr. It is not valid to call TypeCheck with a nil desired
44 // type. Instead, call it with wildcard type types.Any if no specific type is
45 // desired. This restriction is also true of most methods and functions related
46 // to type checking.
47 TypeCheck(ctx *SemaContext, desired *types.T) (TypedExpr, error)
48}
49
50// TypedExpr represents a well-typed expression.
51type TypedExpr interface {

Callers 1

ParseMethod · 0.92

Implementers 15

UnresolvedNamepkg/sql/sem/tree/name_part.go
AndExprpkg/sql/sem/tree/expr.go
OrExprpkg/sql/sem/tree/expr.go
BinaryExprpkg/sql/sem/tree/expr.go
ParenExprpkg/sql/sem/tree/expr.go
Subquerypkg/sql/sem/tree/expr.go
FuncExprpkg/sql/sem/tree/expr.go
ComparisonExprpkg/sql/sem/tree/expr.go
CastExprpkg/sql/sem/tree/expr.go
Arraypkg/sql/sem/tree/expr.go
Tuplepkg/sql/sem/tree/expr.go
CaseExprpkg/sql/sem/tree/expr.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…