Package com.amazon.rdsdata.client
Class ExecutionResult
java.lang.Object
com.amazon.rdsdata.client.ExecutionResult
-
Method Summary
Modifier and TypeMethodDescriptionWill return the number of records inserted/updated by the query.<T> List<T>Maps the result set retrieved from RDS Data API to the list of instances of the specified class.<T> TmapToSingle(Class<T> mapperClass) Maps the first row from the result set retrieved from RDS Data API to the instance of the specified class.<T> TsingleValue(Class<T> convertToType) Returns the single value from the first row and the first column from the result set, converting it to the typeExecutionResult
-
Method Details
-
getNumberOfRecordsUpdated
Will return the number of records inserted/updated by the query.- Returns:
- the number of records updated.
-
mapToSingle
Maps the first row from the result set retrieved from RDS Data API to the instance of the specified class. If the result set is empty, aMappingExceptionis thrown.- Parameters:
mapperClass- class to map to- Returns:
- an instance of the specified class with the mapped data
- Throws:
MappingException- if failed to map RDS Data API results to the specified class
-
mapToList
Maps the result set retrieved from RDS Data API to the list of instances of the specified class.- Parameters:
mapperClass- class to map to- Returns:
- a
Listof instances of the specified class with the mapped data - Throws:
MappingException- if failed to map RDS Data API results to the specified class
-
singleValue
Returns the single value from the first row and the first column from the result set, converting it to the typeExecutionResult- Parameters:
convertToType- type to convert to- Returns:
- a value of a type
ExecutionResultfrom the first row and the first column from the result set - Throws:
EmptyResultSetException- if the result set is empty
-