MCPcopy
hub / github.com/sqlc-dev/sqlc / convertBoolNode

Method convertBoolNode

internal/engine/sqlite/convert.go:788–804  ·  view source on GitHub ↗
(n *parser.Expr_boolContext)

Source from the content-addressed store, hash-verified

786}
787
788func (c *cc) convertBoolNode(n *parser.Expr_boolContext) ast.Node {
789 var op ast.BoolExprType
790 if n.AND_() != nil {
791 op = ast.BoolExprTypeAnd
792 } else if n.OR_() != nil {
793 op = ast.BoolExprTypeOr
794 }
795 return &ast.BoolExpr{
796 Boolop: op,
797 Args: &ast.List{
798 Items: []ast.Node{
799 c.convert(n.Expr(0)),
800 c.convert(n.Expr(1)),
801 },
802 },
803 }
804}
805
806func (c *cc) convertUnaryExpr(n *parser.Expr_unaryContext) ast.Node {
807 op := n.Unary_operator()

Callers 1

convertMethod · 0.95

Calls 4

convertMethod · 0.95
AND_Method · 0.65
OR_Method · 0.65
ExprMethod · 0.65

Tested by

no test coverage detected