MCPcopy Index your code
hub / github.com/ent/ent / evalExpr

Function evalExpr

dialect/sql/sqlgraph/entql.go:161–169  ·  view source on GitHub ↗

evalExpr evaluates the entql expression and returns a new SQL predicate to be applied on the database.

(context *Node, selector *sql.Selector, expr entql.Expr)

Source from the content-addressed store, hash-verified

159
160// evalExpr evaluates the entql expression and returns a new SQL predicate to be applied on the database.
161func evalExpr(context *Node, selector *sql.Selector, expr entql.Expr) (p *sql.Predicate, err error) {
162 ex := &state{
163 context: context,
164 selector: selector,
165 }
166 defer catch(&err)
167 p = ex.evalExpr(expr)
168 return
169}
170
171// evalExpr evaluates any expression.
172func (e *state) evalExpr(expr entql.Expr) *sql.Predicate {

Callers 2

EvalPMethod · 0.85
evalEdgeMethod · 0.85

Calls 2

evalExprMethod · 0.95
catchFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…