Skip to content

SimpleFlatMapper ReleaseNotes

Arnaud Roger edited this page Sep 18, 2016 · 48 revisions

SimpleFlatMapper provides fast and easy to use mappers

More...

v3.0.b1

  • Big restruture to prepare for java9
  • Csv and jdbc split in sfm-csv and sfm-jdbc module
  • converter use ServiceLoader for extension
  • package rename org.sfm to org.simpleflatmapper, org.sfm.utils to org.simpleflatmapper.util
  • rename RowHandler to CheckedConsumer
  • ...

v2.14

Issues

  • Fix issue with UUID key in Crud

v2.13

Issues

  • Jdbc support native uuid on postgres

v2.12

Issues

  • csv date parser supports multi format per column

v2.11

Issues

  • support datastax 3.1
  • fix perf regression in csv mapper

v2.10.1

Issues

  • csv parser better buffer resize condition
  • setup jdk 9 travis build
  • fix .. when generating class name for asm mapper on Array

v2.10

Issues

  • Csv
  • add ParallelReader
  • Perf improvement on csv with quotes, slight decrease with no quotes
  • CellConsumer is a Functionnal Interface

v2.9.8

Issues

  • Jdbc Crud
  • better error message when primary key not defined
  • support manual key definition

v2.9.7

Issues

  • support java date time for jooq integration

v2.9.6

Issues

  • Csv parsing perf improvement accross all strategy quotes/no quotes.

v2.9.5

Issues

  • Default value supported on all mapper.
  • Csv parsing perf improvement.

v2.9.4

Issues

  • Param Name deductor printStackTrace

v2.9.3

Issues

  • Jooq Enum null Handling

v2.9.2

Issues

v2.9.1

Issues

CsvParser

  • default value with no mapping does no need Date Format
  • can specify a supplier in defaultvalueproperty

v2.9

Issues

CsvParser

  • parse directly from string
  • trim spaces option
  • DefaultValueProperty support

v2.8.4

Issues

  • mysql batch upsert/insert downsizing fix

v2.8.3

Issues

  • fix some error reporting for csv
  • support value object deflation for crud

v2.8.2

Issues

  • better handling of value object reading and writing
  • joda/java time support for datastax PS setter

v2.8.1

Issues

  • perf improvement for dynamic mapppers

v2.8

Issues

  • support Builder pattern for instantiation
  • allow to specify instatiator Method or Builder Constractor or factory method

v2.7.6

Issues

  • support UUID for jdbc mapper ResultSet/PreparedStatement
  • support UUID for csv mapper
  • support Custom setter for PreparedStatement setter

v2.7.5

Issues

  • remove need for joda time runtime dep for PreparedStatement injection
  • support java8 -parameters

v2.7.4

Issues

  • static method with generic type fix
  • datastax crud support @table
  • datastax mapping support @column
  • jdbc crud support @table
  • table name lookup

v2.7.3

Issues

  • add ttl and time out to datastax crud
  • make it easier to customise CellWriter in CsvWriter DSL

v2.7.2

Issues

v2.7.1

Issues

v2.7

Issues

  • crud upsert support for mysql
  • crud upsert support for postgresql
  • crud batch insert/upsert uses insert multiple rows

v2.6.5

Issues

  • csv parser bug when unescaping a "" return " instead empty string fixed
  • crud support mysql specific batch insert multiple values

v2.6.4

Issues

  • crud fix issue when generating queries for composite keys
  • crud support batch create, update, read, delete using jdbc batching

v2.6.3

Issues

  • crud fix npe issue with generated keys but no consumer

v2.6.2

Issues

  • crud support auto increment column

v2.6.1

Issues

  • try to match param of the constructor with a getter when asm not present
  • add crud support

v2.6

Issues

  • Read csv from file
  • Support for named query from name parameter
  • heuristic to extrapolate name from query when using ? placeholder

v2.5.5

Issues

  • Allow sfm bundle to see asm to be able to figure out constructor param name

v2.5.4

Issues

  • Fix mapper injector list index issue

v2.5.3

Issues

  • Fix asm linkage error on object with synthetic method

v2.5.2

Issues

  • Add support for array of SqlParameterSource for batch update

v2.5.1

Issues

  • add support for custom def on SqlParameterSource

v2.5

Issues

  • add support for spring SqlParameterSource

v2.4.1

Issues

  • fix bug in jooq record mapper provider

v2.4

Issues

  • static constant value for mapper to flat structure
  • better object metadata building

v2.3

Issues

  • map object to PreparedStatement
  • map object to Datastax PreparedStatement

v2.2

Issues

  • datastax UUID <-> String
  • CsvParser String memory tripwire

v2.1

Issues

  • Datastax
  • User Defined Type support
  • List/Set/Mapper support
  • Tuple support

v2.0

Issues

  • extract non java se support to sub modules
  • add cassandra support, from benchmark there is about 20% speed increase compare to datastax mapper.

v1.10.3

Issues

  • fix bug on csv non asm error handling
  • fix bug on csv parsing date in subobject
  • fix bug on csv writing subobject

v1.10.2

Issues

  • better handling of 1 param object type
  • csv escaping of line more consistent when customising end of line

v1.10.1

Issues

  • perf improvement
  • java time and joda time support
  • better configuration support
  • append method now return this

v1.10.0

Issues

  • add csv writer
    CsvWriter<DbObject> csvWriter = CsvWriter.from(DbObject.class).to(writer);
    csvWriter.append(obj1);

v1.9.1

Issues

  • fix concurrency bug on join and discriminator mapper.

v1.9.0

Issues

  • excel POI support see javadoc
  • better handling of generic types
  • big refactor to make it easier to create new mapper factory, builder on pull mapper
  • support asm generation on all field mapper builder

v1.8.1

Issues

  • add Map, ?> mapping support
  • better handling of generic parameter
  • handle custom list/map impl

v1.8.0

Issues

  • add optional support
  • add java 8 time support
  • add factory method support
  • better customisation of timezones and date formatter for joda and java8 time

v1.7.7

Issues

  • add asm class cache for jdbc mapper to avoid generating duplicated classes
  • add asm class cache for csv handler to avoid generating duplicated classes
  • reenable the asm handler generation with CsvParser DSL

v1.7.6

Issues

  • disable cell handler asm for parser dsl
  • implement method sharding for better perd with big property number

v1.7.5

Issues

  • fix issue on csv mapper asm handler on object with more than 256 fields
  • add threshold to switch to no asm over when faster

v1.7.4

Issues

  • better csv mapper performance even for non asm
  • use asm csv handler see #116 benchmark results*
  • beef up javadoc

v1.7.3

Issues

  • use speculative match on tuple and list, if no index are present will try map the prefix to the first available index
p_id, p_name, s_id, s_name

for a Tuple2 p will be associated to the first element and s to the second.

  • does not wrap non runtime exception anymore use erasure trick to pass them through
  • change all the package to optional in maven config, and made asm non optional

v1.7.2

Issues

  • fix issue with constructor injection and no asm
  • check for null getter only if keys are defined

v1.7.1

Issues

  • travis build with fattuple revealed potential issue with internal janino field.
  • public field asm support
  • possibility to define keys on CsvParser DSL
List<Professor> list =
    CsvParser.mapTo(Professor.class)
        .addKeys("id", "students_id")
        .forEach(reader, new ListHandler<Professor>()).getList()

v1.7.0

Issues

  • 1-n join on Csv Mapper
  • jOOL tuple support
  • fasttuple support
  • fix key predicate composition definition

v1.6.1

Issues

  • 1-n join with tuple as root
JdbcMapper<Tuple2<Professor, List<Student>>> mapper = 
    JdbcMapperFactory
        .newInstance()
        .addKeys("0_id", "1_id") // specify the keys to aggregate on and detect null
        .newMapper(new TypeReference<Tuple2<Professor, List<Student>>>() {});
  • allow predicate on key to decide on the level it applies to.
        JdbcMapper<Person> mapper = JdbcMapperFactory.newInstance()
                .addColumnDefinition( 
                    (key) -> key.getIndex() <= 2,
                    FieldMapperColumnDefinition.<JdbcColumnKey, ResultSet>key(
                            (pm) -> pm.getPath().startsWith("key.")
                ))
                .newMapper(Person.class);

v1.6.0

Issues

JdbcMapper<Professor> mapper = 
    JdbcMapperFactory
        .newInstance()
        .addKeys("id", "students_id") // specify the keys to aggregate on and detect null
        .newMapper(Professor.class);
  • inheritance support
        JdbcMapper<JoinJdbcMapperTest.Person> mapper =
                JdbcMapperFactoryHelper.asm()
                .addKeys("id", "students_id")
                .<JoinJdbcMapperTest.Person>newDiscriminator("person_type")
                .when("student", JoinJdbcMapperTest.StudentGS.class)
                        .addMapping("person_type")
                        .addMapping("id")
                        .addMapping("name")
                .when("professor", JoinJdbcMapperTest.ProfessorGS.class)
                .mapper();
  • some bug fixes

v1.5.4

Issues

  • fix bug on csv parser with last cell if contains only one char
  • better support for direct read type as root - String, Enum etc ...-
  • 1-N support on jdbc mapper for setter and field injection path
JdbcMapper<ProfessorField> mapper = JdbcMapperFactory.newInstance()
    .newBuilder(ProfessorField.class)
    .addMapping("id")
    .addMapping("name")
    .addMapping("students_id")
    .addMapping("students_name")
    .joinOn("id");

v1.5.3

Issues

  • support for easier generic type resolving with TypeReference support
  • better toString output on columnDefinition, column keys and mapper

v1.5.2

Issues

  • add tuples for 2 to 32
  • better signature for row handler

v1.5.1

Issues

  • Better generic support for TypeVariable
  • add support for ignore
  • add forEach on CsvParser DSL

v1.5.0

Issues 1.5.0

  • Change groupId to org.simpleflatmapper

JdbcMapper

  • check null only id result return 0
  • Calendar support
  • support custom getter factory on column definition
  • easier column definition composition
FieldMapperColumnDefinition.<JdbcColumnKey,ResultSet>identity()
    .addRename("blop")
    .addGetter(getter)
    .addFieldMapper(fieldMapper)
    .addGetterFactory(getterFactory)

CsvMapper

  • Calendar support
  • Timezone setting support
  • support CellValueReaderFactory on column definition
  • easier column definition composition
CsvColumnDefinition.IDENTITY
    .addDateFormat("yyyyMM")
    .addRename("new_name")
    .addCustomReader(reader)
    .addCustomCellValueReaderFactory(cellValueReaderFactory)
    .addTimeZone(tz);
  • can add column definition on Parser DSL
// dynamic mapper
CsvParser.mapTo(String.class, String.class)
    .columnDefinition("1", CsvColumnDefinition.customReaderDefinition(cellReader));

// static mapper
CsvParser.mapTo(String.class, String.class)
    .addMapping("0")
    .addMapping("1", CsvColumnDefinition.customReaderDefinition(cellReader))

v1.4.1

Issues 1.4.1

Issues 1.4.0

Csv

  • Joda DateTime, LocalDate, LocalTime, LocalDateTime supports
  • can provide on CellValueReaderFactory
  • can specify CsvColumnDefinition via a predicate
CsvMapperFactory
    .newInstance()
    .addColumnDefinition(
        (k) -> k.getName().endsWith("_date"), 
        CsvColumnDefinition.dateFormatDefinition("yyyyMMdd")
    ).newMapper(MyObject.class)
  • add convenience method to override the headers
CsvParser
    .mapTo(String.class, String.class)
    .overrideWithDefaultHeaders()
    .iterate(new StringReader("key,value\nvalue1,value2"));

CsvParser.mapTo(String.class, String.class)
    .defaultHeaders()
    .iterate(new StringReader("value1,value2"));

JdbcMapper

  • Joda DateTime, LocalDate, LocalTime, LocalDateTime supports
  • can specify CsvColumnDefinition via a predicate
JdbcMapperFactory
    .newInstance()
    .addColumnDefinition(
        (k) -> k.getName().endsWith("_date"), 
        columnDefinition)
    ).newMapper(MyObject.class)

v1.3.0

Issues

CsvMapper

  • allow for field customisation date format or custom reader
CsvMapperFactory
    .newInstance()
    .addColumnDefinition("date", CsvColumnDefinition.dateFormatDefinition("yyyyMMdd")
    .newMapper(MyClass.class);

CsvMapperFactory.newInstance()
    .newBuilder(MyClass.class)
    .addMapping("date", CsvColumnDefinition.dateFormatDefinition("yyyyMMdd")
    .mapper();
  • support tuple on the csv dsl
CsvParser.mapTo(String.class, Date.class).stream(reader);

JdbcMapper

  • allow for getter customisation
JdbcMapperFactory.newInstance().addCustomGetter("id", getter).newMapper(MyClass.class);

Mapping

  • support java lang type as root object
CsvParser.mapTo(String.class).stream(reader);

Sql2o integration

Query query = sql2o.open().createQuery("select * from table");
query.setResultSetHandlerFactoryBuilder(new SfmResultSetHandlerFactoryBuilder());
List<DbObject> dbObjects = query.executeAndFetch(DbObject.class);

v1.2.0

Issues

CsvMapper

Reflection

  • detect class loader visibility issues automatically
  • fix issue with instantiator cache

Osgi

  • remove osgi services and activator as now class loader issue automatically detected
  • disable asm in osgi as classloader issue of bundles being refresh it's not worth it for now

JdbcMapper

  • allow change of row handler error handler

v1.1.0

Issues

  • tuple support
  • support generic type resolution
  • index discovery
  • customizable separator and quote character for csv parser
  • unescaping is now responsibility of the parser
  • easier api to use the csv parser directly
  • more stable performance accross csv size and version

v1.0.0

  • move buffer index to charconsumer in csv parser

v1.0.0rc2

  • add streams and iterator to csvparser
  • provide own impl of spliterator for faster streams
  • refactor skip and limit for csv for faster parsing and easier maintenance

v1.0.0b3

  • add streams and iterator to jdbc and csv
  • add JPA @Column support

v1.0.0b2

  • support for array of object
  • support mapping sql Array to List

v1.0.0b1

  • add Jooq Integration
  • add support for all resultset return types.
  • restructure the packages to make javadoc more readable
  • move mapper readme content to their own package

v0.9.14

  • JdbcMapper if a column is map to a property of object, it will try to look for one argument constructor that matches the column type.
  • CsvMapper if a column is map to a property of object, it will use a one argument constructor if it's the only constructor.

v0.9.12

  • CsvMapper remove performance degradation with TieredCompilation

v0.9.11

CsvMapper

  • improve performance of unescaping.
  • support CR CRLF and LF for end of line.
  • handle space in header name.
  • fix miss mapping issue when a mapping error occured.
  • change default parser buffer size

v0.9.8

  • Asm
  • fix concurrency issue that triggered LinkageError
  • JdbcMapper
  • increase perf to outperform Roma with the static mapper
  • change benchmark to match roma result set loop
  • fix for custom field mapping and primitive
  • CsvMapper
  • add dynamic csv mapper that configure it self based on the row
  • add support for aliases and custom readers
  • ability to customized date format
  • add a Parsing Context to store the DateFormat per parsing.
  • remove byte array based parsing as benchmark so it would only be rarely lead to perf gain
  • fix for custom mapper
  • simplify parsing code

v0.9.4

  • CsvMapper
  • non boxing mapping
  • constructor injection
  • inner object
  • direct byte parsing

v0.9.3

  • extract common part of MapperBuilder
  • add Query DSL Jdbc support
  • move test to orm-benchmark
Clone this wiki locally