Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.0.0-alpha2 #1715

Merged
merged 246 commits into from
Mar 13, 2021
Merged

5.0.0-alpha2 #1715

merged 246 commits into from
Mar 13, 2021

Conversation

agrosner
Copy link
Owner

Many updates!

  1. NEW livedata artifact (consider it experimental). Call .toLiveData on your wrapper queries when included in the project.
  2. Docs have been revamped, lots of fixes and improvements. Removed all java examples in favor of Kotlin usage
  3. Gradle files now use kotlin
  4. Respect order of Primary Key definition in insert statement
  5. Optimize more code generation
  6. RX support is bumped to RX3
  7. Breaking: Index wrapper enable and disable have been replaced with their SQL accurate counterparts createIfNotExists and drop.
  8. New: DBFLow configure DSL
FlowManager.init(context) { 
  // this is FlowConfig.Builder
  database<AppDatabase> {
    // this is DatabaseConfig.Builder
    table<MyTable> {
      // this is TableConfig.Builder
    }
  }
  // other module dbs
  databaseHolder<MyGeneratedDatabaseHolder>()
}
  1. SQL: adds random orderby method
  2. Migrations: support default values in ALTER table statement
  3. Migrations: Restore pre 5.0.0-alpha1 migration order where they run after table creation in upgrade of DB.
  4. Foreign Key Constraints: fix issue where foreign key constraint support not always enabled or done properly. Now we perform it in onConfigure of the DB.
  5. NEW: FTS4 and FTS3 support.
  6. Breaking: Require DatabaseWrapper in any db operation, removing model extension methods that are parameterless in most places. to grab DB, use database<MyDatabase> { db -> or val db = database<MyDatabase>()
  7. Breaking: Breaking change: String "?" no longer are unescaped and treated as blank INSERT value args. Use Property.WILDCARD instead.
  8. Model queries that do not run in a transaction now will log as warnings to encourage you to place them in transactions.
  9. NEW: TableObserver provides a way to observe table changes in an efficient way for observable queries.
  10. NEW: match operator for queries
  11. NEW: tables can be represented without actually being created in the DB. use createWithDatabase in the @Table or @ModelView annotations.
  12. Breaking: IMultiKeyCacheConverter -> MultiKeyCacheConverter
  13. NEW: create TEMP tables support using @Table(temporary = true)
  14. Breaking: async queries from RX asFlowable or others, instead of passing DatabaseWrapper and ModelQueriable like:
.asFlowable { d, modelQueriable -> modelQueriable.queryList(d) }

Now its the receiver parameter of the function:

.asFlowable { db -> queryList(db) }
  1. OneToMany: fix issue where cache and one to many would not work when using the all operators.
  2. FlowQueryList/FlowCursorList: allow passing own Handler to be used rather than the thread its created on.
  3. Breaking: its an error to have multiple converters on the same model type. Error message describes how to fix.
  • allow overwriting built-ins without error
  • better error messaging in general with less noise
  1. BaseProviderModel: fix potential leaking cursor when no results found.
  2. SQLCipher: Latest version is now 4.4.2, Write ahead logging support!
  3. Breaking: prepackaged dbs now can run migrations to get to current version when db version is 0 but we set our db version to something higher. This reduces errors by allowing you to keep an older version of DB as prepackaged but will run through migrations to get to current app version's DB.

Also many bug fixes!
https://github.com/agrosner/DBFlow/milestone/51?closed=1

…ore table creations when new version detected.
… add sqlcolumndefinitions prop on table to remove redundant filter on type.
…model type. Error message describes how to fix.

 - allow overwriting built-ins without error
 - better error messaging in general with less noise
- instead of initing all dbs every test.
… when db version is 0 but we set our db version to something higher.
…processor throwing in param type class object.
…DBFlow into develop

� Conflicts:
�	usage2/README.md
�	usage2/rxjavasupport.md
�	usage2/usage/models.md
@agrosner agrosner self-assigned this Mar 13, 2021
@agrosner agrosner merged commit 590f3dd into master Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant