Error Codes
SQLSTATE error codes returned by Krishiv SQL operations.
Overview
Krishiv maps SQL errors to standard SQLSTATE codes via the sqlstate_for function in krishiv-sql. Errors carry both a typed SqlError variant and an SQLSTATE string.
SqlError Variants
| Variant | SQLSTATE | Description |
|---|---|---|
EmptyQuery | 42000 | Query was empty or whitespace only. |
EmptyTableName | 42602 | A table name argument was empty. |
Unsupported | 0A000 | SQL feature not available in this release. |
InvalidTableFunction | 42883 | Table function declaration or registration was invalid. |
DataFusion | 42000 | DataFusion returned an error (message preserved). |
Optimizer | 42000 | Krishiv plan optimizer failed. |
AccessDenied | 42501 | Query blocked by auth or policy hook. |
OperationCancelled | 57014 | Query was cancelled by the caller. |
Timeout | 57014 | Query exceeded its configured execution timeout. |
SQL Feature Matrix
The feature_matrix() function in krishiv-sql::grammar returns the full list of SQL features with their implementation status (Available, Preview, Experimental, NotPlanned). Use features_by_status() to filter by status or features_for_category() to filter by category.