An SqlResult
is produced whenever a query is
executed using
sqlExecute.execute()
,
PreparedStatement.execute()
,
or Session.runSql()
.
No SqlResult
is produced if
passResultsToClient
is used.
Methods supported by SqlResult
are listed
here:
close()
: Closes the result set. The value returned is undefined.fetchOne()
: Retrieves the nextRow
in the result set.getAffectedItemsCount()
: Retrieves the number of rows affected by the most recent operation.getAutoIncrementValue()
: Retrieves the autogenerated ID used for the most recent insert operation.Calling this method is equivalent to executing
LAST_INSERT_ID()
in the mysql client.getColumnCount()
: Gets the number of columns in the result set.getColumnNames()
: Retrieves the names of the columns in the current result set.getColumns()
: Retrieves the columns metadata in the current result set.getExecutionTime()
: Retrieves the time spent executing this query, to the nearest whole second.getWarnings()
: Retrieves any warnings (as a list ofWarning
objects) raised by the operation most recently executed.getWarningsCount()
: Retrieves the number of warnings raised by the operation last executed.hasData()
: Returnstrue
if the most recently executed statement yielded a result set,false
otherwise.nextResult()
: Moves to the next result set if available. Returnstrue
if the result set is available and contains data.