| 603 | } |
| 604 | |
| 605 | func (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 |