Skip to content

1.5.0

Compare
Choose a tag to compare
@angryziber angryziber released this 26 May 12:57
  • core: toValues() functions moved here from klite-jdbc
  • core: TSID introduced as an alternative to UUID
  • json: new lightweight json parser
  • i18n: now uses the lightweight klite-json, not jackson
  • jackson: package changed to klite.jackson to avoid conflicts with klite-json
  • jackson: .parse extension function now passes type parameters to Jackson, not only the main class
  • jdbc: fromValues() was renamed to create()
  • jdbc: switched db.select() <-> db.query(), taking "where" as a list or varargs, to allow for duplicated columns

The release is not fully backwards-compatible, however most old functions are provided as @deprecated.

This will migrate the most important parts:
find -name '*.kt' -exec sed -ri 's/klite.json./klite.jackson./; s/mapOfNotNull/notNullValues/; /db\.(query|select)/{N; s/db\.query/db.xxxselect/g; s/db\.select/db.query/g; s/mapOf/listOf/g; s/emptyMap/emptyList/g};' {} \; -exec sed -ri 's/db\.xxxselect/db\.select/; s/(db.update\(.*, )mapOf\((.*?\)), (mapOf\(.*?\))\)/\1\3, \2/; s/(db.delete\(.*, )mapOf\((.*?)\)/\1\2/' {} \;

Beware: if you use the replacement above, then make sure that no deprecated query/select usages are left, i.e. check that all "where" maps are replaced with lists/varargs, which is done automatically only if on the same or next line.

You may also use IDEA migration of deprecations, but it will most likely break code formatting, etc.
Also, you may need to add some imports manually.