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
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
246 commits
Select commit Hold shift + click to select a range
d824f56
[Tests] fix broken tests.
agrosner Oct 21, 2018
da0ab5f
[Insert] respect order of primary key definition in insert statement.
agrosner Oct 21, 2018
3a02f4f
[Caching] consolidate construction of cache adapter by specifying dyn…
agrosner Oct 21, 2018
c93e4d1
[RX] fix file locations to match package changes.
agrosner Oct 21, 2018
1470f93
[Index] consolidate method name on Index to match IndexProperty. Upda…
agrosner Oct 21, 2018
8827320
[List] update usage.
agrosner Oct 21, 2018
96d064a
[Modules] update usage. add kotlin class param for database holders.
agrosner Oct 21, 2018
dd63b82
[QueryModels] update documentation to match 5.0.0 api.
agrosner Oct 21, 2018
7b141ab
[ModelViews] simplify doc.
agrosner Oct 21, 2018
55c395c
[Migrations] abstract out migration file handling. put migrations bef…
agrosner Oct 25, 2018
ce51a58
[Database] remove reliance on contentvalues except for content provid…
agrosner Oct 25, 2018
7aa28d5
[Query] move infix extension defaults into interface for IConditional.
agrosner Oct 25, 2018
1931e29
[Query] move constrain implementation into interface.
agrosner Oct 25, 2018
a845ed4
[Query] clone self for wherebase in where.
agrosner Oct 25, 2018
f1e8c09
[DB] rename getter to property for saveQueue.
agrosner Oct 25, 2018
ff4c7ed
[Priority] remove builder, add extension to easily convert a transact…
agrosner Oct 25, 2018
e5898e0
[OneToMany] fix issue where onetomany reference object started with n…
agrosner Oct 26, 2018
2a9acbf
[Transactions] enforce worker thread on executing transaction on the …
agrosner Oct 26, 2018
8efba47
[Query] add random() method and random() orderby support. #1608
agrosner Oct 26, 2018
07582ea
[Query] make random property static on jvm. #1608
agrosner Oct 26, 2018
34cac30
[Models] fix property with name of "setter" and "getter".
agrosner Oct 26, 2018
7457148
[Property] add namealias overload to use NameAlias directly.
agrosner Oct 26, 2018
b64a5a9
[Doc] update module documentation to use annotationprocessor instead …
agrosner Oct 26, 2018
8d53e43
[Doc] add example about how to use coroutines, paging, and daos in th…
agrosner Oct 27, 2018
b0c978a
[Paging] update to use androidx dep. update rx dep.
agrosner Oct 27, 2018
7da3255
[Coroutines] update to 30.2 version.
agrosner Oct 27, 2018
de8a6db
[Columns] add androidX looking for non null.
agrosner Oct 27, 2018
207ee95
[Deps] add androidx appcompat dependency.
agrosner Oct 27, 2018
dfbc67b
[Processor] consolidate column into a type variable from a few props.…
agrosner Oct 27, 2018
a57091d
[Processor] consolidate mirroredtypexception handling into an inline …
agrosner Oct 27, 2018
390009b
[Processor] more code cleanup including returning typemirror directly…
agrosner Oct 27, 2018
4a08cb8
[Processor] cleanup reference definition, some code consolidation.
agrosner Oct 27, 2018
d5a4c2d
[Processor] cleanup code. fix foreignkeyelement name not referenced p…
agrosner Oct 27, 2018
09ec42f
[Processor] more cleanup. make className a val on databaseholderdefin…
agrosner Oct 27, 2018
d752050
[Processor] make writer utils an extension.
agrosner Oct 27, 2018
e34d1ce
[Migrations] support alter table add column with default value.
agrosner Oct 27, 2018
6c30dd1
[Migrations] fix priority documentation to match implementation.
agrosner Oct 27, 2018
6f947c6
[Content] add ability to specify a databaseholder to initialize befor…
agrosner Oct 27, 2018
b9ead96
[LiveData] add initial artifact for livedata observing queries.
agrosner Oct 27, 2018
34d4228
[RX2] emit once per subscribe. cleanup register call.
agrosner Oct 28, 2018
a507a4b
[LiveData] emit on active. add test to verify livedata returns values.
agrosner Oct 28, 2018
064b054
[Docs] update to include livedata as an artifact.
agrosner Oct 28, 2018
9eb41a3
[LiveData] add doc.
agrosner Oct 28, 2018
bae4d9a
GitBook: [develop] 26 pages modified
agrosner Oct 28, 2018
5d54803
[Cursor] remove unnecessary wrapping of flowcursor in provider models.
agrosner Oct 29, 2018
e00804f
Merge branch 'develop' of https://github.com/agrosner/DBFlow into dev…
agrosner Oct 29, 2018
65255bd
[CursorList] replace single method interface with typealias.
agrosner Oct 29, 2018
5b37a2b
[CursorList] replace single method interface with typealias.
agrosner Oct 29, 2018
a4efdf8
[Property] consolidate name alias property and constructors. move get…
agrosner Oct 29, 2018
5d3462e
[DB] consolidate db methods into passing a db param. remove extension…
agrosner Oct 29, 2018
8521a1b
[DB] require databasewrapper in model + modelqueriable methods. remov…
agrosner Oct 29, 2018
e097840
[Transaction] add ready callback to supply before transaction executes.
agrosner Oct 29, 2018
e697f9c
[Docs] update observability docs.
agrosner Oct 29, 2018
cfbc1e1
[Docs] switch away from using kotlin extension on model queries. swit…
agrosner Oct 29, 2018
df47086
[RX] add convenience extension on Any. require DatabaseWrapper on Bas…
agrosner Oct 29, 2018
8d981de
[Trigger] make static strings const.
agrosner Oct 29, 2018
30cff68
[Docs] more updates to new usage.
agrosner Nov 6, 2018
9ce9da2
Merge branch 'master' into develop
agrosner Nov 6, 2018
27ac203
[kotlin] update to kotlin 1.3.0. utilize kotlinx coroutines 1.0.0.
agrosner Nov 6, 2018
c8306b8
[Docs] add documentation on kotlin support for a few kotlin-specific …
agrosner Nov 6, 2018
c52f5a8
[FTS4] add virtual table annotation.
agrosner Nov 11, 2018
571946b
[Table] remove file target allowance.
agrosner Nov 11, 2018
6359838
[Processor] refactor a few redundant fields into a behavior class.
agrosner Nov 11, 2018
76a863a
[Processor] fix compile with querymodeldefinition by introducing mult…
agrosner Nov 11, 2018
2c0462e
[Processor] make base table definition define MethodDefinition array …
agrosner Nov 11, 2018
4920829
[Tables] consolidate load from cursor listener logic.
agrosner Nov 11, 2018
ac1d14e
[Tables] add cursorhandling behavior, which consolidates all of loadi…
agrosner Nov 12, 2018
2f84a3f
[Tables] simplify access to database definition by making it lazy non…
agrosner Nov 12, 2018
1f268f4
[Tables] add primary key column behavior.
agrosner Nov 12, 2018
0a25e7c
[Processor] rename from BaseTableDefinition.
agrosner Nov 12, 2018
4bf54ec
[Table] caching now a behavior.
agrosner Nov 12, 2018
6f70a4b
[Table] caching sets its fields from table reading.
agrosner Nov 12, 2018
e2de11c
[Table] more cleanup.
agrosner Nov 12, 2018
f943619
[Definition] utilize kotlin val to clean up vars a ton in basedefinit…
Nov 12, 2018
91fc6cb
[Gradle] update version to 3.3.0-beta03.
Nov 12, 2018
2474f2d
[Definition] simplify outdated code on getelementclassname method.
Nov 12, 2018
8719ba8
[Database] remove deprecated annotation parameters.
Nov 12, 2018
9a15e57
[Database] simplify the database definition class for annotation to m…
Nov 12, 2018
b6d73e2
[Database] simplify the database definition class for annotation to m…
Nov 12, 2018
fd409c2
[Database] remove separate field databaseClassName pointing to simple…
Nov 12, 2018
a192adf
[Processor] Remove traces of class separator in definition classes.
Nov 12, 2018
4c8b238
[Provider] clean up annotation use by making it non null.
Nov 12, 2018
28219b5
[Provider] Extract out ContentUriDefinition and put its code adding i…
Nov 12, 2018
406495b
[Provider] improve immutabilility of notify and tableendpoint definit…
Nov 12, 2018
edd9851
Merge branch 'fts4' of https://github.com/agrosner/DBFlow into fts4
Nov 12, 2018
df4c411
[Table] more cleanup and efficiency helpers.
Nov 12, 2018
c504e23
[Processor] make reference column definition more safe. add behavior …
Nov 13, 2018
20d95f1
[Entities] consolidate some of the logic between modelview and query …
Nov 13, 2018
10d5022
[Entities] support foreign key reference where referenced primary key…
Nov 13, 2018
1782390
[Columns] significantly consolidate wrappper / type converter logic i…
Nov 13, 2018
0209fec
[Version] update tp 3.3.0-beta04 of the gradle plugin.
Nov 13, 2018
7024927
[Migrations] migrations get immutable fields.
Nov 13, 2018
bbacc07
[Virtual] Add methods to virtual table including handling annotation …
Nov 14, 2018
37a5fc5
[Processor] clean up usage on handlers by requiring annotation on all…
Nov 14, 2018
0ec55ac
[Processor] put annotation class in constructor of main handler, rena…
Nov 14, 2018
8348e9b
[TableDefinition] Clean up table annotation use.
Nov 14, 2018
c375d88
[VirtualTable] output class files now. Add adapter class.
Nov 14, 2018
792e13d
[Entities] allow querymodels and virtual tables to check for existenc…
Nov 14, 2018
0bd7b70
[VirtualTable] add in content table reference for creation if specified
Nov 14, 2018
593bf68
[VirtualTable] add MATCH operator to language queries.
Nov 14, 2018
ca38581
[Property] fix issue with toString removed. add tests for operator an…
agrosner Nov 14, 2018
c31347d
[Match] add match validation test.
agrosner Nov 14, 2018
3a4a0e4
[Entities] standardize creation properties into common interface. ena…
agrosner Nov 14, 2018
34a9849
[Entities] fix logic in code creation.
agrosner Nov 14, 2018
1f5ebc6
[VirtualTable] create table, add it to creation at db creation, updat…
agrosner Nov 14, 2018
3f6a2b9
[Tests] move to instrumentation on a real device.
Nov 14, 2018
3305948
fix compile.
Nov 15, 2018
df8cdd9
[Tests] move all code gen to android test directory for testing.
Nov 15, 2018
6c98983
[VirtualTable] utilize power of Table annotation by adding optional e…
agrosner Nov 15, 2018
8e9a05f
[VirtualTable] add fts3 initial support.
agrosner Nov 15, 2018
0392385
GitBook: [develop] 25 pages modified
agrosner Nov 15, 2018
ba3ebf6
Merge branch 'develop' of https://github.com/agrosner/DBFlow into fts4
Nov 15, 2018
2624fd9
[VirtualTable] remove VirtualTableAdapter (not needed).
Nov 15, 2018
b5c92c0
Merge pull request #1634 from agrosner/fts4
agrosner Nov 15, 2018
594733e
[Query] Breaking change: String "?" no longer are unescaped and treat…
Nov 16, 2018
7700423
[Operator] cleanup code to not return null and simplify some of the l…
Nov 16, 2018
5fd9ab2
[Operator] simplify logic.
Nov 16, 2018
61b6524
[Observer] first class to start tracking changes.
Nov 16, 2018
28b956f
[Database] add isInTransaction method to databasewrapper. fix file lo…
agrosner Nov 18, 2018
7c6383f
[Observers] add db trigger construction. add collection of triggermet…
agrosner Nov 18, 2018
fa1acd9
[Observers] move into own package.
agrosner Nov 19, 2018
4fd9e01
[View] allow property use for ModelViewQuery. update docs.
Nov 19, 2018
43587bb
Merge branch 'better-observing' of https://github.com/agrosner/DBFlow…
Nov 19, 2018
289d8e2
[View] allow property use for ModelViewQuery. update docs.
Nov 19, 2018
6987787
[Docs] update outdated db doc.
Nov 19, 2018
2ba127f
[Observing] complete initial implementation of table tracking.
Nov 19, 2018
6ca29ce
[Observing] add lock on closing and fix pending refresh bug.
Nov 19, 2018
45264d1
[DB] added journal mode to support writeaheadlogging directly in lib.
Nov 19, 2018
53198e3
[Observer] fix crash when attempting to run check for updates on obse…
Nov 19, 2018
5f760a0
[Operator] fix overload.
Nov 19, 2018
66bd7d2
[ModelView] fix compile.
Nov 19, 2018
0b5d299
Merge branch 'develop' into better-observing
Nov 19, 2018
f0c7206
[Observability] wrap the internal database callback in a wrapper and …
Nov 19, 2018
8bef3e6
[Observability] enable back calls.
Nov 19, 2018
e8ea637
[Observability] fix trigger naming that did not work. properly find r…
Nov 19, 2018
5cebb98
[RX] updates now backed by the new notification system.
Nov 19, 2018
c08e34e
[Observability] warn for all modeladapter modifications if not in tra…
Nov 19, 2018
2c6f036
[DataSource] move to new observing pattern.
Nov 20, 2018
8ca3075
[LiveData] swap with new implementation.
agrosner Nov 24, 2018
2fba0be
[Select] add inline class, update kotlin version.
agrosner Jan 30, 2021
33e4175
[DB] try catch on cipher error.
agrosner Jan 30, 2021
83714b7
[Setup] update kotlin version and gradle wrapper
agrosner Jan 30, 2021
95730ad
[Tests] fix compile
agrosner Jan 30, 2021
743076f
[Deps] update rx to version 3. update to latest stable of arch comps.
agrosner Jan 30, 2021
9ab3a74
[Build] remove unused param warning where database for table not requ…
agrosner Jan 30, 2021
e84766d
[Tests] check for changes in LiveDataTest.kt. fix test failures
agrosner Jan 30, 2021
137fdfc
[Processor] provide default exists method to reduce generated code.
agrosner Jan 31, 2021
28e5369
[SQL] remove redundant spread op.
agrosner Feb 1, 2021
aca3286
[DB] add doc on tableobserver prop.
agrosner Feb 1, 2021
98c3e93
Merge pull request #1712 from agrosner/better-observing
agrosner Feb 1, 2021
99ca0c5
[DB] deprecate QueryModelAdapter.kt and use retrievaladapter instead.
agrosner Feb 1, 2021
c5130c4
[Setup] add incremental annotation processor support.
agrosner Feb 1, 2021
f04d184
[Processor] remove redundant qualifier.
agrosner Feb 1, 2021
4bd74d6
[Tests] fix process crash on one ContentProviderTests.kt
agrosner Feb 1, 2021
7d6b723
[Provider] Fix issue with testing content provider.
agrosner Feb 2, 2021
130772a
[Provider] mark testonly.
agrosner Feb 2, 2021
0c995d8
[Cache] rename the oddly named IMultiKeyCacheConverter.kt to MultiKey…
agrosner Feb 2, 2021
a9907e7
GitBook: [develop] 30 pages modified
agrosner Feb 2, 2021
fa608c6
[Query] add doc on async.
agrosner Feb 2, 2021
f41a1d6
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 2, 2021
a95c42f
GitBook: [develop] 2 pages modified
agrosner Feb 2, 2021
c282bfc
[Index] update test model with newer kotlin array syntax
agrosner Feb 2, 2021
c148fd7
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 2, 2021
1c5007c
GitBook: [develop] 2 pages modified
agrosner Feb 2, 2021
66a4cb0
[Query] replace deprecated use of queryModelAdapter for retrievalAdapter
agrosner Feb 2, 2021
a605180
[Migration] make AlterTableMigration.kt open again.
agrosner Feb 2, 2021
638dee9
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 2, 2021
3513785
[Migration] add kclass constructors.
agrosner Feb 2, 2021
0b2a31c
GitBook: [develop] 29 pages modified
agrosner Feb 2, 2021
b533fce
[RX] fix exists naming.
agrosner Feb 3, 2021
9d5a15b
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 3, 2021
58729a2
GitBook: [develop] 31 pages modified
agrosner Feb 3, 2021
0695db1
GitBook: [develop] one page modified
agrosner Feb 3, 2021
402f1d4
GitBook: [develop] one page modified
agrosner Feb 3, 2021
ffeb928
GitBook: [develop] one page modified
agrosner Feb 3, 2021
9c4f3cd
[DB] fix migration order
agrosner Feb 3, 2021
f2ba8c5
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 3, 2021
4ee8b30
[SQL] remove custom cache as it wasnt doing anything
agrosner Feb 3, 2021
0d844c4
GitBook: [develop] 30 pages modified
agrosner Feb 3, 2021
a29b074
GitBook: [develop] one page modified
agrosner Feb 3, 2021
2877da6
[Docs] remove floating README.md
agrosner Feb 3, 2021
645bc07
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 3, 2021
a4a11b2
[Docs] update version
agrosner Feb 3, 2021
e1e8af7
[Tests] add tests for dao class retrievals. also opt in for experimen…
agrosner Feb 3, 2021
334da2f
[Lint] fix lint warnings and possible crashes from jvm interop.
agrosner Feb 8, 2021
c4732a0
[Lint] fix lint warnings and possible crashes from jvm interop.
agrosner Feb 10, 2021
4fad976
GitBook: [develop] 30 pages modified
agrosner Feb 10, 2021
1cc2b95
GitBook: [develop] one page modified
agrosner Feb 10, 2021
e3100b3
GitBook: [develop] 2 pages modified
agrosner Feb 10, 2021
c5d55de
GitBook: [develop] 2 pages modified
agrosner Feb 10, 2021
45d0ec8
GitBook: [develop] 2 pages modified
agrosner Feb 10, 2021
0d1c819
GitBook: [develop] 2 pages modified
agrosner Feb 10, 2021
a169461
GitBook: [develop] 30 pages modified
agrosner Feb 10, 2021
fd3c774
[Query] rewrite insert query using buildString.
agrosner Feb 11, 2021
6776f8a
[Fts4] fix fts4 test.
agrosner Feb 11, 2021
96789cb
[Fts4] add match query checking.
agrosner Feb 11, 2021
6b17fcd
[Query] add table name property convenience.
agrosner Feb 11, 2021
8b1efdb
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 11, 2021
68ba538
[Fts4] add docId convenience property
agrosner Feb 11, 2021
b18e84f
[Fts4] add snippet and offsets function support.
agrosner Feb 11, 2021
680b03a
[Fts] improve and clean up FTS code.
agrosner Feb 11, 2021
88c0781
[Gradle] convert all scripts to kotlin!
agrosner Feb 13, 2021
ddfbd34
[Table] don't reassign parameter in function.
agrosner Feb 14, 2021
b535a79
[Example] add foreign key generate helper
agrosner Feb 14, 2021
b040aba
[OneToMany] fix issue where cache and one to many would not work when…
agrosner Feb 14, 2021
f8bc1ff
[Table] add ability to create temp tables.
agrosner Feb 16, 2021
d6c8b10
[Table] fix issue where NotNull applied to foreignkey field doesn't a…
agrosner Feb 16, 2021
6a81a40
[LiveData] rename toLiveData
agrosner Feb 16, 2021
46b3274
[Config] convert back typealias to fun interfaces to keep JVM signatu…
agrosner Feb 17, 2021
96a523e
[Config] convert other tests to use the dsl
agrosner Feb 17, 2021
fdd4e1d
[Config] simplify even further.
agrosner Feb 17, 2021
5e03065
[Config] add inMemoryDatabase dsl helper.
agrosner Feb 17, 2021
b059fc7
GitBook: [develop] 30 pages modified
agrosner Feb 17, 2021
1f2f77e
GitBook: [develop] 4 pages modified
agrosner Feb 17, 2021
76c981f
[Views] rollback property support for ModelViewQuery.kt. need more si…
agrosner Feb 17, 2021
86a1fa8
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 17, 2021
209e682
[Caching] make MultiKeyCacheConverter.kt fun interface.
agrosner Feb 17, 2021
1e45a39
GitBook: [develop] 30 pages modified
agrosner Feb 17, 2021
630cdbf
[Config] make the databaseholder method inline reified.
agrosner Feb 17, 2021
52b75d2
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 17, 2021
e6690f3
GitBook: [develop] 30 pages modified
agrosner Feb 17, 2021
c00560b
[QueryList] allow specifying a custom handler
agrosner Feb 17, 2021
932ef8d
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 17, 2021
928ed90
[TypeConverter] its an error to have multiple converters on the same …
agrosner Feb 17, 2021
b763a77
[ProviderModel] fix potential leaking cursor when no results found.
agrosner Feb 17, 2021
0f7ba59
[DB] move pragma for foreign keys into the onconfigure method of the …
agrosner Feb 17, 2021
7d461d6
GitBook: [develop] 3 pages modified
agrosner Feb 17, 2021
1c3c829
[DB] make default DatabaseCallback.kt methods.
agrosner Feb 17, 2021
62ce59a
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 17, 2021
2d85b79
[Async] make the queriable param the receiver for more concise ops on…
agrosner Feb 17, 2021
38e5845
GitBook: [develop] 2 pages modified
agrosner Feb 17, 2021
9338ba4
[DB] simplify AndroidSQLiteOpenHelper.kt impl. simplify some legacy c…
agrosner Feb 18, 2021
731edd0
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 18, 2021
a4b3680
[DB] WAL support on SQLcipher
agrosner Feb 18, 2021
5ad4d86
[DB] openhelper is lazy
agrosner Feb 18, 2021
fca6d72
[DB] remove unused method for now
agrosner Feb 18, 2021
12ad960
[FlowCursor] make -1 a constant.
agrosner Feb 18, 2021
bd5305e
[Tests] split out db initialization during tests
agrosner Feb 18, 2021
e9e2651
[DB] prepackaged dbs now can run migrations to get to current version…
agrosner Feb 18, 2021
a580b5f
[DB] remove static getMigrations method in favor of accessing the db …
agrosner Feb 21, 2021
445c520
[Processor] update error message. #1567
agrosner Feb 21, 2021
010a526
[Queue] fix synchronization issue with quitting. #1676
agrosner Feb 21, 2021
354a7a9
[Processor] type erase parameterized type converters. fix issue with …
agrosner Feb 21, 2021
04e3e2a
[Processor] fix issue where reference annotation used on nonmodel col…
agrosner Feb 21, 2021
9ff4dac
[Tests] add one set for update table migration.
agrosner Feb 21, 2021
9a57e27
Merge branches 'develop' and 'master' of https://github.com/agrosner/…
agrosner Mar 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# .github

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Add artifacts to your project:

// Android Architecture Components Paging Library Support
implementation "com.github.agrosner.dbflow:paging:${dbflow_version}"

// Android Architecture Components LiveData Library Support
implementation "com.github.agrosner.dbflow:livedata:${dbflow_version}"

Expand Down
14 changes: 7 additions & 7 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
* [TypeConverters](usage2/usage/typeconverters.md)
* [Observability](usage2/usage/observability.md)
* [RXJavaSupport](usage2/rxjavasupport.md)
* [Advanced Usage](usage2/advanced-usage/README.md)
* [Caching](usage2/advanced-usage/caching.md)
* [ListBasedQueries](usage2/advanced-usage/listbasedqueries.md)
* [MultipleModules](usage2/advanced-usage/multiplemodules.md)
* [QueryModels](usage2/advanced-usage/querymodels.md)
* [Indexing](usage2/advanced-usage/indexing.md)
* [SQLCipher](usage2/advanced-usage/sqlciphersupport.md)
* [ContentProviderGeneration](usage2/contentprovidergeneration.md)
* [Migration4Guide](usage2/migration4guide.md)
* [Advanced Usage](advanced-usage/README.md)
* [Caching](advanced-usage/caching.md)
* [List Queries](advanced-usage/listbasedqueries.md)
* [Multiple Modules](advanced-usage/multiplemodules.md)
* [QueryModels](advanced-usage/querymodels.md)
* [Indexing](advanced-usage/indexing.md)
* [SQLCipher](advanced-usage/sqlciphersupport.md)
* [ISSUE\_TEMPLATE](issue_template.md)
* [.github](.github/README.md)
* [CONTRIBUTING](.github/contributing.md)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Do not use caching when: 1. you need a subset of columns from the DB. i.e. \(`se

## Clearing Caches

Sometimes the data becomes out of sync, or you perform a vanilla SQLite query, which causes data to get out of sync from the cache. In those cases
call:
Sometimes the data becomes out of sync, or you perform a vanilla SQLite query, which causes data to get out of sync from the cache. In those cases call:

```kotlin
modelAdapter<MyTable>().cacheAdapter.clearCache()
```
Expand Down Expand Up @@ -110,3 +110,4 @@ class Coordinate(@PrimaryKey latitude: Double = 0.0,
```

In this case we use the `IMultiKeyCacheConverter` class, which specifies a key type that the object returns. The `getCachingKey` method returns an ordered set of `@PrimaryKey` columns in declaration order. Also the value that is returned should have an `equals()` or `hashcode()` specified \(use a `data class`\) especially when used in the `SimpleMapCache`.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ In SQLite, an `Index` is a pointer to specific columns in a table that enable su

Indexes are defined using the `indexGroups()` property of the `@Table` annotation. These operate similar to how `UniqueGroup` work: 1. specify an `@IndexGroup` 2. Add the `@Index` 3. Build and an `IndexProperty` gets generated. This allows super-easy access to the index so you can enable/disable it with ease.

**Note**: `Index` are not explicitly enabled unless coupled with an `IndexMigration`. \([read here](../usage/migrations.md#index-migrations)\).
**Note**: `Index` are not explicitly enabled unless coupled with an `IndexMigration`. \([read here](../usage2/usage/migrations.md#index-migrations)\).

You can define as many `@IndexGroup` you want within a `@Table` as long as one field references the group. Also individual `@Column` can belong to any number of groups:

Expand Down Expand Up @@ -63,3 +63,4 @@ index.createIfNotExists(database)

index.drop(database)
```

Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# ListBasedQueries
# List Queries

Converting a whole list at one chunk can be memory intensive. This lazily creates models from a `Cursor` for you and you can operate on it s if it's a list. It a acts like a list can be used in a for-loop:


```kotlin
(select from MyTable::class
where ...) // some conditions
Expand All @@ -21,7 +20,6 @@ Converting a whole list at one chunk can be memory intensive. This lazily create

list.forEach { printLn("$it") }
}

```

**Note**: It's preferred within a `RecyclerView` to use the `QueryDataSource` with the Paging library, as this use can potentially lock the UI thread during heavy db usage.
Expand All @@ -43,3 +41,4 @@ The `FlowCursorList` provides these methods:
This class is a much more powerful version of the `FlowCursorList`. It contains a `FlowCursorList`, which backs it's retrieval operations.

This class acts as `List` and can be used almost wherever a `List` is used.

Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# MultipleModules
# Multiple Modules

In apps that want to share DBFlow across multiple modules or when developing a library module that uses DBFlow, we have to provide a little extra configuration to properly ensure that all database classes are accounted for.

It's directly related to the fact that annotation processors are isolated between projects and are not shared.

In order to add support for multiple modules, in each and every library/subproject that uses a DBFlow instance,
you must add an annotation processing argument to its `build.gradle`:
In order to add support for multiple modules, in each and every library/subproject that uses a DBFlow instance, you must add an annotation processing argument to its `build.gradle`:

Using KAPT:

Expand All @@ -17,6 +16,7 @@ kapt {
}
}
```

or if you use Android/Java:

```java
Expand All @@ -28,12 +28,9 @@ javaCompileOptions {
}
```

By passing the targetModuleName, we append that to the `GeneratedDatabaseHolder` class name to create the `{targetModuleName}GeneratedDatabaseHolder` module.
**Note**: Specifying this in code means you need to specify the module when initializing DBFlow:
By passing the targetModuleName, we append that to the `GeneratedDatabaseHolder` class name to create the `{targetModuleName}GeneratedDatabaseHolder` module. **Note**: Specifying this in code means you need to specify the module when initializing DBFlow:

From previous sample code, we recommend initializing the specific module inside your library,
to prevent developer error. **Note**: Multiple calls to `FlowManager` will not adversely affect DBFlow.
If DBFlow is already initialized, we append the module to DBFlow if and only if it does not already exist.
From previous sample code, we recommend initializing the specific module inside your library, to prevent developer error. **Note**: Multiple calls to `FlowManager` will not adversely affect DBFlow. If DBFlow is already initialized, we append the module to DBFlow if and only if it does not already exist.

```kotlin
fun initialize(context: Context) {
Expand All @@ -42,3 +39,4 @@ fun initialize(context: Context) {
.build())
}
```

Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,13 @@ And adjust our query to handle the new output:
.execute { transaction, list ->
// utilize list
}

```

## Query Model Support

`QueryModel` are read-only. We can only retrieve from DB into a cursor.

They support inheritance and visibility modifiers as defined by [Models](../usage/models.md).
They support inheritance and visibility modifiers as defined by [Models](../usage2/usage/models.md).

`QueryModel` **do not** support: 1. `InheritedField`/`InheritedPrimaryKey` 2. `@PrimaryKey`/`@ForeignKey` 3. direct caching. 4. changing "useBooleanGetterSetters" for private boolean fields.

`QueryModel` **do not** support:
1. `InheritedField`/`InheritedPrimaryKey`
2. `@PrimaryKey`/`@ForeignKey`
3. direct caching.
4. changing "useBooleanGetterSetters" for private boolean fields.
19 changes: 6 additions & 13 deletions gettingstarted.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Getting Started
# GettingStarted

This section describes how Models and tables are constructed via DBFlow. first let's describe how to get a database up and running.

Expand All @@ -19,10 +19,7 @@ public abstract class AppDatabase extends DBFlowDatabase {

The name of the database by default is the class name. To change it, read [here](usage2/usage/databases.md).

Writing this file generates \(by default\) a `AppDatabaseAppDatabase_Database.java` file, which contains tables, views, and more all tied to a specific database.
This class is automatically placed into the main `GeneratedDatabaseHolder`,
which holds potentially many databases.
The name, `AppDatabaseAppDatabase_Database.java`, is generated via {DatabaseClassName}{DatabaseFileName}\_Database
Writing this file generates \(by default\) a `AppDatabaseAppDatabase_Database.java` file, which contains tables, views, and more all tied to a specific database. This class is automatically placed into the main `GeneratedDatabaseHolder`, which holds potentially many databases. The name, `AppDatabaseAppDatabase_Database.java`, is generated via {DatabaseClassName}{DatabaseFileName}\_Database

To learn more about what you can configure in a database, read [here](usage2/usage/databases.md)

Expand Down Expand Up @@ -100,7 +97,7 @@ You can define different kinds for each database. To read more on transactions a

Creating models are as simple as defining the model class, and adding the `@Table` annotation. To read more on this, read [here](usage2/usage/models.md).

**For now**: Models must provide a default, parameterless constructor. Also, all fields must be mutable (currently, we hope to evolve this requirement in the near future). An example:
**For now**: Models must provide a default, parameterless constructor. Also, all fields must be mutable \(currently, we hope to evolve this requirement in the near future\). An example:

```kotlin
@Table(database = TestDatabase::class)
Expand Down Expand Up @@ -142,12 +139,11 @@ public class Currency {

## Build Your DAO

Set up a DAO (Data Access Object) to help you interact with your database. Using dependency injection and service locating, we can build better, highly testable code. While not required to use DBFlow, it is __highly__ recommended utilize this approach.
Set up a DAO \(Data Access Object\) to help you interact with your database. Using dependency injection and service locating, we can build better, highly testable code. While not required to use DBFlow, it is **highly** recommended utilize this approach.

With kotlin, we can utilize it in a powerful way:

```kotlin

/**
* Create this class in your own database module.
*/
Expand Down Expand Up @@ -188,7 +184,6 @@ interface CurrencyDAO : DBProvider<AppDatabase> {
.toDataSourceFactory(database)

}

```

DBFlow uses expressive builders to represent and translate to the SQLite language.
Expand All @@ -202,20 +197,18 @@ SELECT * FROM Currency WHERE symbol='$';
Wherever we perform dependency injection we supply the instance:

```kotlin

fun provideCurrencyDAO(db: AppDatabase) = object : CurrencyDAO {
override val database: AppDatabase = db
}

```

Then in our `ViewModel`, we can inject it via the constructor and utilize it in our queries:
```kotlin

```kotlin
class SampleViewModel(private currencyDAO: CurrencyDAO)

```

We support many kinds of complex and complicated queries using the builder language. To read more about this, see [the wrapper language docs](usage2/usage/sqlitewrapperlanguage.md)

There is much more you can do in DBFlow. Read through the other docs to get a sense of the library.

3 changes: 2 additions & 1 deletion usage2/including-in-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Add artifacts to your project:

// Android Architecture Components Paging Library Support
implementation "com.github.agrosner.dbflow:paging:${dbflow_version}"

// Android Architecture Components LiveData Library Support
implementation "com.github.agrosner.dbflow:livedata:${dbflow_version}"

Expand All @@ -79,3 +79,4 @@ Add artifacts to your project:

}
```

2 changes: 1 addition & 1 deletion usage2/usage/databases.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Databases can get corrupted or in an invalid state at some point. If you specify

### Custom FlowSQLiteOpenHelper

For variety of reasons, you may want to provide your own `FlowSQLiteOpenHelper` to manage database interactions. To do so, you must implement `OpenHelper`, but for convenience you should extend `AndroidSQLiteOpenHelper` \(for Android databases\), or `SQLCipherOpenHelper` for SQLCipher. Read more [here](../advanced-usage/sqlciphersupport.md)
For variety of reasons, you may want to provide your own `FlowSQLiteOpenHelper` to manage database interactions. To do so, you must implement `OpenHelper`, but for convenience you should extend `AndroidSQLiteOpenHelper` \(for Android databases\), or `SQLCipherOpenHelper` for SQLCipher. Read more [here](../../advanced-usage/sqlciphersupport.md)

```kotlin
class CustomFlowSQliteOpenHelper(context: Contect, databaseDefinition: DatabaseDefinition, listener: DatabaseHelperListener) : FlowSQLiteOpenHelper(context, databaseDefinition, listener)
Expand Down
11 changes: 3 additions & 8 deletions usage2/usage/migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,9 @@ object AppDatabase {
}
```

The classes provide the ability to set a `priority` on the `Migration` so that an order is
established if more than one migration is to run on the same DB version upgrade.
They are in reverse order - lower the priority, that one will execute first.
The classes provide the ability to set a `priority` on the `Migration` so that an order is established if more than one migration is to run on the same DB version upgrade. They are in reverse order - lower the priority, that one will execute first.

`Migration` have three methods:
1. `onPreMigrate()` - called first, do setup, and construction here.
2. `migrate()` -&gt; called with the `DatabaseWrapper` specified, this is where the actual migration code should execute.
3. `onPostMigrate()` -&gt; perform some cleanup, or any notifications that it was executed.
`Migration` have three methods: 1. `onPreMigrate()` - called first, do setup, and construction here. 2. `migrate()` -&gt; called with the `DatabaseWrapper` specified, this is where the actual migration code should execute. 3. `onPostMigrate()` -&gt; perform some cleanup, or any notifications that it was executed.

### Migration files

Expand Down Expand Up @@ -119,7 +114,7 @@ class Migration2 : AlterTableMigration<AModel>(AModel::class.java) {

### Index Migrations

An `IndexMigration` \(and `IndexPropertyMigration`\) is used to structurally activate an `Index` on the database at a specific version. See [here](../advanced-usage/indexing.md) for information on creating them.
An `IndexMigration` \(and `IndexPropertyMigration`\) is used to structurally activate an `Index` on the database at a specific version. See [here](../../advanced-usage/indexing.md) for information on creating them.

`IndexMigration` does not require an `IndexProperty` to run, while `IndexPropertyMigration` makes use of the property to run.

Expand Down
1 change: 1 addition & 0 deletions usage2/usage/modelviews.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ The full list of limitations/supported types are: 1. Only `@Column`/`@ColumnMap`
(select from TestModelView::class
where ...) // ETC
```

1 change: 1 addition & 0 deletions usage2/usage/observability.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,4 @@ Then unregister your model change listener when you don't need it anymore \(to p
```java
DirectModelNotifier.get().unregisterForModelChanges(User.class, modelChangedListener);
```

6 changes: 3 additions & 3 deletions usage2/usage/retrieval.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DBFlow provides a few ways to retrieve information from the database. Through th

DBFlow provides a few different ways to retrieve information from the database. We can retrieve synchronously or asynchronous \(preferred\).

We can also use `ModelView` \([read here](modelviews.md)\) and `@Index` \([read here](../advanced-usage/indexing.md)\) to perform faster retrieval on a set of data constantly queried.
We can also use `ModelView` \([read here](modelviews.md)\) and `@Index` \([read here](../../advanced-usage/indexing.md)\) to perform faster retrieval on a set of data constantly queried.

## Synchronous Retrieval

Expand Down Expand Up @@ -33,9 +33,9 @@ val anotherObject = (select from Employee::class
.customSingle<AnotherTable>();
```

To query custom objects or lists, see how to do so in [QueryModel](../advanced-usage/querymodels.md).
To query custom objects or lists, see how to do so in [QueryModel](../../advanced-usage/querymodels.md).

Also you can query a `FlowCursorList`/`FlowTableList` from a query easily via `queryCursorList()` and the `queryTableList()` methods. To see more on these, go to [Flow Lists](../advanced-usage/listbasedqueries.md).
Also you can query a `FlowCursorList`/`FlowTableList` from a query easily via `queryCursorList()` and the `queryTableList()` methods. To see more on these, go to [Flow Lists](../../advanced-usage/listbasedqueries.md).

## Asynchronous Retrieval

Expand Down
2 changes: 1 addition & 1 deletion usage2/usage/sqlitewrapperlanguage.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ This appends a `WHERE (SELECT * FROM {table} )` to the query.

For reference, \([JOIN examples](http:https://www.tutorialspoint.com/sqlite/sqlite_using_joins.htm)\).

`JOIN` statements are great for combining many-to-many relationships. If your query returns non-table fields and cannot map to an existing object, see about [query models](../advanced-usage/querymodels.md)
`JOIN` statements are great for combining many-to-many relationships. If your query returns non-table fields and cannot map to an existing object, see about [query models](../../advanced-usage/querymodels.md)

For example we have a table named `Customer` and another named `Reservations`.

Expand Down
1 change: 1 addition & 0 deletions usage2/usage/storingdata.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,4 @@ database<AppDatabase>()
.withPriority(PriorityTransactionWrapper.PRIORITY_HIGH))
.execute();
```