Skip to content
Andrew G edited this page Feb 11, 2015 · 12 revisions

Legacy Change Log

This section will contain changes from other releases on the xx.xx version. For example if the library is at version 2.1.5, then all versions earlier than 2.1 will be shown here.

1.4.x

1.4.5

  1. Discovered a bottleneck when we call SqlUtils.notifyModelChanged() even when not listening for changes. Now it only gets called when we register a FlowContentObserver, resulting in ~%60 speed improvement for all DB modification operations!!!!
  2. Consolidated ModelContainerUtils methods into SqlUtils due to the adapter improvements in 1.4.2 that enabled the change. Thus ModelContainerUtils is deprecated.
  3. SqlUtils.convertToList() should be leaner by reusing a model adapter before looping through a Cursor.

1.4.4

  1. Simplifies internal adapter structure and have them implement common interfaces
  2. Column.PRIMARY_KEY_AUTO_INCREMENT now changes the way existence behaves: instead of using a query on the DB for the existence, it will use that field's value. If the value is 0, it's not in the DB and will save().
  3. Deleting an autoincrementing column will reset that object's id column to 0
  4. Fixes issue where a @ContainerAdapter updateAutoIncrement() wasn't respecting the @ContainerKey

1.4.3

  1. Adds vargs to the Condition.in() and Condition.notIn() methods
  2. Fixes issue where Insert wrapper did not execute the correct method when called query() or queryClose()

1.4.2

  1. Throws error if the TypeConverterDefinition cannot process the type parameters, and warns devs of using type parameters for a typeparameter in a TypeConverter. Thanks mariciv
  2. Fixes BaseDatabaseDefinition.reset() fails to reset DB. Now appends ".db" to database name. Thanks bafitor

1.4.1

  1. Fixes issue where using Set.query() called the wrong query method.

1.4.0

  1. Fixes a crash within ```ModelUtils`` from the compiler` for a non-standard column
  2. Add validation to ensure crash does not happen from (1).
  3. Add INSERT as Queriable interface.
  4. Queriable interface was drastically simplified down to two methods. query() and queryClose(). Never fear ModelQueriable is here! Same as previous Queriable just new and more descriptive name.
  5. Condition.columnRaw() will not TypeConvert or convert the value to a SQL escaped string when used.
  6. Condition.eq() added that just mirrors is() but will sound nicer when writing some queries.
  7. Condition.column(columnName).concatenateToColumn(value) will concatenate the query: columnName=columnName || 'value' for strings, or columnName=columnName + value for numbers. It will handle type converters appropriately

1.3.xx

Legacy changelog:

1.3.1

  1. Fixes issue where $ContainerAdapter generated the incorrect updateAutoIncrement() method.
  2. Also updated ModelContainerUtils to utilize the more efficient usage of save(), insert(), and update() just like Model already do.

1.3.0

  1. Adds in ConflictAction you can specify for a @Table insert and update methods. This will not work on earlier than FROYO (API 8) for update statements.
  2. Added InsertTransaction and InsertModelTransaction that handle insert queries with the TransactionManager
  3. Now BaseModel will directly call UPDATE and INSERT methods in the update() and insert() instead of using save() when calling those methods directly for a small performance gain.
  4. Added checking and attempts. Thanks wongcain
  5. Now supports ForeignKeyContainer which when placed in a field of a Model, will hold onto the foreign key cursor data and provide an on-demand lazy loading of foreign key objects by calling toModel().
  6. Added support for LoadFromCursorListener, SQLiteStatementListener, and ContentValuesListener within a model to implement to perform some custom action during use of those methods.
  7. Added a saveForeignKeyModel() option in Column to disable save() on a contained foreign key Model or ModelContainer from within its associated Adapter class. Thanks davidschreiber

1.2.x

1.2.0

  1. Added SQLite Triggers!
  2. Added the IN and NOT IN operators to Condition
  3. Fixes an issue where a FlowCursorList was A. not caching models and B. not handling ModelView properly, thanks Cain.
  4. Added ForeignKeyAction which specify the action to take when updates and deletes occur to the foreign key. Thanks Michal
  5. Added the Insert statement wrapper! Particularily useful for Trigger

1.1.x

1.1.7

  1. ConditionQueryBuilder no longer maps columnName to a Condition since if we wanted to do OR operation on the same column multiple times, it would only take the last condition since it was a Map of columnNames.
  2. Added Condition.Operation constant class for operation and SQL method constants
  3. Fixed the IS NULL and IS NOT NULL conditions and wrote test to ensure working

1.1.6

  1. Fixes issue where boxed primitive values such as Long, when null, were throwing NullPointerException in bindToStatement(). Added a test to prevent any future issues.
  2. From.as() wasn't using type parameters in return, thus a warning would be thrown.
  3. Added two new methods to Queriable: queryCursorList() and queryTableList(). These corresponding methods will make constructing a FlowCursorList or FlowTableList from a completed query much simpler.

1.1.5

  1. Fixed issue where using non-string foreign keys caused a build error.
  2. Optimized loading foreign key objects from the DB by checking using the Cursor.isNull() method before calling a SELECT query (thanks Michal)
  3. Made FlowCursorList and FlowTableList more robust and flexible by enabling Queriable objects to be used to generate it's internal cursor. Added Condition... parameter to FlowTableList as well.
  4. Added two new methods to Queriable: queryClose() will execute a query on the DB and close the Cursor if needed. getTable() simply returns the table that the query comes from.
  5. Made TransactionListenerAdapter both the class and the onResultReceived() method no longer abstract to make it useful in situations other than results.

1.1.4

  1. Fixed issue where Collate enum was not appending COLLATE to the SQL query
  2. Added the ability to chain Condition together using different separators. Just call separator() on a Condition used in a ConditionQueryBuilder.
  3. Added tests for Between and these fixes.

1.1.3

  1. Fixes an issue with Boolean converter throwing a NullPointerException when a ModelContainer does not contain the field.
  2. Added null checks in the toModel() method of a ContainerAdapter definition class.
  3. We bindNull() and putNull() for missing foreign key fields in the ````$Adapter``` definition, previously this bug did not allow the removal of foreign key object fields.
  4. Added a purgeQueue() and the ability to set the priority of the batches in the DBBatchSaveQueue
  5. Added the Between method for SQLite statements
  6. Added a method in Delete for clearing multiple tables

1.1.2

  1. Added support for SQLite COLLATE in @Column and Condition classes
  2. Added support for DEFAULT values in column creation.
  3. Deprecated ResultReceiver to replace it with TransactionListenerAdapter which provides a base implementation of TransactionListener. TransactionListener provides more callback methods to the state of a DB transaction. As a result ResultReceiver is no longer an interface, rather an abstract class. NOTE: BaseResultTransaction's TransactionListener must return true from hasResult(BaseResultTransaction, ResultClass) to have onResultReceived() called.
  4. FlowCursorList is more flexible by adding methods to clear the cache, dynamically enable/disable the cache, and set a custom Where for the cursor to use.

1.1.1

Fixed an issue where TypeConverter for boolean values would incorrectly try to cast in bindLong to Boolean

1.0.xx

1.0.3

  1. Added JSONArrayModel, which will operate on all items and backed by a JSONArray
  2. @ContainerKey enables different key from a model container @Key field

1.0.2

  1. Fixes issue in FlowCursorList that caused the cursor to reset everytime getItem(int) was called
  2. Fixes "DSC" to "DESC" for SQL orderby
Clone this wiki locally