validateParameters
Validates the parameters in a repository method in the context of a SQL query.
This method checks the compatibility between the parameters declared in a repository method and the named parameters used in the associated SQL query.
Parameters
The SQL query string associated with the repository method.
The repository method declaration (KSFunctionDeclaration
) containing parameters to be validated.
A flag indicating whether the method uses context parameters. If true
, the first parameter (assumed to be the context parameter) is excluded from validation.
Throws
If:
Positional parameters are used in the SQL query.
The number of method parameters does not match the number of named parameters in the SQL query.
Any method parameter is missing a corresponding named parameter in the SQL query.
Any method parameter lacks a name.