MCPcopy Create free account
hub / github.com/araddon/qlbridge / Expr

Method Expr

expr/node.go:1345–1354  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1343 }
1344}
1345func (m *BinaryNode) Expr() *Expr {
1346 fe := &Expr{Op: strings.ToLower(m.Operator.V)}
1347 if len(m.Args) > 0 {
1348 fe.Args = ExprsFromNodes(m.Args)
1349 }
1350 if m.negated {
1351 return &Expr{Op: "not", Args: []*Expr{fe}}
1352 }
1353 return fe
1354}
1355func (m *BinaryNode) FromExpr(e *Expr) error {
1356 if e.Op == "" {
1357 return fmt.Errorf("unrecognized BinaryNode")

Callers

nothing calls this directly

Calls 1

ExprsFromNodesFunction · 0.85

Tested by

no test coverage detected