Skip to content
Andrew Grosner edited this page Jul 3, 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.

2.x

2.1.x

2.1.0

  1. Library now is on jCenter()/bintray!
  2. Full Enum Support. Note: they must be standard columns. We do not support foreign key or primary key for enums.
  3. Can now define inherited properties to use as columns. Note: They can only be normal, accessible to the subclass columns for now. Just define @Table(inheritedColumns = {@InheritedColumn(column = @Column, fieldName = "fieldName")}.
  4. Bug Fixes, readme enhancements, Logging Improvements, and improved code commenting
  5. Function support for SQLite methods in a condition such that date(myColumn1)=1433872730 can be written as Condition.columnsWithFunction("date", "myColumn1").eq(1433872730)
  6. Fixed an issue where Condition instead of SQLCondition were leftover as a param in a few methods.

2.0.x

2.0.0

  1. Massive, massive changes to the library.
  2. For all changes, check out the migration guide here

1.x

1.8.x

1.8.1

  1. Fixes Cursor synchronization bug where its used and modified in different threads, leading stale cursor to be used and subsequent crashes in FlowTableList and FlowCursorList

1.8.0

  1. Fixes bug where foreign key reference table is not quoted
  2. Added validation to prevent specifying name() for a Column.FOREIGN_KEY
  3. Added a $ViewTable static constant fields for ModelView so incase the view column is different from model for easy reference.

1.7.x

1.7.2

  1. Removes internal ContentObserver for FlowCursorList. Call refresh() when data becomes stale. This does not break any backwards compatibility as once a single refresh was called, the observer never reregistered anyways.

1.7.1

  1. Fixes issue where an IndexMigration recursively called the database rather than use the method database.
  2. Fixes issue where non-unique columns with specified uniqueGroups did not create the groups
  3. Fixes issue where Long or Integer primary keys caused a NullPointerException

1.7.0

  1. Added unique columns support by using @UniqueGroup for columns to enable multiple different groups of columns #117
  2. Fixes an issue where autoincrement update methods do not pass in the id of the object, possibly touching other rows unintentionally
  3. Added global configurable defaults for insertConfict() and updateConflict()in a @Database for any table that does not define a ConflictAction #104
  4. Added bulkInsert support to the @ContentProvider and corresponding method in ContentUtils #108
  5. Added Kotlin support! just change the generatedClassSeparator() for a @Database to Kotlin compatible. #90
  6. Added usage guide for databases
  7. Adds better null loading, as in it prevents loading null values into the object when it's not null. #128

1.6.x

1.6.2

Fixes a StackOverflowError when using BaseCacheableModel

1.6.1

  1. #106 Empty model list will cause a crash in ProcessModelInfo
  2. #101 Fixes issue where removeAll(Collection) crashes in certain scenarios where the list is a subclass with generic parameters. Now will explicitly fail with ClassCastException if of wrong type.
  3. #86 Now can force notifying content observer changes across different processes

1.6.0

  1. Adds annotation processing for creating ContentProvider access classes
  2. Generates ContentProviders for you
  3. Decent amount of features including connecting Model classes to a ContentProvider so you don't need to write ContentValues.
  4. Based on schematic
  5. Adds and condenses some adapter code generation as well as adds support for methods needed for them.
  6. Fixes all tests so they can run successfully without clearing data.
  7. Added usage docs for this new major feature!
  8. #95 where a JSONObject.NULL was not recognized as a proper null.
  9. Added support for non-autoincrementing primary keys as model cache key. Allows for single int or long PRIMARY_KEY field to be a caching id.
  10. Fixes an issue where a method in count() for non-SELECT statements was called in pre-honeycomb devices anyways. Now it uses a raw query statement for compatibility.

1.5.x

1.5.3

  1. Fixes issue where using ProcessModelInfo with a ModelContainer caused the database table lookup to happen on the ModelContainer class and not the Model it points to.
  2. Updated code comments and moved most Where parameters in TransactionManager, TableTransactionManager and other places where SelectListTransaction or SelectSingleModelTransaction were used. Backwards compatability still applies.

1.5.2

  1. Fixes issue where TypeConverter crashed when null field value was passed. Now it will return null for both methods when data is null

1.5.1

  1. Adds Index support and IndexMigration support!! Fixes #63
  2. Fixes #76 FlowCursorList where Handler was not using main looper
  3. fixes #72 FlowTableList where LruCache does not allow cache size of 0, causing crash. Also now the count can be determined by overriding getCacheSize()
  4. Fixes #71 where Migration documentation was not fully clear.
  5. Added Index documentation

1.5.0

  1. now we quote columns and table creations to support SQLite Keyword named columns and table names from here thanks @mozarcik
  2. Can extend BaseCacheableModel to create an in memory cache for Model for instant retrieval for any query to the DB if it exists in the cache.
  3. Can create your own ModelCache, however this library comes with ModelLruCache and SparseArrayBasedCache!
  4. Can define a custom cache for FlowTableList and FlowCursorList
  5. Added README support for Model caching

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