Kripton 3.5.0 is released! There are some bug fixes and some new features that you can see in the release notes that I reported below. This version is all focused on ORM part of the library. Only two new major features are mentioned in this post. For other new features and bug fix, you can read release note, reported at the end of this post too.

Define a database in memory

Since this version is possible to create an SQLite database in memory simply using flaginMemory of annotation@BindDataSource. An example:

In this case, the data source version will be always 0, so migration task will not be executed.

Database migration task can be defined throws @BindDataSource

Another new feature is the capability to define migration task between database version throws @BindDataSource#updateTasks annotation attribute.

As reported in the above example code, a new annotation @BindDataSourceUpdateTask is introduced to accomplish this feature. Every task is defined to migration from version-1 to the version of the database (always step by 1). The version attribute specifies the destination version.

In the above example, to migrate data source from version 1 to 2, SampleUpdate02 task will be executed. To migrate data source from version 1 to 3, the executed task will be SampleUpdate02 and SampleUpdate03.

 

 

Version 3.5.0 – Release note

Bug

  • [KRIPTON-209] – Use generated many 2 many entities in JQL causes error
  • [KRIPTON-220] – If a field is decorated with @BindSqlTypeAdapter, @BindTypeAdapter is not necessary
  • [KRIPTON-222] – ORM: an SQLiteTypeAdapter managed field never receive null value into generated method

Improvement

  • [KRIPTON-213] – Content provider: generate URI values to access methods
  • [KRIPTON-214] – Datasource update task can be defined in @BindDataSource annotation
  • [KRIPTON-217] – SQLite populator: let populator definition more simpler with @BindDataSource#populator and DataSourceOptions.populator
  • [KRIPTON-226] – Log of byte[] parameter: display its hexadecimal representation

New Feature

  • [KRIPTON-215] – Add @BindDatasource#inMemory flag to use in-memory database
  • [KRIPTON-218] – Add DataSource classes isJustCreated flag to check if data source is just created
  • [KRIPTON-219] – @BindDataSource: add capability to define update task with annotation
  • [KRIPTON-223] – Every data source expose its table names with Table[] getTables()
  • [KRIPTON-224] – Every table expose its column names with String[] columns() method

Task

  • [KRIPTON-210] – remove @BindDaoMany2Many attribute only fields(): unused
  • [KRIPTON-211] – @BindDaoMany2Many: rename generated methods to methods
  • [KRIPTON-221] – Generated Content Provider: improved Javadoc generation for methods: query, insert, update, delete
  • [KRIPTON-225] – Improve value insertion into ContentValue

As usually, release notes are here and GitHub repository for Kripton is here.

For any question or suggestion don’t esitate to write some comments!

 

Happy coding!

Francesco

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close