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()

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

postgres:postgres.ql
static fun successResult(value) link

Create a new success result.

Params
value

The value of the result

Returns Result

The success result

postgres:postgres.ql
fun getValue() link

Gets the value from the internal optional of the result.

postgres:postgres.ql
fun isSuccess() link

Checks if the result is successful.

Returns boolean

If the result is successful

postgres:postgres.ql
fun toString() link

postgres:postgres.ql