Changelog History
Page 1
-
v5.0.0 Changes
October 21, 2018๐ฆ 1. Rename package name for project to
com.dbflow5
. Some significant package reorganization that makes much more sense going forward.- Project is back under my account! To include, please replace uses of "com.github.raizlabs.dbflow:" to "com.github.agrosner.dbflow:" in project dependencies.
๐ 3. Added new
paging
,coroutines
,contentprovider
(splits out use into separate module). Expect alivedata
module in next couple releases. Removed RXJava 1 support. - Library is now 100% KOTLIN! (except generated java code, which can't quite yet be Kotlin). All kotlin-extensions modules have rolled into their java counterpart as a single Kotlin unit.
- Simplifications in API for Transactions to eliminate redundancies. Also, now Transaction require a type parameter R which is return value. They now return a value, and have a completion() callback. All interfaces have rolled into Kotlin Typealias to methods. ๐ 6. All sqlite query language infix (LINQ-style) methods rolled into the query language!
- Attempted to keep java compatibility and nice API. If anything is missing, please file a bug.
๐ 8.
save()
now use ainsert or replace
statement rather than a load of the model from the db and then inserting / saving based on that, resulting in significant performance increase. 0๏ธโฃ 9. no moreContentValues
used at all in any CRUD operations under the hood, and by default these don't get generated:bindToInsertValues
,bindToContentValues
. if you need them, set@Table(generateContentValues = true)
. ๐ฅ 10. Breaking Change : By default@Table(allFields = true)
, meaning you dont have to explicitly mark each property as part of DB. Previously you had to use@Column
everywhere.
- Project is back under my account! To include, please replace uses of "com.github.raizlabs.dbflow:" to "com.github.agrosner.dbflow:" in project dependencies.
๐ 3. Added new
-
v5.0.0-alpha1 Changes
October 21, 2018๐ฆ 1. Rename package name for project to
com.dbflow5
. Some significant package reorganization that makes much more sense going forward.- Project is back under my account! To include, please replace uses of "com.github.raizlabs.dbflow:" to "com.github.agrosner.dbflow:" in project dependencies.
๐ 3. Added new
paging
,coroutines
,contentprovider
(splits out use into separate module). Expect alivedata
module in next couple releases. Removed RXJava 1 support. - Library is now 100% KOTLIN! (except generated java code, which can't quite yet be Kotlin). All kotlin-extensions modules have rolled into their java counterpart as a single Kotlin unit.
- Simplifications in API for Transactions to eliminate redundancies. Also, now Transaction require a type parameter R which is return value. They now return a value, and have a completion() callback. All interfaces have rolled into Kotlin Typealias to methods. ๐ 6. All sqlite query language infix (LINQ-style) methods rolled into the query language!
- Attempted to keep java compatibility and nice API. If anything is missing, please file a bug.
๐ 8.
save()
now use ainsert or replace
statement rather than a load of the model from the db and then inserting / saving based on that, resulting in significant performance increase. 0๏ธโฃ 9. no moreContentValues
used at all in any CRUD operations under the hood, and by default these don't get generated:bindToInsertValues
,bindToContentValues
. if you need them, set@Table(generateContentValues = true)
. ๐ฅ 10. Breaking Change : By default@Table(allFields = true)
, meaning you dont have to explicitly mark each property as part of DB. Previously you had to use@Column
everywhere.
- Project is back under my account! To include, please replace uses of "com.github.raizlabs.dbflow:" to "com.github.agrosner.dbflow:" in project dependencies.
๐ 3. Added new
-
v4.2.4 Changes
December 28, 2017dropTrigger
fromSqlUtils
takes in aDatabaseWrapper
. โ 2. Fix broken annotation processor code output tests. #1437- Fix issues where
DatabaseStatement
in library in wrapper statements were not closed properly. #1497 - Fix issue where single reference (non table object) used wrong name for property in the primary condition clause, causing compile issue. #1504
-
v4.2.3 Changes
December 20, 2017โก๏ธ 1. update Issue template
- fix pom file generation on jitpack #1487
โก๏ธ 3. fix issue where
save(DatabaseWrapper)
would leave open insert or update statment. #1496 โก๏ธ 4. Allow (but still warn) about autoincrementing ids being null. if null, they are treated as if they are 0 meaning that they will get inserted rather than updated in the DB during a save operation. #1490 โก๏ธ 5. Update warning on wrong type passed in operator class for value #1488
- fix pom file generation on jitpack #1487
โก๏ธ 3. fix issue where
-
v4.2.2 Changes
December 18, 2017๐ Fix critical issue where TypeConverter always appear as
SQLiteType.TEXT
in the DB even if its type did not match up.โ Adds a test to ensure it stays true.
-
v4.2.1 Changes
December 17, 2017โ Add
FlowQueryList.Builder.contentAuthority()
parameter to go in conjunction with 4.2.0 changes. -
v4.2.0 Changes
December 17, 2017๐ Support for Android O Content Providers.
Simply add this line to yourAndroidManifest.xml
:<provider android:name="com.raizlabs.android.dbflow.runtime.StubContentProvider" android:authorities="com.dbflow.authority"/>
Which will allow normal content observing to continue.
๐ฆ It is highly recommended to supply your ownauthority
: use your own package name. so forcom.grosner.example
app I would add:<provider android:name="com.raizlabs.android.dbflow.runtime.StubContentProvider" android:authorities="com.grosner.example"/> FlowManager.init(FlowConfig.Builder(context) .addDatabaseConfig(DatabaseConfig.Builder(MyDatabase.class) .modelNotifier(new ContentResolverNotifier("com.grosner.example")) .build()).build());
-
v4.1.2 Changes
October 21, 2017- Autoincrement model saver does not call
saveForeignKeys()
#1454 - Ability to reopen DB without deleting #1449
AutoIncrementModelSaver
causesIllegalArgumentException
since it uses wrong insert statement #1447- Disallow nullable autoincrementing fields. (kotlin nullable (?) and @nullable annotations)
- Can close all DBs at runtime. #1418
๐ 6. fix support for
byte[]
, class was incorrectly treated as invalid array type. #1463 ๐ 7. Compiled with Kotlin 1.1.51, 26.0.2 of Android build-tools, and 3.0.0-rc2 of Android Gradle plugin.
- Autoincrement model saver does not call
-
v4.1.1 Changes
August 31, 2017- Fix issue with
ByteArray
andTypeConverter
#1385 - Fix issue where processor used
implementation
. switched back tocompile
.
- Fix issue with
-
v4.1.0 Changes
August 27, 2017โ 1.
@ModelView
are now created after migrations are run so latest DB data is respected.New annotation
@ColumnMap
! It enables embedding other object's exposed properties into the current table as@Column
so that object hierarchy is respected without excessive DB complication.class Location(var latitude: Double = 0.0, var longitude: Double = 0.0)@Table(database = TestDatabase::class)class Position(@PrimaryKey var id: Int = 0, @ColumnMap var location: Location? = null)
creates a table with the following columns:
public static final Property<Integer> id = new Property<Integer>(Position.class, "id"); public static final Property<Double> latitude = new Property<Double>(Position.class, "latitude"); public static final Property<Double> longitude = new Property<Double>(Position.class, "longitude");
@database(name = , extension = ) are deprecated. Specify the name now in the
DatabaseConfig.databaseName()
whenFlowManager
is initialized. This means that DBFlow supports dynamic database names and instances.FlowManager.init(FlowConfig.builder() .addDatabaseConfig(DatabaseConfig.builder(AppDatabase.class) .databaseName("AppDatabase") .databaseExtension(".txt") .build()) .build())
To dynamically swap database out, replace the
FlowConfig
:FlowManager.getDatabase(AppDatabase.class) .reset(DatabaseConfig.builder(AppDatabase.class) .databaseName("AppDatabase-2") .build())
โ Note that this will overwrite all existing database properties for a database. Any
TableConfig
properties missing will get ignored. Also it will delete existing db and reopen with new instance specified.@database(inMemory = ) is deprecated. Use the new builder method:
FlowManager.init(FlowConfig.builder() .addDatabaseConfig(DatabaseConfig.inMemoryBuilder(AppDatabase.class) .databaseName("AppDatabase") .build()) .build())
๐ 1. Support
javax.annotation.Generated
if it's on the classpath.- @database(generatedClassSeparator = ) is now deprecated. It will be standardized to the default
_
in a future breaking release. ๐ 3.@OneToMany
now auto-detect visibility of the reference field soisVariablePrivate()
is deprecated. - Can specify
@ForeignKeyReference(notNull = @NotNull())
annotation for individual references. Required to specify allreferences
on a@ForeignKey
if you need to specify for one. ๐ 5. Some better error messaging in the annotation processor so its easier to find solutions to common issues. ๐ 6. Renamecount()
(deprecated) tolongValue()
so its more clear exactly what is happening. - fix #1401 which enables custom
TypeConverters
to carry into anas()
alias of aProperty
. - Add new
TransactionWrapper
which allows grouping ofITransaction
into one to get executed at same point in db time. ๐ 9. Lib now compiles with SDK 26 with latest build tools includingapi
/implementation
of 3.0.0+ gradle plugin. โก๏ธ 10. RXJava2 is now updated to2.1.3
โก๏ธ 11. Update some methods ofdbflow-kotlin-extensions
to accept nullable values for objects where it makes sense. See commit - Automatic creation of tables can be turned off on a table-by-table basis with
createWithDatabase()
. Useful for preserving scrapped table in previous migrations. Using Kotlin we can drastically reduce the
@OneToMany
code implementation:@OneToMany(methods = {OneToMany.Method.ALL}, variableName = "ants") public List<Ant> getMyAnts() { if (ants == null || ants.isEmpty()) { ants = SQLite.select() .from(Ant.class) .where(Ant_Table.queen_id.eq(id)) .queryList(); } return ants; }
to:
@get:OneToMany(methods = arrayOf(OneToMany.Method.ALL))var ants by oneToMany { select from Ant::class where (Ant\_Table.queen\_id.eq(id)) }