Result

postgres.ql

The result of a database operation that retrieves data.

Constructor Overview

Constructor Description
Result(errorCode, value, message)

Function Overview

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 Overview

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 errorCode is an error

Constructors

Result(errorCode, value, message) link

Functions

static fun errorResult(errorCode, message) link

Create a new error result.

Params
errorCode ( int )

The error code of the result

message ( string )

The error message

Returns Result

The error result

static fun successResult(value) link

Create a new success result.

Params
value

The value of the result

Returns Result

The success result

fun getValue() link

Gets the value from the internal optional of the result.

fun isSuccess() link

Checks if the result is successful.

Returns boolean

If the result is successful

fun toString() link

<No description provided>