The properties row, rows, rowSets properties in turn expose the results as beans so the colums can be accessed as properties.
If a single query result set consisted of a single row:
then:
NAME AGE
John 47
If a single query result set consisted of more than a single row:
row.NAME == rows[0].NAME == rowSets[0][0].NAME == 'John'
row.AGE == rows[0].AGE == rowSets[0][0].AGE == 47
then the row property is unavailable and any attempt to access
it would result in an exception, and:
NAME AGE
John 47
Jane 72
If the query results in a multiple query result set:
rows[1].NAME == rowSets[0][1].NAME == 'Jane'
rows[1].AGE == rowSets[0][1].AGE == '72'
NAME AGE
John 47
Jane 72
then the row property and the rows properties are
unavailable and any attempt to access either would result in an exception.
The rowSets property can be used as follows:
FRUIT COLOUR
Apple Green
The case of the properties depends on the database used.
rowSets[0][1].NAME == 'Jane'
rowSets[0][1].AGE == '72'
rowSets[1][0].FRUIT == 'Apple'
rowSets[1][0].COLOUR == 'Green'
Any attempt to access a row or row set that doesn't exist will result in an exception.
empty | |
name | |
row | The result of a query when only one result is expected. |
rowCount | The total number of rows returned by all the queries. |
rowSetCount | The number of rows sets, which will be the same as the number of queries that returned results. |
rowSets | A two dimensional array of all of the rows that each individual query returned. |
rows | An array of the rows when the query set contains only one result returning query. |
to | |
updateCount | The total update count for all queries. |
updateCounts | An Array of the update counts, one element per data modification statement. |
Example 1 | See sql for an example. |
Access | READ_ONLY |
Configured By | ATTRIBUTE |
Access | READ_WRITE |
Access | READ_ONLY |
Required | Read only. |
The result of a query when only one result is expected. If no results were returned by the queries this property is null. If there are more than one row an exception will occur.
Access | READ_ONLY |
Required | Read only. |
The total number of rows returned by all the queries.
Access | READ_ONLY |
Required | Read only. |
The number of rows sets, which will be the same as the number of queries that returned results.
Access | READ_ONLY |
Required | Read only. |
A two dimensional array of all of the rows that each individual query returned.
Access | READ_ONLY |
Required | Read only. |
An array of the rows when the query set contains only one result returning query. If no results were returned by the queries this property is null. If there are more than one result sets an exception will occur.
Configured By | ELEMENT |
Access | READ_WRITE |
Access | READ_ONLY |
Required | Read only. |
The total update count for all queries.
Access | READ_ONLY |
Required | Read only. |
An Array of the update counts, one element per data modification statement.
See sql for an example.