Skip to main content
编辑本页

ResultSet

Represents the results of a SQL query.

It contains a list for the column names of the results, and a list of JsonArray - one for each row of the results.


Name

Type

Description

@columnNames

Array of String

Get the column names

@next

ResultSet

Get the next result set

@numColumns

Number (int)

Return the number of columns in the result set

@numRows

Number (int)

Return the number of rows in the result set

@output

Json array

Get the registered outputs

@results

Array of Json array

Get the results

@rows

Array of Json object

Get the rows - each row represented as a JsonObject where the keys are the column names and the values are the column values.

Beware that it's legal for a query result in SQL to contain duplicate column names, in which case one will overwrite the other if using this method. If that's the case use link instead.

Be aware that column names are defined as returned by the database, this means that even if your SQL statement is for example:

SELECT a, b FROM table
the column names are not required to be:
a
and
b
and could be in fact
A
and
B
.

For cases when there is the need for case insentivitity you should see link

SQLOptions

Represents the options one can use to customize the unwrapped connection/statement/resultset types

Name

Type

Description

@autoGeneratedKeys

Boolean

-

@autoGeneratedKeysIndexes

Json array

-

@catalog

String

-

@fetchDirection

FetchDirection

-

@fetchSize

Number (int)

-

@queryTimeout

Number (int)

-

@readOnly

Boolean

-

@resultSetConcurrency

ResultSetConcurrency

-

@resultSetType

ResultSetType

-

@schema

String

-

@transactionIsolation

TransactionIsolation

-

UpdateResult

Represents the result of an update/insert/delete operation on the database.

The number of rows updated is available with link and any generated keys are available with link.


Name

Type

Description

@keys

Json array

Get any generated keys

@updated

Number (int)

Get the number of rows updated