Interface RecordMapper

    • Field Detail

      • IDENTITY

        static final RecordMapper IDENTITY
        Returns unchanged records.
    • Method Detail

      • preservesRowCount

        default boolean preservesRowCount()
        If every record is mapped to a list with the same number of rows as what the record contains, set this boolean to true. This helps the underlying implementation avoid recomputing row ids.
      • preservesRecordStructure

        boolean preservesRecordStructure()
        If the record structure is preserved by the mapper, set this boolean to true. This will help the runner avoid re-computing the record boundaries after applying this mapper.
      • rowWiseRecordMapper

        static RecordMapper rowWiseRecordMapper​(RowMapper mapper)
        Applies a row mapper on all rows in the record.
      • conditionalMapper

        static RecordMapper conditionalMapper​(RecordFilter filter,
                                              RecordMapper positive,
                                              RecordMapper negative)
        Returns a mapper which applies one of the two mappers provided depending on the outcome of the filter. If the filter evaluates to true, the positive mapper is evaluated, otherwise the negative one is used.
        filter - the filter to use for the disjunction
        positive - what to do if the filter evaluates to true
        negative - what to do otherwise
        the conditional mapper