SqlFunctionExprExtensions
Class to provide extension methods for the SqlFunctionExpr AST
CastArgument
Description
Creates a copy of the current SqlFunctionExpr with the argument at the given index casted to the given type.
Parameters
node: The current SqlFunctionExpr.
index: The index of the argument to cast.
type: The type to use in the casting.
Returns
A new SqlFunctionExpr with the same name but with the specified argument casted.
CastArguments
Description
Creates a copy of the current SqlFunctionExpr with the arguments at the given indexes casted to the given types. Assumes indexes are within bounds of the argument list.
Parameters
node: The current SqlFunctionExpr.
indexes: The array of indexes of arguments to cast.
type: The array of types to cast each arguments.
Returns
A new SqlFunctionExpr with the same name but with arguments casted.
GetFunctionName
Description
Gets the name of the function as a string
Parameters
node: The current SqlFunctionExpr.
Returns
The name of the function as a string
RemoveArguments
Description
Creates a copy of the current SqlFunctionExpr without the specified arguments.
Parameters
node: The current SqlFunctionExpr.
indexesToRemove: 0-based indexes of argument to remove.
Returns
A new SqlFunctionExpr without the specified arguments.
RenameFunction
Description
Creates a new SqlFunctionExpr with the given new name. Keeps the same arguments.
Parameters
node: The current SqlFunctionExpr.
newFunctionName: The new name for the function
Returns
A new SqlFunctionExpr with the given new name.
Last updated