# Cheatsheets

## 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
`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.

## 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