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

Method getOperatorName

transpiler/transform/operators.go:605–617  ·  view source on GitHub ↗
(aexpr *pg_query.A_Expr)

Source from the content-addressed store, hash-verified

603}
604
605func (t *OperatorTransform) getOperatorName(aexpr *pg_query.A_Expr) string {
606 if aexpr == nil || len(aexpr.Name) == 0 {
607 return ""
608 }
609
610 // Get the last element (operator name, ignoring schema prefix)
611 for i := len(aexpr.Name) - 1; i >= 0; i-- {
612 if str := aexpr.Name[i].GetString_(); str != nil {
613 return str.Sval
614 }
615 }
616 return ""
617}
618
619// createJsonExtractFuncCall creates a json_extract or json_extract_string function call node.
620// This converts -> and ->> operators to explicit function calls to avoid DuckDB's

Callers 1

transformExpressionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected