IncompleteStatementError creates an E2005 error when the parser reaches the end of input before a SQL statement is complete. This typically means a clause or closing parenthesis is missing. Parameters: - location: Line/column at end-of-input where parsing stopped - sql: Full SQL source used to gene
(location models.Location, sql string)
| 199 | // - location: Line/column at end-of-input where parsing stopped |
| 200 | // - sql: Full SQL source used to generate visual context |
| 201 | func IncompleteStatementError(location models.Location, sql string) *Error { |
| 202 | return NewError( |
| 203 | ErrCodeIncompleteStatement, |
| 204 | "incomplete SQL statement", |
| 205 | location, |
| 206 | ).WithContext(sql, 1).WithHint("Complete the SQL statement or check for missing clauses") |
| 207 | } |
| 208 | |
| 209 | // WrapError creates a structured error that wraps an existing cause error. |
| 210 | // Use this to add error code, location, and SQL context to low-level errors |