3.1.0
- Bug fixes
- Fixes an issue where prepackaged databases were not copied over on initialization of DB. #867. Affects all versions post-3.0.0-beta6.
- New builder syntax for
FlowQueryList
+FlowCursorList
. Deprecated a lot of their old methods. Also created aFlowCursorIterator
so that iteration inFlowCursorList
+FlowQueryList
becomes way more efficient. Instead of loading the full list when iterating, it iterates and converts objects as you need them:
for (TestModel model : cursorList) {
}
- Can add
primaryKeyConflict
to@Table
to optionally specify a conflict for a Primary key that gets appended to the creation query. - NEW Kotlin SQLite LINQ-Style Syntax and improvements to the Kotlin Support. In
dbflow-kotlinextensions
you can now write queries in Kotlin as:
var results = (select
from Result::class
where (column eq 6)
and (column2 `in`("5", "6", "9"))
groupBy column).list
// can call .result for single result
// .hasData if it has results
// .statement for a compiled statement
Some new syntactic sugar that makes queries even more functional:
model.async save {
// completed, now do something with model
}
Retrievals:
(select
from Result::class
where (column eq 6))
.async result { transaction, model ->
// do something here
updateUI(model)
}
for Lists:
// easy async list query
(select
from Result::class
where (column eq 6))
.async list { transaction, list ->
// do something here
updateUI(list)
}