handleLanguageSQLAs handles parsing SQL definition strings in both CREATE FUNCTION and CREATE PROCEDURE and returns converted the sql statements into vitess statements.
(definition string, params []pgnodes.RoutineParam)
| 208 | // handleLanguageSQLAs handles parsing SQL definition strings in both CREATE FUNCTION and CREATE PROCEDURE |
| 209 | // and returns converted the sql statements into vitess statements. |
| 210 | func handleLanguageSQLAs(definition string, params []pgnodes.RoutineParam) (string, []vitess.Statement, error) { |
| 211 | stmts, err := parser.Parse(definition) |
| 212 | if err != nil { |
| 213 | return "", nil, err |
| 214 | } |
| 215 | |
| 216 | return convertSQLStmts(stmts, params) |
| 217 | } |
| 218 | |
| 219 | // convertSQLStmts takes parser.Statements and routine parameters and |
| 220 | // returns converted to string representation and vitess statements. |
no test coverage detected