postgres.ql
The result of a database operation that retrieves data.
| Constructor | Description |
|---|---|
| Result(errorCode, value, message) |
| Function | Description |
|---|---|
| static fun errorResult(errorCode, message) | Create a new error result. |
| static fun successResult(value) | Create a new success result. |
| fun getValue() | Gets the value from the internal optional of the result. |
| fun isSuccess() | Checks if the result is successful. |
| fun toString() |
| Field | Description |
|---|---|
| int errorCode | The error code of the result, 0 if success Values: 0: Success 1: No rows returned 10: SQL Exception 98: Timeout 99: Database disconnected |
| Optional value | The value of the result, present if the operation was a success. |
| string message | The error message, if |
Create a new error result.
The error result
Gets the value from the internal optional of the result.
Checks if the result is successful.
If the result is successful
<No description provided>