V6.3.0

  • #574 detect factory method in enclosing class, if map to ImmutableT.ImmutableTBuilder will use the method ImmutableT.builder() as an instantiator.
  • #608 sql2o allow customisation of factory to support discriminator
JdbcMapperFactory jdbcMapperFactory =
    JdbcMapperFactory
            .newInstance()
            .discriminator(Device.class,
                    "type",
                    ResultSet::getString,
                    b ->
                            b.when("e", ElectricDevice.class)
                                    .when("s", SolarDevice.class));

query.setResultSetHandlerFactoryBuilder(new SfmResultSetHandlerFactoryBuilder(jdbcMapperFactory));