validateQuerySyntax

Validates the syntax of an SQL query by attempting to parse it. If the SQL syntax is invalid, an error is thrown with a message indicating the issue.

Parameters

fn

A string representing the context or identifier of the function where the validation is being invoked. This is used for naming the source of the error in the error message.

sql

The SQL query string to be validated for correct syntax.