= Cheatsheets

[[ResultSet]]
== ResultSet

++++
Represents the results of a SQL query.
<p>
It contains a list for the column names of the results, and a list of <code>JsonArray</code> - one for each row of the
results.
++++
'''

[cols=">25%,25%,50%"]
[frame="topbot"]
|===
^|Name | Type ^| Description
|[[columnNames]]`@columnNames`|`Array of String`|+++
Get the column names
+++
|[[next]]`@next`|`link:dataobjects.html#ResultSet[ResultSet]`|+++
Get the next result set
+++
|[[numColumns]]`@numColumns`|`Number (int)`|+++
Return the number of columns in the result set
+++
|[[numRows]]`@numRows`|`Number (int)`|+++
Return the number of rows in the result set
+++
|[[output]]`@output`|`Json array`|+++
Get the registered outputs
+++
|[[results]]`@results`|`Array of Json array`|+++
Get the results
+++
|[[rows]]`@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: <pre>SELECT a, b FROM table</pre> the column names are not required to be: <pre>a</pre> and
<pre>b</pre> and could be in fact <pre>A</pre> and <pre>B</pre>.

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

[[SQLOptions]]
== SQLOptions

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

[cols=">25%,25%,50%"]
[frame="topbot"]
|===
^|Name | Type ^| Description
|[[autoGeneratedKeys]]`@autoGeneratedKeys`|`Boolean`|-
|[[autoGeneratedKeysIndexes]]`@autoGeneratedKeysIndexes`|`Json array`|-
|[[catalog]]`@catalog`|`String`|-
|[[fetchDirection]]`@fetchDirection`|`link:enums.html#FetchDirection[FetchDirection]`|-
|[[fetchSize]]`@fetchSize`|`Number (int)`|-
|[[queryTimeout]]`@queryTimeout`|`Number (int)`|-
|[[readOnly]]`@readOnly`|`Boolean`|-
|[[resultSetConcurrency]]`@resultSetConcurrency`|`link:enums.html#ResultSetConcurrency[ResultSetConcurrency]`|-
|[[resultSetType]]`@resultSetType`|`link:enums.html#ResultSetType[ResultSetType]`|-
|[[schema]]`@schema`|`String`|-
|[[transactionIsolation]]`@transactionIsolation`|`link:enums.html#TransactionIsolation[TransactionIsolation]`|-
|===

[[UpdateResult]]
== UpdateResult

++++
Represents the result of an update/insert/delete operation on the database.
<p>
The number of rows updated is available with link and any generated
keys are available with link.
++++
'''

[cols=">25%,25%,50%"]
[frame="topbot"]
|===
^|Name | Type ^| Description
|[[keys]]`@keys`|`Json array`|+++
Get any generated keys
+++
|[[updated]]`@updated`|`Number (int)`|+++
Get the number of rows updated
+++
|===