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

Function operatorName

transpiler/transform/boolpredicates.go:288–298  ·  view source on GitHub ↗
(aexpr *pg_query.A_Expr)

Source from the content-addressed store, hash-verified

286}
287
288func operatorName(aexpr *pg_query.A_Expr) string {
289 if aexpr == nil || len(aexpr.Name) == 0 {
290 return ""
291 }
292 for i := len(aexpr.Name) - 1; i >= 0; i-- {
293 if str := aexpr.Name[i].GetString_(); str != nil {
294 return str.Sval
295 }
296 }
297 return ""
298}
299
300func booleanComparisonArg(left, right *pg_query.Node) (bool, *pg_query.Node, bool) {
301 if value, ok := booleanLiteralValue(right); ok && !isBooleanLiteral(left) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected