Class ExecutionResult

java.lang.Object
com.amazon.rdsdata.client.ExecutionResult

public class ExecutionResult extends Object
  • Method Details

    • getNumberOfRecordsUpdated

      public Long getNumberOfRecordsUpdated()
      Will return the number of records inserted/updated by the query.
      Returns:
      the number of records updated.
    • mapToSingle

      public <T> T mapToSingle(Class<T> mapperClass)
      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, a MappingException is 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

      public <T> List<T> mapToList(Class<T> mapperClass)
      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 List of instances of the specified class with the mapped data
      Throws:
      MappingException - if failed to map RDS Data API results to the specified class
    • singleValue

      public <T> T singleValue(Class<T> convertToType)
      Returns the single value from the first row and the first column from the result set, converting it to the type ExecutionResult
      Parameters:
      convertToType - type to convert to
      Returns:
      a value of a type ExecutionResult from the first row and the first column from the result set
      Throws:
      EmptyResultSetException - if the result set is empty