StatementException
Exception thrown when an error occurs during the parsing, planning, or execution of a SQL statement.
This exception covers various query-related errors such as syntax errors, undefined objects, ambiguous references, and data type mismatches. If the database provides error positioning, this exception will format the original SQL query to visually indicate where the error occurred.
Every reason here is about the statement itself, which is what position is the evidence of: whether the server reported it or the driver's own parser did, there is somewhere in the SQL to point at.
Parameters
The SQL state code returned by the database, if available.
The original error message from the database server, if available.
Constructors
Properties
Where this happened, innermost first, appended to by each layer as the exception unwinds. It is on the base class for the same reason queryContext is: adding to it is the only thing a frame can do to an exception without replacing it, and replacing one costs the type the caller catches on - a ConstraintViolationException restated as something else stops being the failure a retry looks for. A mapper walking a nested composite appends the attribute it was on, a transaction plan the step and parameter it was resolving. Rendered reversed, outermost first, so PATH: step 1 -> parameter 'name' -> map #1 reads from the plan down to the lambda.
The context of the query that resulted in this exception, if applicable.
The categorized reason for the statement failure.
The raw error message received from the database, if applicable.