Archive for 21 October 2013

Update to MSQLite library

Recently MSQlite library saw few new updates:

  1. Tracking classes
    The library allows adding classes to ‘tracked classes’ by calling trackClasses() or trackClass() this adds class(es) to a collection of tables that will create automatically in onCreate() and upgrade in onUpgrade(). These method must be called before MSQLiteOpenHelper.onCreate(), or you can use one of the new constructors to pass an array of classes directly.
  2. Serialization of non primitive fields
    All class members will be added to database table as columns by default. If member type is not a primitive or integer, the library will attempt to serialize it, or throw an exception if type does not implement Serializable.
  3. Upgrading tables
    When new fields are added to class, and database version number is increased, the SQLite framework will call onUpgrade() which will upgrade table columns to match the classes. This is limited to adding new columns since SQLite’s ALTER TABLE command is limited to ADD COLUMN.