MCPcopy Create free account
hub / github.com/PostHog/duckgres / booleanComparisonArg

Function booleanComparisonArg

transpiler/transform/boolpredicates.go:300–308  ·  view source on GitHub ↗
(left, right *pg_query.Node)

Source from the content-addressed store, hash-verified

298}
299
300func booleanComparisonArg(left, right *pg_query.Node) (bool, *pg_query.Node, bool) {
301 if value, ok := booleanLiteralValue(right); ok && !isBooleanLiteral(left) {
302 return value, left, true
303 }
304 if value, ok := booleanLiteralValue(left); ok && !isBooleanLiteral(right) {
305 return value, right, true
306 }
307 return false, nil, false
308}
309
310func isBooleanLiteral(node *pg_query.Node) bool {
311 _, ok := booleanLiteralValue(node)

Callers 1

Calls 2

booleanLiteralValueFunction · 0.85
isBooleanLiteralFunction · 0.85

Tested by

no test coverage detected