= 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.
 <p>
 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.
+++
|===

[[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
+++
|===

