Releases: agrosner/DBFlow
Releases · agrosner/DBFlow
4.0.5
- Move the
GeneratedDatabaseHolder
off the last round, warnings should be gone! - Update Kotlin to 1.1.3-2
- update Gradle plugin to 2.3.3 (3.0.0-beta currently breaks robolectric unit testing)
- Some new extensions
- add
Property.allProperty(MyTable.class)
so you can easily specifyMyTable.*
in a query. - Some optimizations on generated code including removing some redundant null checking.
- Fix issue where
DatabaseStatement
in update were not closed when used in aModelAdapter.saveAll()
method. - Fix package private
ModelView
that duplicated field definitions in generated_ViewTable
class. - RXJava2: Change
Single
toMaybe
for nullable returns.
4.0.4
- Even better Kotlin support. if a field is not null in Kotlin or using the
android.support.annotation.NonNull
/org.jetbrains.annotations.NotNull
annotation, we will not attempt to assign a null value on it when theCursor
contains a null value. Primitives always did this of course, but now its expanded to any time. - Fixed a bug by throwing a compiler error if you reference another class in another package that has package private fields, yet its not annotated with
@Table
,@ModelView
, or@QueryModel
. You must make it public or getter/setter private. - Fix nullable
Float
fields not compiling. - Add
BigIntegerConverter
to the lib! - Fix issue where primary keys of a reference
@PrimaryKey
has the same name as the calling table, i.e. both havingid
as a column name in the generatedModelAdapter
code. - Fix issue where generated
@ManyToMany
referenced tables that had primary keys withTypeConverter
not properly calling typeconverter, leading to compile errors. - Fix issue where a table with
cachingEnabled=true
with astubbedRelationship
table where the object that calls load called the same instance from the cache (effectively not doing anything), and did not reload its fields from the DB. - More bug fixes + improvements.
4.0.3
4.0.2
- Fix issue where enums broke the processor. #enumsmatter
- Replace
ContentValues
withDatabaseStatement
for updating models, this results in a 33%-50% speed increase! - More
@NonNull
and@Nullable
annotations - Delete queries also use generated
DatabaseStatement
, speeding up bulk deletes. - Add notnull to
@InteritedColumn
annotations. - RXJava
observeOnTableChanges()
updates. eachModelNotifier
has common interface for interaction. ModelChangeListener
forDirectModelNotifier
now usesOnTableChangeListener.onTableChanged()
which adds aClass
for which table changed. This enables better consolidation of interfaces.OnTableChangedListener
promoted to top-level interface.
4.0.1
4.0.0
Major new release.
Some of the major changes:
- Code generation significantly reduced. more than ~40% reduction in lines of code. Also order is deterministic and always the same in output.
Condition
->Operator
includingConditionGroup
->OperatorGroup
- Rewrote a lot of annotation processor with KPoet and now 99% Kotlin!
- Much better Kotlin support via
@NonNull
and@Nullable
annotations on most public api methods. - Can supply a different way to notify observers of changes via the new
DirectModelNotifier
or legacyContentResolverNotifier
- Remove
Model
restriction from the library. Classes no longer need to implementModel
. Kotlin consumers can take advantage of extension methods inkotlin-extensions
to make classes act likeModel
. - Latest plugins + Kotlin 1.1.2
PrimaryKey
can have type converters.ForeignKeyContainer
is replaced with@ForeignKey(stubbedRelationship = true)
. UseModel.load()
to get same functionality as before, without the confusion!
10 . RemovedModelContainer
implementation and support. Since removing support, the annotation processor is cleaner and easier to maintain.- Added RXJava1 + 2 support via sub-packages, with corresponding Kotlin extension libraries.
- New documentation website here
- Bug fixes, documentation updates, and more.
4.0.0-beta7
Fixes issue where the rx, rx2, and corresponding Kotlin extensions for each did not publish to JitPack.
4.0.0-beta6
This should be last beta before 4.0.0 if no serious issues.
- rewrite unit tests - most classes are tested. more tests will follow
Condition
are nowOperator
, this includesSQLCondition
->SQLOperator
,ConditionGroup
->OperatorGroup
.Operator
are now typed and safer to use.
->Operator
now also havediv
,times
,rem
,plus
andminus
methods.- Property class changes:
-> All primitiveProperty
classes have been removed. We already boxed the values internally
anyways so removing them cut down on method count and maintenance.
->BaseProperty
no longer needs to exist, so all of it's methods now exist inProperty
->mod
method is nowrem
(remainder) method to match Kotlin 1.1's changes.
->dividedBy
is nowdiv
to match Kotlin operators.
->multipliedBy
is nowtimes
to match Kotlin operators. - Add KPoet to Annotation processor to make processing code more readable.
- Many More Kotlin extension methods
- Code output is deterministic, meaning always in same order unless generated files are added or removed.
- Reduce code generation further in this branch.
- Add a bunch of
@Nullable
and@NonNull
annotations to public api members to better support Kotlin. - Abstracted out the default Model notification system to allow you to override how its done. the options include
ContentResolverNotifier
(default, previous implementation wrapped in new), orDirectModelNotifier
- receive changes with theModel
directly.
4.0.0-beta5
Attempt to republish beta4.
4.0.0-beta4
- Close insert
SQLiteStatement
fromModelAdapter
when resetting DB. @QueryModel
+@ModelView
no longer require theirBaseQueryModel
+BaseModelView
base classes.- Added ability to specify
allowedSubTypes
inTypeConverter
, meaning subclasses of types can all register to same typeconverter. - Allow user override of default
TypeConverters
by declaring usual custom converter with the@TypeConverter
annotation. - Cut libs method count footprint by ~100. Library now stands at 2278 methods. Also cut down on generated code + generated code method references when some method overrides were generated even when not actually used for custom behavior in
ModelAdapter
. - Methods Added: Add
nullIf()
andifNull()
methods. Supportstrftime()
,date()
, anddatetime()
methods. - Can now disable caching for models with caching enabled in certain queries via:
select().from(MyTable.class)
.disableCaching()
.queryList()
- save, delete, + update methods in
Model
+ModelAdapter
all returnboolean
for success / failure. - Can specify custom db extension via
@Database(databaseExtension = )
10 .ProcessModel
interface method now adds aDatabaseWrapper
:processModel(Model, DatabaseWrapper
- Can do async
insert
,update
, anddelete
via:
insert(MyTable.class)
.columns(...)
.values(...)
.async()
.execute()
- Minor bug fixes + code stability improvements.