GetFunction returns the compiled function with the given name and parameters. Returns false if the function could not be found.
(ctx *sql.Context, functionName string, params ...sql.Expression)
| 26 | // GetFunction returns the compiled function with the given name and parameters. Returns false if the function could not |
| 27 | // be found. |
| 28 | func GetFunction(ctx *sql.Context, functionName string, params ...sql.Expression) (*CompiledFunction, bool, error) { |
| 29 | if createFunc, ok := compiledCatalog[functionName]; ok { |
| 30 | expr, err := createFunc(ctx, params...) |
| 31 | if err != nil { |
| 32 | return nil, false, err |
| 33 | } |
| 34 | return expr.(*CompiledFunction), true, nil |
| 35 | } |
| 36 | return nil, false, nil |
| 37 | } |
| 38 | |
| 39 | // dummyExpression is a simple expression that exists solely to capture type information for a parameter. This is used |
| 40 | // exclusively by the getQuickFunctionForTypes function. |
no outgoing calls
no test coverage detected