97253f70d5f0bb5d79736629a18718526d67efa5 |
21-Sep-2017 |
Yigit Boyar <yboyar@google.com> |
Merge "Add @Transaction annotation" into oc-mr1-dev
|
2f4954c4f10e675761a365a26c90a604ffbe3d6e |
20-Sep-2017 |
TreeHugger Robot <treehugger-gerrit@google.com> |
Merge "Enforcing a NON NULL constraint on the PrimaryKey" into oc-mr1-dev
|
b3c4d9308e4fd66beca3a7824a5db749ce2aace1 |
14-Jun-2017 |
Yuichi Araki <yaraki@google.com> |
Add @Transaction annotation @Transaction can be put on methods in abstract Dao classes to make it run in a transaction. A non-abstract method is overridden in the derived Dao class and wrapped in a transaction. Test: SimpleEntityReadWriteTest, DaoWriterTest Bug: 66011356 Change-Id: I40ba2c312aa5609ecee950784498a1d811ff5722
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/UserDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/SimpleEntityReadWriteTest.java
|
2daa063034703a38a8a510727ebc8f63b49cd8b3 |
19-Sep-2017 |
Yuichi Araki <yaraki@google.com> |
Mockito on device for Room Bug: 65858477 Test: This fixes the test Change-Id: I23ea0515b24c92785b0acea3cf0747108a9960d6
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/CustomDatabaseTest.java
|
540e3498175652abe452d8e0ed1c252e718ddf5a |
13-Sep-2017 |
Florina Muntenescu <florinam@google.com> |
Enforcing a NON NULL constraint on the PrimaryKey Intended behaviour: 1. If a key is not autogenerated, but is Primary key or is part of Primary key we force the developer to add @NonNull annotation 2. if a key is autogenerate, we generate NOT NULL in table spec, but we don't require @NonNull annotation on the field itself. Bug: 64292391 Test: EntityProcessorTest, room integration tests Change-Id: I0b76122680a8f78080a715919e855aa7f414f700
ndroidTest/java/android/arch/persistence/room/integration/testapp/PKeyTestDatabase.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/PrimaryKeyTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/ObjectPKeyEntity.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/PetCouple.java
ain/java/android/arch/persistence/room/integration/testapp/database/SampleDatabase.java
|
0a8fd09f1ad194f5e644892c04b78a6fa8026335 |
15-Sep-2017 |
Chris Craik <ccraik@google.com> |
Remove Paging references to LifecycleRegistryOwner Bug: 65693564 Test: none It's deprecated, no longer needed with 26.1 Change-Id: I08895ef2a8dfdb27dc8f2afa9fce7c3e4d25381e
ain/java/android/arch/persistence/room/integration/testapp/RoomPagedListActivity.java
|
f830f7064ab813c85b14e5abee8ef349bd7e5177 |
15-Sep-2017 |
Yigit Boyar <yboyar@google.com> |
Merge "Support for the collation sequences in @ColumnInfo" into oc-mr1-dev
|
f0d13608aae3b4700d84c1c4532abbea56ea7a28 |
08-Sep-2017 |
Chris Craik <ccraik@google.com> |
Paging doc codesample improvements, api cleanup Added detail to several docs: - Both DataSources, added invalidation code. - All Adapters/AdapterHelpers, added DiffCallback samples - Simplified samples by removing @NonNull/@Nullable in specific cases Also rename loadCount -> countItems, to match with the KeyedDataSource counting APIs. Avoid need for LiveListAdapterUtil by using a weak reference from the PagedList to the data presentation layer (Adapter/AdapterHelper) Bug: 64809611 Test: ./gradlew createFlatfootDocsArchive -PofflineDocs=true Change-Id: I2df5a9891a96e96f009a311100d7ff4b48a01d3f
ndroidTest/java/android/arch/persistence/room/integration/testapp/paging/LimitOffsetDataSourceTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/ComplexQueryDataSourceTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/QueryDataSourceTest.java
ain/java/android/arch/persistence/room/integration/testapp/RoomPagedListActivity.java
|
abd098954d3fe996f336201ccb25884aaa34e07f |
12-Sep-2017 |
Yigit Boyar <yboyar@google.com> |
Move room to use TiledDataSource Bug: 64809611 Test: TypeAdapterStoreTest Change-Id: Ie65a842b64af11fa8485d5c0847cc81b2de89001
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/UserDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/paging/LimitOffsetDataSourceTest.java
|
02fd72384988665925726323665068706ecf53d8 |
11-Sep-2017 |
TreeHugger Robot <treehugger-gerrit@google.com> |
Merge "Keyed sample with save/restore, associated fixes" into oc-mr1-dev
|
fd4fa4a65be59806d14e4625397948da008506b4 |
31-Aug-2017 |
Chris Craik <ccraik@google.com> |
Keyed sample with save/restore, associated fixes Bug:64809611 Test: room-integration-tests-testapp, paging-common, paging-runtime Full keyed sample, and save/restore added to both the keyed and positional samples. Also moves DataSource#isInvalid() checks to be internal and automatic, so e.g. DB DataSources don't need to call them manually. Change-Id: I2c674b2d8d45151a23c953bd7d5354cd38f773ec
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/QueryDataSourceTest.java
ain/AndroidManifest.xml
ain/java/android/arch/persistence/room/integration/testapp/CustomerViewModel.java
ain/java/android/arch/persistence/room/integration/testapp/PagedListCustomerAdapter.java
ain/java/android/arch/persistence/room/integration/testapp/RoomKeyedPagedListActivity.java
ain/java/android/arch/persistence/room/integration/testapp/RoomPagedListActivity.java
ain/java/android/arch/persistence/room/integration/testapp/database/Customer.java
ain/java/android/arch/persistence/room/integration/testapp/database/CustomerDao.java
ain/java/android/arch/persistence/room/integration/testapp/database/LastNameAscCustomerDataSource.java
|
8575db83b616ee9f3c35a49a00f51cb672b82d2d |
04-Sep-2017 |
Yuichi Araki <yaraki@google.com> |
Merge "Fix some integration tests for Room" into oc-mr1-dev
|
ef346ae131affbba6345e00d833103acc5743c8a |
29-Aug-2017 |
Chris Craik <ccraik@google.com> |
Paging API refinements, and package name rework Bug: 64809611 Test: tests in paging-runtime, paging-common, room-integration-tests Change-Id: I1e26f130d95b31494f9a0ef734fd87594de9ddd1
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/UserDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/paging/LivePagedListProviderTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/ComplexQueryDataSourceTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/QueryDataSourceTest.java
ain/java/android/arch/persistence/room/integration/testapp/CustomerViewModel.java
ain/java/android/arch/persistence/room/integration/testapp/PagedListCustomerAdapter.java
ain/java/android/arch/persistence/room/integration/testapp/RoomPagedListActivity.java
ain/java/android/arch/persistence/room/integration/testapp/database/Customer.java
ain/java/android/arch/persistence/room/integration/testapp/database/CustomerDao.java
|
2e9d5136685b07ef5bfabcd3936b1eedb5d24e91 |
25-Aug-2017 |
Chris Craik <ccraik@google.com> |
DataSource key rework Bug: 64809611 Test: tests in paging-runtime, paging-common, room-integration-tests Test: QueryDataSourceTest, ComplexQueryDataSourceTest, LimitOffsetDataSourceTest, KeyedDataSourceTest All data sources now have a Key type, so that KeyedDataSource entirely avoids positions. Change-Id: I10ea33794621580e54876e422ffc69c3e21f453e
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/UserDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/paging/LimitOffsetDataSourceTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/paging/LivePagedListProviderTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/ComplexQueryDataSourceTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/QueryDataSourceTest.java
ain/java/android/arch/persistence/room/integration/testapp/CustomerViewModel.java
ain/java/android/arch/persistence/room/integration/testapp/database/CustomerDao.java
|
e385da30d6d674daa1dccef17e5e7ccc519bc3dd |
29-Aug-2017 |
Yigit Boyar <yboyar@google.com> |
Fix LivePagedListProviderTest The test was relying on old behavior where get triggers a load. It was also not defining the initial page size. Bug: 65016384 Test: LivePagedListProviderTest passes Change-Id: I7eec8693521caf3fbad241bf70ad932957552c86
ndroidTest/java/android/arch/persistence/room/integration/testapp/paging/LivePagedListProviderTest.java
|
6be69eb5aa66706ff5880e12c17ea6e62c35eda3 |
15-Aug-2017 |
Yuichi Araki <yaraki@google.com> |
Fix some integration tests for Room Test: test fixes Bug: 65138847 Change-Id: I6ad29b2aa19d0ee1e72ca9bc30d3dc4bdfb63ea1
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/ConstructorTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/ForeignKeyTest.java
|
9a31bf2f73304e0ad3f5e6a6261c7683bfeeff91 |
29-Aug-2017 |
Yuichi Araki <yaraki@google.com> |
Merge "InvalidationTracker.Observer for multiple tables" into oc-mr1-dev
|
8213d3809b511cd10ebf2f93e1904ff1dc340dee |
28-Aug-2017 |
Chris Craik <ccraik@google.com> |
Merge "AdapterHelper cleanups, and ContigPagedList fixes" into oc-mr1-dev
|
114bdca94b6571ef9f45ea6e826715141741d49e |
25-Aug-2017 |
Chris Craik <ccraik@google.com> |
AdapterHelper cleanups, and ContigPagedList fixes Test: ContiguousPagedListTest Bug: 64809611 - fixes off-by-one in ContiguousPagedList prepend - fixes prefetch load when data already loaded - misc doc updates Change-Id: I27cac2dcf9689b26572c4ef0ff8b3604bb46775c
ain/java/android/arch/persistence/room/integration/testapp/RoomPagedListActivity.java
|
68c65b3d9b80517aa814aa6090c99568362214ff |
27-Jul-2017 |
Yuichi Araki <yaraki@google.com> |
Support for the collation sequences in @ColumnInfo Add support for the collation sequences for database columns by putting `collate` parameter in @ColumnInfo. Bug: 62007004 Test: SimpleEntityReadWriteTest, FieldProcessorTest Change-Id: I995e200038c580721e8a8088aab7268e6dd437a4
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/UserDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/migration/MigrationDb.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/migration/MigrationTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/SimpleEntityReadWriteTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/User.java
|
08385cfa2c450904f437f8361ec3d3553834989b |
28-Aug-2017 |
Yuichi Araki <yaraki@google.com> |
InvalidationTracker.Observer for multiple tables Fix InvalidationTracker to correctly notify a set of invalidated tables when multiple tables are observed. Bug: 65099281 Test: InvalidationTest, InvalidationTrackerTest Change-Id: Ib2d1182dde844bc0169bfb8bf8eb5838102fa9d0
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/InvalidationTest.java
|
2c56b466fc39da8bc5cb82dc494e534768e65eab |
12-Aug-2017 |
shepshapard <shepshapard@google.com> |
Fix issue where the name of a common extension table is expected to be observable when a Dao returns LiveData. Bug: 62510164 Test: DaoWriterTest#updateDao, QueryMethodProcessorTest#testLiveDataWithNothingToObserve, QueryMethodProcessorTest#testLiveDataWithWithClauseAndNothingToObserve, WithClauseTest#noSourceOfData, WithClauseTest#sourceOfData, LiveDataQueryTest#withRelationOnly, LivedataQueryTest#withWithClause Change-Id: Id1ac0b5d96cb7db237630dfdd4c8c8c6b502bc28
ndroidTest/java/android/arch/persistence/room/integration/testapp/TestDatabase.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/SpecificDogDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/WithClauseDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/LiveDataQueryTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/TestDatabaseTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/WithClauseTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/PetsToys.java
|
9adfe48e0670127286c20420be729aa9eab204dc |
18-Aug-2017 |
Chris Craik <ccraik@google.com> |
Refactor PagedListAdapter(Helper), and add ListAdapter, the plain List version bug:64809611 Change-Id: Ib6627e8ccdf389d7f16b19bf30470bb485d35196
ain/java/android/arch/persistence/room/integration/testapp/PagedListCustomerAdapter.java
ain/java/android/arch/persistence/room/integration/testapp/RoomPagedListActivity.java
ain/res/values/strings.xml
|
24418e9aafa6ae3128ae47cf7087eda46dae4f5d |
18-Aug-2017 |
Chris Craik <ccraik@google.com> |
Revert "Revert "Paging refactor to unify list/data source types, and simplify mutability"" bug:64838013 Fixed build breakage. This reverts commit c051b0691f4363110fb3d62193a114b04a8ef344. Change-Id: I4fd2442d185b4b107e2db45c402f79ed9948bc38
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/UserDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/paging/LimitOffsetDataSourceTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/paging/LiveLazyListProviderTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/paging/LivePagedListProviderTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/ComplexQueryDataSourceTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/QueryDataSourceTest.java
ain/AndroidManifest.xml
ain/java/android/arch/persistence/room/integration/testapp/CustomerViewModel.java
ain/java/android/arch/persistence/room/integration/testapp/LazyListActivity.java
ain/java/android/arch/persistence/room/integration/testapp/LazyListCustomerAdapter.java
ain/java/android/arch/persistence/room/integration/testapp/PagedListCustomerAdapter.java
ain/java/android/arch/persistence/room/integration/testapp/RoomPagedListActivity.java
ain/java/android/arch/persistence/room/integration/testapp/database/CustomerDao.java
ain/res/layout/activity_recycler_view.xml
|
c051b0691f4363110fb3d62193a114b04a8ef344 |
18-Aug-2017 |
Chris Craik <ccraik@google.com> |
Revert "Paging refactor to unify list/data source types, and simplify mutability" bug:64838013 Fix build breakage This reverts commit 1cb45e73a41f91534febb7e5d799e1f703fb3763. Change-Id: I88d2c954f48f1c6693ccfc31b3b62a37c5abac9a
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/UserDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/paging/LimitOffsetDataSourceTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/paging/LiveLazyListProviderTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/paging/LivePagedListProviderTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/ComplexQueryDataSourceTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/QueryDataSourceTest.java
ain/AndroidManifest.xml
ain/java/android/arch/persistence/room/integration/testapp/CustomerViewModel.java
ain/java/android/arch/persistence/room/integration/testapp/LazyListActivity.java
ain/java/android/arch/persistence/room/integration/testapp/LazyListCustomerAdapter.java
ain/java/android/arch/persistence/room/integration/testapp/PagedListCustomerAdapter.java
ain/java/android/arch/persistence/room/integration/testapp/RoomPagedListActivity.java
ain/java/android/arch/persistence/room/integration/testapp/database/CustomerDao.java
ain/res/layout/activity_recycler_view.xml
|
1cb45e73a41f91534febb7e5d799e1f703fb3763 |
15-Jul-2017 |
Chris Craik <ccraik@google.com> |
Paging refactor to unify list/data source types, and simplify mutability Bug: 64809611 Test: new tests passing - Unified list type for contiguous data sources - null padding is created at initialization, and consumed as items are loaded. Infinite unpadded, and counted padded lists use same list type entirely. - New list and DataSource type for tiled data sources, which can access data at any location. - Split data source based on keyed vs tiled based implementations. This massively simplified the few existing data sources, and allowed us to specialize further, making the trivial test (and limit-offset) code much simpler (and avoiding code that was extremely prone to off by one errors) - Added PagedListAdapter, which provides convenience wrapper for the AdapterHelper, saving users a few extra lines of code. - Uncountable positioning - rework also has relative data source position stored at initialization so that countable items can use position, without being required to count their dataset. This supports cases with simple position IDs, but where you: 1) don't want nulls in the data, 2) don't care about count/scrollbars, 3) can't easily compute the total number. - PagedList requires data to initialize - Removes need for weird warmup API, avoids showing a list of nulls to user in countable case, and unifies initialization codepaths. - PagedList has a snapshot() method that enables DiffUtil to run safely on a background thread on immutable data, and snapshot-aware diffing that allows a new list to load content while it's being used in diffing on a background thread. Not done: - Parameterized initialization (both init from key, storing key, passing key when creating LiveData<PagedList>) Change-Id: I7cb945afe37e68aad44cde45277afd7a27416e52
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/UserDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/paging/LimitOffsetDataSourceTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/paging/LiveLazyListProviderTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/paging/LivePagedListProviderTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/ComplexQueryDataSourceTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/QueryDataSourceTest.java
ain/AndroidManifest.xml
ain/java/android/arch/persistence/room/integration/testapp/CustomerViewModel.java
ain/java/android/arch/persistence/room/integration/testapp/LazyListActivity.java
ain/java/android/arch/persistence/room/integration/testapp/LazyListCustomerAdapter.java
ain/java/android/arch/persistence/room/integration/testapp/PagedListCustomerAdapter.java
ain/java/android/arch/persistence/room/integration/testapp/RoomPagedListActivity.java
ain/java/android/arch/persistence/room/integration/testapp/database/CustomerDao.java
ain/res/layout/activity_recycler_view.xml
|
b2bfd37e6320e795bffafe24cfdc6a1d1b3da035 |
21-Jul-2017 |
Yuichi Araki <yaraki@google.com> |
NOT NULL constraint by @NonNull NonNull entity fields automatically have NOT NULL constraint in SQLite. A field is regarded as NonNull when it is either one of these: - A primitive type - Annotated with @android.support.annotation.NonNull - Annotated with @org.jetbrains.annotations.NotNull Bug: 62007004 Test: SimpleEntityReadWriteTest, EntityProcessorTest Change-Id: I1d06a89874e8804cca87736573eb0b81166bbab0
ndroidTest/java/android/arch/persistence/room/integration/testapp/TestDatabase.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/ProductDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/migration/MigrationTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/SimpleEntityReadWriteTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/Product.java
|
720567eba70634b9d4efa27e29a3c2bab2bd2a52 |
26-Jul-2017 |
Yuichi Araki <yaraki@google.com> |
Merge "Fix InvalidationTracker for custom database" into oc-support-26.0-dev
|
f24ecb4d1edf2073d12bf350ae4acf318167402a |
25-Jul-2017 |
Yigit Boyar <yboyar@google.com> |
Merge "Room: Throw if migration is missing." into oc-support-26.0-dev
|
234f073e2227fcb62a9ed8285c79724de1f0fa92 |
24-Jul-2017 |
Yigit Boyar <yboyar@google.com> |
Room: Throw if migration is missing. This CL changes the default behavior of Room when a migration is missing. Previously, we would just clear the database, now we crash. Developer can opt-in to the clearing behavior by calling the builder API. Bug: 63872392 Test: BuilderTest, MigrationTest Change-Id: I8cdbc42ec0360f2b3354bbeae4e7b718a6ef1fe7
ndroidTest/java/android/arch/persistence/room/integration/testapp/migration/MigrationTest.java
|
14bd6a8aff57a55980159ae8b5cbdb8713725ab7 |
24-Jul-2017 |
Florina Muntenescu <florinam@google.com> |
Adding a constructor with 2 params for the MigrationTestHelper. Bug: 63130998 Test: MigrationTest Change-Id: Ib1d0d117df12d736e139750252a74af0860823cc
ndroidTest/java/android/arch/persistence/room/integration/testapp/migration/MigrationTest.java
|
62de5e0b4c4f0498e0af8a88eda5696241441ef0 |
24-Jul-2017 |
Yuichi Araki <yaraki@google.com> |
Merge "Fix migration with autoincrement primary key" into oc-support-26.0-dev
|
bd9f55f9e165d36f944666d5c2a9ccc170e56dc4 |
22-Jul-2017 |
Yigit Boyar <yboyar@google.com> |
Merge "Keep list size variables list for DELETE|UPDATE queries" into oc-support-26.0-dev
|
5843a353d7d4740a2d6119fdd90f258f645f4f20 |
13-Jul-2017 |
Yuichi Araki <yaraki@google.com> |
Fix InvalidationTracker for custom database InvalidationTracker queries the database when something changes, but this can cause exception when the database is closed during the query is being run. We prevent this by catching the exception, but that's not enough for custom database implementation as it might throw some types of exception we don't know about. This CL introduces a close lock between RoomDatabase and InvalidationTracker. As far as the database is closed with RoomDatabase.close(), InvalidationTracker can tell that it is being closed and stop querying it. We still need to catch IllegalStateException and SQLiteException because some tests have to close the underlying SupportSQLiteDatabase bypassing RoomDatabase and currently there's no way InvalidationTracker can hook into it. Bug: 63162311 Test: CustomDatbaseTest Change-Id: Iece7f95eac886287ea09d69ed44cba786340872b
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/CustomDatabaseTest.java
|
63e44ca6060a78f1313a4946655f6f0471681867 |
21-Jul-2017 |
Yuichi Araki <yaraki@google.com> |
Fix migration with autoincrement primary key Ignore the special SQLite3 table `sqlite_sequence` in validation for unreferenced tables. Bug: 63393618 Test: MigrationTest Change-Id: I93748b83970022aca156a6a3005df0de6fc57279
ndroidTest/java/android/arch/persistence/room/integration/testapp/migration/MigrationDb.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/migration/MigrationTest.java
|
c890c012cd74887025f69a23478bda304076d049 |
20-Jul-2017 |
Yigit Boyar <yboyar@google.com> |
Read relationships while reading fields This CL fixes a bug where if a Relationship is inside an embedded item, we would try to set it in the root object. With this CL, we actually read and set it while reading the embedded item. Bug: 63736065 Test: PojoWithRelationTest Change-Id: I5a49523695498299ac4ddd198e7090bd31a1b65d
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/UserPetDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/PojoWithRelationTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/EmbeddedUserAndAllPets.java
|
d9a1c84670c4f684943c23efc8813c20ef965eca |
20-Jul-2017 |
Yigit Boyar <yboyar@google.com> |
Keep list size variables list for DELETE|UPDATE queries This CL fixes a bug where we would assume that @Query annotations that run DELETE or UPDATE queries would not receive any arguments. This was caused because no-arg queries are prepared separately. Bug: 63872538 Test: SimpleEntityReadWriteTest Change-Id: I87883a9d67932f0176e6e0f26ef8bd071633f34b
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/UserDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/SimpleEntityReadWriteTest.java
|
a595f18019fa63b75fadc2c9a36f85503ca8b94b |
18-Jul-2017 |
TreeHugger Robot <treehugger-gerrit@google.com> |
Merge "Fix @Query without any parameters" into oc-support-26.0-dev
|
c99ef3ade9237f0ff7ad006351940e0b1a473383 |
18-Jul-2017 |
TreeHugger Robot <treehugger-gerrit@google.com> |
Merge "Fix integration-tests for Room" into oc-support-26.0-dev
|
d4fdfb653308477ad94b64dc976e43041036dfd1 |
18-Jul-2017 |
Yuichi Araki <yaraki@google.com> |
Fix integration-tests for Room Remove multidex. Fix MigrationTest. Test: All tests in integration-tests:testapp Change-Id: Icbfdbaa45344f51e9fe7e2dff171fa279575d60f
ndroidTest/java/android/arch/persistence/room/integration/testapp/migration/MigrationTest.java
ain/AndroidManifest.xml
|
e088306a4368329d3e00b3da0f4682fc37e54cb8 |
13-Jul-2017 |
Yuichi Araki <yaraki@google.com> |
Fix @Query without any parameters Bug: 63608092 Test: SimpleEntityReadWriteTest and DaoWriterTest Change-Id: I9998c18ea2f16501ea57925d6e5b0605ba2f946b
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/UserDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/SimpleEntityReadWriteTest.java
|
0cf0bfe0e88f5d511a2a23495005c2da9ea91fd5 |
17-Jul-2017 |
Yigit Boyar <yboyar@google.com> |
Add support for Maybe and Single Bug: 62231019 Test: RxJava2Test Change-Id: Ib747eec847bb22b24b945fa3cfa9c2ea7ef69716
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/UserDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/RxJava2Test.java
ain/AndroidManifest.xml
|
85ca93db24df5965a7f248ee716442f69ae2e265 |
14-Jul-2017 |
Chris Craik <ccraik@google.com> |
Merge "Initial commit of paging component." into oc-support-26.0-dev
|
f56bb2fe802df5609c01012f0b4c46041603428e |
14-Jul-2017 |
Sergey Vasilinets <sergeyv@google.com> |
Speculative fix for LiveDataQueryTest.handleGc Test: LiveDataQueryTest#handleGc Change-Id: Ie8b3ac933b0ca5d0333cef79744988bcfbb216f2
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/LiveDataQueryTest.java
|
9fd8e6171bbdc37f5516fe15b2d96f4ae926ef1a |
23-Jun-2017 |
Chris Craik <ccraik@google.com> |
Initial commit of paging component. This commit introduces a paging component to enable gradual, lazy loading from large data sources, including Room queries. The primary entry points are: 1) CountedDataSource, the base class for defining a countable (i.e. fixed, known size) source of items, such as a Database query. 2) LazyList, the lazy-loading List-like component which pages content in on a background thread from a CountedDataSource. 3) LiveLazyListProvider, the class which produces DataSources, and presents a LiveData<LazyList<T>>. 4) LazyListAdapterHelper, which takes a LiveData<LazyList>, and presents the data simply to an adapter. It computes differences between versions with DiffUtil, and signalling updates to the adapter. Currently, Room only presents a limit-offset query as an easy means to get a LiveData of a LazyList, but it's possible to write a custom data source to page in data from keyed (including composite-keyed) queries. Test: new tests Change-Id: I415879a032d83786d734c26c429828da3b8bc76a
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/UserDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/paging/LimitOffsetDataSourceTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/paging/LiveLazyListProviderTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/ComplexQueryDataSourceTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/QueryDataSourceTest.java
ain/AndroidManifest.xml
ain/java/android/arch/persistence/room/integration/testapp/CustomerViewModel.java
ain/java/android/arch/persistence/room/integration/testapp/LazyListActivity.java
ain/java/android/arch/persistence/room/integration/testapp/LazyListCustomerAdapter.java
ain/java/android/arch/persistence/room/integration/testapp/database/Customer.java
ain/java/android/arch/persistence/room/integration/testapp/database/CustomerDao.java
ain/java/android/arch/persistence/room/integration/testapp/database/SampleDatabase.java
ain/res/layout/activity_recycler_view.xml
ain/res/values-w820dp/dimens.xml
ain/res/values/dimens.xml
ain/res/values/strings.xml
est/java/android/arch/persistence/room/integration/testapp/db/JDBCOpenHelper.java
|
e4f10a8bf64e8a672b4ac57e482735d5ec76c4c8 |
12-Jul-2017 |
Aurimas Liutikas <aurimas@google.com> |
Mark LiveDataQueryTest#handleGc medium so it does not block presubmit. This test is flaking on presubmit blocking changes from landing. Test: None Change-Id: I96a4aa99670146184b7efb78c0d95012310b531d
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/LiveDataQueryTest.java
|
85b81aedb3f8ed5482bebaeddc6265e785b8202b |
12-Jul-2017 |
Yuichi Araki <yaraki@google.com> |
Merge "Add RoomDatabase.Callback" into oc-support-26.0-dev
|
cf4d34906517d8ced296a96e50339c926a7dfdcd |
30-Jun-2017 |
Yuichi Araki <yaraki@google.com> |
Add RoomDatabase.Callback Users can now add Callbacks to RoomDatabase. Bug: 62699324 Test: DatabaseCallbackTest Change-Id: I0fa38ba97614e1ad721594d238960b8183e96769
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/DatabaseCallbackTest.java
|
a705df8d15857046453d2670213afcd7cd9462d8 |
12-Jul-2017 |
Yigit Boyar <yboyar@google.com> |
Move to the counting executor to speedup tests. Bug: 63513657 Test: existing tests pass Change-Id: I1808a3cfbfe21036603dbc95f53a1663af30e3da
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/LiveDataQueryTest.java
ain/AndroidManifest.xml
|
84febb5a3fe9590400d00cbb953a634e6c233cc1 |
12-Jul-2017 |
Ian Lake <ilake@google.com> |
Make LiveDataQueryTest.handleGc a MediumTest Avoid running the handleGc test on presubmit by making it a MediumTest Test: ran the test BUG: 63513657 Change-Id: Idbb4f10152b5a6c3bd6e6942dd6b9d54226629be
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/LiveDataQueryTest.java
|
2bc5b84ed32ea5d4643a3e7fc50fb4e8086c2df1 |
10-Jul-2017 |
Yigit Boyar <yboyar@google.com> |
Add tests for GC. Bug: 63513657 Test: LiveDataQueryTest, InvalidationTrackerTest Change-Id: I6d7a6efc5b180236e6f41dd44049397af3f5c151
ndroidTest/java/android/arch/persistence/room/InvalidationTrackerTrojan.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/LiveDataQueryTest.java
ain/AndroidManifest.xml
|
aa4decb2298d680bae12333764b3bccd859c76ac |
10-Jul-2017 |
Yigit Boyar <yboyar@google.com> |
Merge "Revert "Make ComputableLiveData a real LiveData"" into oc-support-26.0-dev
|
f59164365fb6de9f148b597af5a6e19b3b7c8c2e |
10-Jul-2017 |
Yigit Boyar <yboyar@google.com> |
Revert "Make ComputableLiveData a real LiveData" This reverts commit d58f4645f2a8bf29a5e62f7dceceb7b4da9ff337. Change-Id: I3bd24ed09bdcc63db98a0cdf4f401f2bf682aefe
ndroidTest/java/android/arch/persistence/room/InvalidationTrackerTrojan.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/LiveDataQueryTest.java
ain/AndroidManifest.xml
|
97d8e7f3c524b1bc986c9c86f0f92bd8831890a3 |
10-Jul-2017 |
Yigit Boyar <yboyar@google.com> |
Merge "Make ComputableLiveData a real LiveData" into oc-support-26.0-dev
|
d58f4645f2a8bf29a5e62f7dceceb7b4da9ff337 |
28-Jun-2017 |
Yigit Boyar <yboyar@google.com> |
Make ComputableLiveData a real LiveData This CL removes the intermediate ComputableLiveData class which was not a live data :/. I've also added more tests to ensure that we are handling GC properly (we were). Bug: 63513657 Test: LiveDataQueryTest, ComputableLiveDataTest, InvalidationTrackerTest Change-Id: I9be2330d8009014a1147b6f3ec8aac67b06229ab
ndroidTest/java/android/arch/persistence/room/InvalidationTrackerTrojan.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/LiveDataQueryTest.java
ain/AndroidManifest.xml
|
86b3f8d9bd637749668174e0736fe9fbecbcfb09 |
27-Jun-2017 |
Yuichi Araki <yaraki@google.com> |
Multiple Entities in Insert, Update and Delete Dao can now have @Insert, @Update and @Delete methods with more than one types of Entities. Bug: 62682405 Test: SimpleEntityReadWriteTest, *ProcessorTests Change-Id: Ib2f1afabff237f26d250b3fcf7b2fdf50d01ecff (cherry picked from commit 77d77afb0cde4df833c6d10f641de2dc81f859b8)
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/PetDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/UserPetDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/SimpleEntityReadWriteTest.java
|
bccb62d8b52e4683318329411928156997ecb405 |
26-Jun-2017 |
Yuichi Araki <yaraki@google.com> |
BLOB byte array in Query methods Bug: 62460045 Test: SimpleEntityReadWriteTest Change-Id: I8022bc7b817e2e949d6d28051beff31419b2e4cc
ndroidTest/java/android/arch/persistence/room/integration/testapp/TestDatabase.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/BlobEntityDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/SimpleEntityReadWriteTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/BlobEntity.java
|
64cba1f9990a73204dda5f24fdbf249926acc2e0 |
14-Jun-2017 |
Yuichi Araki <yaraki@google.com> |
Add RoomDatabase.runInTransaction Test: SimpleEntityReadWriteTest Bug: 38488747 Change-Id: I253b69fa8dcd281c5e4b1665bf2955e65455b192
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/UserDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/SimpleEntityReadWriteTest.java
|
e7aea42491c810542ee3f8d9b106d5b8e14bdd14 |
07-Jun-2017 |
Yigit Boyar <yboyar@google.com> |
Change migration test helper to receive instrumentation instance MigrationTestHelper was trying to open the database in the test context which does not seem to work in some cases. Just getting the Instrumentation as an input and using the target context to open to db solves the problem. Bug: 62409449 Test: MigrationTest Change-Id: Ic21baa4853414c78cb365717d38968fbf967c8c6
ndroidTest/java/android/arch/persistence/room/integration/testapp/migration/MigrationTest.java
|
c7ec99790d7ae8bdd0cf88b43c3516f667e2fb59 |
03-Jun-2017 |
Yigit Boyar <yboyar@google.com> |
add test for empty in query Bug: 36023544 Test: SimpleReadWriteTest#emptyInQuery Change-Id: Idd9aa05c53a33785d4a31a75b9a73af880f4faf0
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/SimpleEntityReadWriteTest.java
|
2ec1285ef79d4849069efe95cfbac2307d291a47 |
31-May-2017 |
Yuichi Araki <yaraki@google.com> |
InvalidationTracker now passes invalidated tables This allows developers to observe multiple tables at the same time and get notified of which table was actually invalidated. Bug: 38468740 Test: InvalidationTrackerTest, InvalidationTest, RxRoomTest Change-Id: I6c2a8c36417c4d9b223a03a54ff5183f17974ab2
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/InvalidationTest.java
|
24b0c2d5bde2848da5caa57d9b1ec2a95d12bcd9 |
31-May-2017 |
Yuichi Araki <yaraki@google.com> |
Fix ForeignKeyTest on API 15 and below The error message about foreign key constraint has changed from time to time. This test was failing on API level 14 and 15. The error message is: api14: ERROR CODE 19: CONSTRAINT FAILED api18: FOREIGN KEY CONSTRAINT FAILED (CODE 19) api21: FOREIGN KEY CONSTRAINT FAILED (CODE 787) Test: This is a test Change-Id: Icf2aff95fed7894a18898b671d359f4beccdfe80
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/ForeignKeyTest.java
|
e185ed6ba937bdc218104c18d2615e1ce524adb7 |
27-May-2017 |
Yigit Boyar <yboyar@google.com> |
Simpler SQLite interface This CL reduces the API surface of the SupportSQLiteDatabase not to include factory methods or methods. It also changes query methods that receive String[] to Object[] to workaround the binding bug. This is still not enough as it depends on android classes. We may later further reduce this to use no-android APIs but that api will look very limited unless we can use default methods (which requres android gradle plugin 3.0 that is not stable right now). I've also added a simple QueryBuilder to replace methods in the SQLiteDatabase that receive a million arguments. Bug: 38481640 Test: existing tests pass Change-Id: I37dc666235fa31877725d85cc98fb01542d4638a
ndroidTest/java/android/arch/persistence/room/integration/testapp/migration/MigrationDb.java
|
1676c28584028f8427475745d7a779607af67ecb |
29-May-2017 |
Yigit Boyar <yboyar@google.com> |
Consider nullable types for known column types When we can get the column type from sqlite at compile time, we were only considering primitives which is a problem since the column might be nullable. This CL fixes that issue by adding nullables into the list. I've also removed the conveters from basic type to/from string since it was only useful when we were using the old sqlite API that requires parameters to be strings. Right now, it just serves as a misleading edge between type nodes. Bug: 62100716 Test: TypeAdapterStoreTest, SimpleReadWriteTest Change-Id: Ifb9c9d41aa694d7a3e1a04b617bbe3dc6e473839
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/UserDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/SimpleEntityReadWriteTest.java
|
4d4bae3f216e55f824d7d7fbfe2f8861906ee3e2 |
04-May-2017 |
Yigit Boyar <yboyar@google.com> |
s/decompose/embedded Bug: 37999488 Test: existing test pass Change-Id: Iafd5ff1a00bea99041f6bef6e70e6050f3b6329d
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/ConstructorTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/DecompositionTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/EmbeddedTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/Address.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/PetAndToys.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/PetCouple.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/School.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/UserAndAllPets.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/UserAndPet.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/UserAndPetNonNull.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/UserWithPetsAndToys.java
|
3542101509120586bbae17b1f748f302e1fb82a3 |
04-May-2017 |
Yigit Boyar <yboyar@google.com> |
Don't allow anonymous bind parameters. Bug: 37990862 Test: existing tests pass Change-Id: I3db2de89a4f46acf1396af4e1d3793bd2def6aec
ndroidTest/java/android/arch/persistence/room/integration/testapp/PKeyTestDatabase.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/UserDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/UserPetDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/ForeignKeyTest.java
|
2e8d5608ba4b3da0a05d6b6cc23d81fe10371970 |
02-May-2017 |
Yigit Boyar <yboyar@google.com> |
Don't allow main thread queries This CL adds assertions not to run main thread queries in Room. Bug: 32342709 Test: MainThreadCheckTest Change-Id: Ib776fa7d1b3a5571008d8804ca9f373cb007101d
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/MainThreadCheckTest.java
|
b86bef286718da421268bc52cf4fab7cccb3104c |
22-Apr-2017 |
Sergey Vasilinets <sergeyv@google.com> |
Make Event an Enum bug:37571769 Test: refactoring CL. Change-Id: I30316d3ccecd7720b90968957dcab75c71443d5d
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/LiveDataQueryTest.java
|
64db0cc15b78b62a1d44a70fc8b4552e660d952c |
17-Apr-2017 |
Yigit Boyar <yboyar@google.com> |
Mass package renaming from android.support to android.arch Bug: 37429162 Test: ./gradlew check passes Change-Id: I911766254b6a9f957ef90429a1efc01c209d693a
ndroidTest/java/android/arch/persistence/room/integration/testapp/PKeyTestDatabase.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/TestDatabase.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/PetCoupleDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/PetDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/SchoolDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/ToyDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/UserDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/dao/UserPetDao.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/migration/MigrationDb.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/migration/MigrationTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/ConstructorTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/DecompositionTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/ForeignKeyTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/IdentityDetectionTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/IndexingTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/InvalidationTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/LiveDataQueryTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/PojoTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/PojoWithRelationTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/PrimaryKeyTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/RxJava2Test.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/SimpleEntityReadWriteTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/TestDatabaseTest.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/test/TestUtil.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/Address.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/AvgWeightByAge.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/Coordinates.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/IntAutoIncPKeyEntity.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/IntegerAutoIncPKeyEntity.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/Pet.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/PetAndToys.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/PetCouple.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/School.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/SchoolRef.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/Toy.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/User.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/UserAndAllPets.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/UserAndPet.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/UserAndPetNonNull.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/UserIdAndPetNames.java
ndroidTest/java/android/arch/persistence/room/integration/testapp/vo/UserWithPetsAndToys.java
ndroidTest/java/com/android/support/room/integration/testapp/PKeyTestDatabase.java
ndroidTest/java/com/android/support/room/integration/testapp/TestDatabase.java
ndroidTest/java/com/android/support/room/integration/testapp/dao/PetCoupleDao.java
ndroidTest/java/com/android/support/room/integration/testapp/dao/PetDao.java
ndroidTest/java/com/android/support/room/integration/testapp/dao/SchoolDao.java
ndroidTest/java/com/android/support/room/integration/testapp/dao/ToyDao.java
ndroidTest/java/com/android/support/room/integration/testapp/dao/UserDao.java
ndroidTest/java/com/android/support/room/integration/testapp/dao/UserPetDao.java
ndroidTest/java/com/android/support/room/integration/testapp/migration/MigrationDb.java
ndroidTest/java/com/android/support/room/integration/testapp/migration/MigrationTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/ConstructorTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/DecompositionTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/ForeignKeyTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/IdentityDetectionTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/IndexingTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/InvalidationTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/LiveDataQueryTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/PojoTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/PojoWithRelationTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/PrimaryKeyTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/RxJava2Test.java
ndroidTest/java/com/android/support/room/integration/testapp/test/SimpleEntityReadWriteTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/TestDatabaseTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/TestUtil.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/Address.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/AvgWeightByAge.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/Coordinates.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/IntAutoIncPKeyEntity.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/IntegerAutoIncPKeyEntity.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/Pet.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/PetAndToys.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/PetCouple.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/School.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/SchoolRef.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/Toy.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/User.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/UserAndAllPets.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/UserAndPet.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/UserAndPetNonNull.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/UserIdAndPetNames.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/UserWithPetsAndToys.java
ain/AndroidManifest.xml
|
f8c3624579d5761a2d34a7199932492d267f5f85 |
10-Apr-2017 |
Yigit Boyar <yboyar@google.com> |
Add support for arg constructors This CL adds constructor support to Pojo and Entity processors. We try to map each constructor parameter to a field based on its name. If there are conflicts, we fail the compilation. If there are multiple matching constructors, we fail the compilation and developer can annotate unwanted ones with @Ignore to workaround the issue. This CL also prioritizes PojoRowAdapter over EntityRowAdapter since it is faster and proguard does a good job on shrinking the generated code. Bug: 34611719 Bug: 36473441 Bug: 34754519 Test: ConstructorTest, PojoProcessorTest Change-Id: I70592b129c7dcb9cacfb072b2c63169630eadf9a
ndroidTest/java/com/android/support/room/integration/testapp/TestDatabase.java
ndroidTest/java/com/android/support/room/integration/testapp/test/ConstructorTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/ForeignKeyTest.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/AvgWeightByAge.java
|
489d61a70a742408cda5ca1a4d9788b9f14282a0 |
11-Apr-2017 |
Yigit Boyar <yboyar@google.com> |
Make invalidation tracker test friendly This CL guards invalidation tracker from unwated failures which can happen when database is closed. Bug: 37160100 Test: InvalidationTrackerTest Change-Id: I53511d89ab30f3dba01bac069a224c3fd5bc1ec0
ndroidTest/java/com/android/support/room/integration/testapp/migration/MigrationTest.java
|
3c592c4ccbc6052b11443b0fa575052c08fefa55 |
04-Apr-2017 |
Yigit Boyar <yboyar@google.com> |
Room RxJava2 Support, Step 1 This CL adds support for returning Flowable & Publisher from Room DAO queries. We may introduce an Optional support later for nullable queries. I've also changed live data check to use type utils instead of string matching. Bug: 37009497 Test: RxRoomTest, RxJava2Test Change-Id: I00e10efcf7599f3d33cd7e4b6b638b546fb5c1e9
ndroidTest/java/com/android/support/room/integration/testapp/dao/UserDao.java
ndroidTest/java/com/android/support/room/integration/testapp/test/RxJava2Test.java
|
36023a6ffdcc24a64c3f86efd4e754cfc3493761 |
07-Apr-2017 |
Yigit Boyar <yboyar@google.com> |
Fix failing tests on API <20 ForeignKeyTest was failing due to a case sensitive comparison TableInfo test was failing because older sqlite versions do not provide primary key order. To overcome that, we are now relying on just being a primary key while doing TableInfo comparison. Test: TableInfoTest, ForeignKeyTest Bug: 37105021 Change-Id: Iba4dafc093f5af1920e19911f8fa6112e3603503
ndroidTest/java/com/android/support/room/integration/testapp/test/ForeignKeyTest.java
|
ebdeee2c668f632384a7c9b3a098f0cccf88e7cd |
03-Apr-2017 |
Yigit Boyar <yboyar@google.com> |
Foreign keys step 3, verification Adds foreign key verification to the migration helper and also adds the foreign key information into the exported bundle. The conversions between the exported bundle and the TableInfo is looking unnecssary but keeping it for now since it gives us the flexibility between the compile time representation of the schema and runtime representation (which is limited). Bug: 36602348 Test: MigrationTest, TableInfoTest Change-Id: If40fe520c9930493502cddac3e6c747ef26610df
ndroidTest/java/com/android/support/room/integration/testapp/migration/MigrationDb.java
ndroidTest/java/com/android/support/room/integration/testapp/migration/MigrationTest.java
|
0045a1c980b44c882f4ece571a0a113d36bbf0fb |
31-Mar-2017 |
Yigit Boyar <yboyar@google.com> |
foreign key step 2 This CL adds instrumentation tests for foreign key and code generation. There is no schema validation yet, it will be in the next CL. Bug: 36776636 Test: ForeignKeyTest.java Change-Id: I88d83bb9b43cbf0da5273b31f5b7571b2b927622
ndroidTest/java/com/android/support/room/integration/testapp/test/ForeignKeyTest.java
|
6728af1603c6082a13533b830a9ef0bbc51ba827 |
30-Mar-2017 |
Yigit Boyar <yboyar@google.com> |
Revert "Use . notation in indices" This reverts commit e58a8289a82132d557d38d02eb23ade42d0c6328. Reason for revert: Using . notation just looks like a leaky abstraciton. We better try to solve this in a more well defined way. Bug: 36023623 Test: Existing tests pass Change-Id: Id336df7c8909353ffa6e4036e811fc0ff91699f1
ndroidTest/java/com/android/support/room/integration/testapp/test/IndexingTest.java
|
f385ca501bbfd3ccaf6b412f8f09c64d9ee742f2 |
30-Mar-2017 |
Yigit Boyar <yboyar@google.com> |
Use column names in relationships. The . notation in relationships leaks the private fields of Entities. Instead, use column names. Bug: 34258173 Test: existing tests pass Change-Id: I37b3b6bb90d2807e680304414a629274dc98cd40
ndroidTest/java/com/android/support/room/integration/testapp/vo/PetAndToys.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/UserAndAllPets.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/UserIdAndPetNames.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/UserWithPetsAndToys.java
|
3a433f7ddbffa6131883cc3b23fc80edf54add19 |
26-Mar-2017 |
Yigit Boyar <yboyar@google.com> |
Validate migration This CL adds necessary code to validate database integrity after a migration. This way, if developer does not implement migration properly, Room will throw an exception. Test: TableInfoTest, MigrationTest Bug: 36602348 Change-Id: Id335875387a740344deb76778c5df6978b0212a5
ndroidTest/java/com/android/support/room/integration/testapp/migration/MigrationDb.java
ndroidTest/java/com/android/support/room/integration/testapp/migration/MigrationTest.java
|
e13540a25fe5460240b6db0e18858c32d16f5399 |
31-Mar-2017 |
Sergey Vasilinets <sergeyv@google.com> |
Rename LifecycleProvider to LifecycleOwner Test: refactoring CL. Change-Id: I89eb662487cd1ca786829defcf90fbc2fb4af001
ndroidTest/java/com/android/support/room/integration/testapp/test/LiveDataQueryTest.java
|
a64756a18111a7312b3fa03b76d13381a8907176 |
21-Mar-2017 |
Yigit Boyar <yboyar@google.com> |
Room Migrations, Step 1 This CL adds ability to specify migration callbacks. Developer can specify a list of migrations while building the database and Room will run them. If a path cannot be found, Room will nuke the database and recreate. This CL moves the "version" parameter of the database from the builder into the annotation. This allows us to export the schema at compile time to be used later. This CL also introduces a new "testing" package for Room which is capable of initializing the database based on the exported schema. This can be used by the developers to create the database in a previous schema and migrate to the current one. Test: MigrationTest, BuilderTest, TableInfoTest Bug: 36602348 Change-Id: I7d543b20410b14ff61ef1b433c38c44009c86e8d
ndroidTest/java/com/android/support/room/integration/testapp/PKeyTestDatabase.java
ndroidTest/java/com/android/support/room/integration/testapp/TestDatabase.java
ndroidTest/java/com/android/support/room/integration/testapp/migration/MigrationDb.java
ndroidTest/java/com/android/support/room/integration/testapp/migration/MigrationTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/IndexingTest.java
|
2fa2ccde296e35f2850b227065c27f27e74bce10 |
06-Mar-2017 |
Yigit Boyar <yboyar@google.com> |
Use . notation in indices This CL changes Index annotation to match fields via their names instead of column names. This makes it consistent with @Relation and makes it easy to handle decomposed field indices. Bug: 35846503 Test: EntityProcessorTest.kt Change-Id: I43a11564f1ceb52ba95790194a787dce3ede1d1c
ndroidTest/java/com/android/support/room/integration/testapp/test/IndexingTest.java
|
f5f2cf6b9ed63915448e81551e4b7bb72a26030e |
14-Mar-2017 |
Yigit Boyar <yboyar@google.com> |
Allow returning id from insert queries. Bug: 33427828 Test: PrimaryKeyTest.java Change-Id: I8cbf368b1282f07e3526d1902153946d12e26b3a
ndroidTest/java/com/android/support/room/integration/testapp/PKeyTestDatabase.java
ndroidTest/java/com/android/support/room/integration/testapp/test/PrimaryKeyTest.java
|
abd1282bf69658247b310982d529aa48a9466cf4 |
08-Mar-2017 |
Yigit Boyar <yboyar@google.com> |
Fix flaky test This CL fixes the invalidation test to use a single threaded IO executor so that we can easily wait on it. Bug: 34774357 Test: InvalidationTest.java Change-Id: If03a7af1c14b857b0747236251fddc2c6c78c7f9
ndroidTest/java/com/android/support/room/integration/testapp/test/InvalidationTest.java
|
092164e5501d0a254001225acd9dca42e5fa57e9 |
26-Feb-2017 |
Yigit Boyar <yboyar@google.com> |
Add @Relation annotation to easily fetch 1-N relationships This CL adds the @Relation annotation which can be used in Pojo to fetch sub relationships. Right now, it only supports 1-N relationships but can easily be extended to support N-N and 1-1 in later CLs. Bug: 34258173 Test: PojoProcessorTest, PojoWithRelationTest Change-Id: Ie91fd40c383dfcbffd583f0e7945813d7ec4f4f1
ndroidTest/java/com/android/support/room/integration/testapp/TestDatabase.java
ndroidTest/java/com/android/support/room/integration/testapp/dao/PetDao.java
ndroidTest/java/com/android/support/room/integration/testapp/dao/ToyDao.java
ndroidTest/java/com/android/support/room/integration/testapp/dao/UserPetDao.java
ndroidTest/java/com/android/support/room/integration/testapp/test/LiveDataQueryTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/PojoWithRelationTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/TestDatabaseTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/TestUtil.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/PetAndToys.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/Toy.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/UserAndAllPets.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/UserIdAndPetNames.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/UserWithPetsAndToys.java
|
fa3905934508aa143d899cb9b62b3b074748c9e9 |
06-Mar-2017 |
Yigit Boyar <yboyar@google.com> |
Verify database after opened Room now keeps an identity hash on the database and checks it when database is open to ensure that the schema matches the current one. If not, developer probably forgot to update the version number so it crashes. Bug: 35804916 Test: IdentityDetectionTest.java Change-Id: I441cbb3e78d88874406806af6c36917d1bf0142c
ndroidTest/java/com/android/support/room/integration/testapp/test/IdentityDetectionTest.java
|
946daad80cb572453cefc343fc0cbb9f812d9cd8 |
06-Mar-2017 |
Yigit Boyar <yboyar@google.com> |
Allow returning Cursor from queries This CL adds ability to return Cursor from queries. Bug: 32342709 Test: SimpleEntityReadWriteTest#readViaCursor Change-Id: Ibaf8a46a5b8139681eb473f12c76445d6b7e1e62
ndroidTest/java/com/android/support/room/integration/testapp/dao/UserDao.java
ndroidTest/java/com/android/support/room/integration/testapp/test/SimpleEntityReadWriteTest.java
|
2c6462f129bf43965ed8b054b026f6a28fe6fd8f |
23-Feb-2017 |
Yigit Boyar <yboyar@google.com> |
Primary Key improvements This CL changes @PrimaryKey sytax to disallow multiple fields with @PrimaryKey annotations. Instead, it enforces using @Entity#primaryKeys to declare composite primary keys. This CL also fixes the inheritance rules around PrimaryKeys such that we'll inherit primary key from super Entity / Pojo if the Entity itself does not declare any primary keys. If the entity declares a primary key, the parent key is dropped with a NOTE level log. Bug: 35706557 Test: EntityProcessorTest#primaryKey*, PrimaryKeyTest.kt Test: SQLiteOpenHelperWriterTest.kt Change-Id: Ifcfccf29da21395586e539d0f9b130c7537e5384
ndroidTest/java/com/android/support/room/integration/testapp/PKeyTestDatabase.java
ndroidTest/java/com/android/support/room/integration/testapp/test/PrimaryKeyTest.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/IntAutoIncPKeyEntity.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/IntegerAutoIncPKeyEntity.java
|
dc18ce63fe07921b1080e48d3e597e2b5240d17a |
21-Feb-2017 |
Yigit Boyar <yboyar@google.com> |
Index annotation This CL adds an Index field to the Entity annotation to create indices on the table. While Index is good for composite indices, it might be too verbose for indexing individual fields. For those, we add a new field to ColumnInfo#index. When a @Decomposed field has an index, they are dropped but a warning is printed for each of them. When a super class has an index, it is dropped but a warning is printed for each of them. There is also a new inheritSuperIndices field in the @Entity annotation to inherit these indices. We also need to change @PrimaryKey to obey these rules. Created b/35706557 for that. I've also fixed a bug in Database Impl generation where we were generating the wrong class for nested classes. Bug: 35594281 Test: IndexTest.kt, IndexingTest.java, EntityProcessorTest.kt Change-Id: I9422f4be4e5d59ed7f2f5f98c18bf3966be0496f
ndroidTest/java/com/android/support/room/integration/testapp/test/IndexingTest.java
|
96cc740203eaa752fc85ca7ca722a8de550ae88c |
17-Feb-2017 |
Yigit Boyar <yboyar@google.com> |
@Decompose This CL introduces a new annotation @Decompose which can be used to merge sub fields of a Pojo into the class that includes it. This is great for 1-1 relationships or more logical grouping. This also builds the baseline for Relationships but does not yet make it very easy (e.g. no easy way to handle join fields which will have the same name in 2 entities). This CL also fixes a bug in Pojo processor where it was ignoring super class's private fields. A ticket is created for it to properly detect errors w/ inherited fields from super: b/35568142 Bug: 34258173 Test: PojoProcessorTest.kt, DecompositionTest.java Change-Id: Idd2617b5fd0ab0ac70750237076158cfc166c53e
ndroidTest/java/com/android/support/room/integration/testapp/TestDatabase.java
ndroidTest/java/com/android/support/room/integration/testapp/dao/PetCoupleDao.java
ndroidTest/java/com/android/support/room/integration/testapp/dao/PetDao.java
ndroidTest/java/com/android/support/room/integration/testapp/dao/SchoolDao.java
ndroidTest/java/com/android/support/room/integration/testapp/dao/UserPetDao.java
ndroidTest/java/com/android/support/room/integration/testapp/test/DecompositionTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/TestUtil.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/Address.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/Coordinates.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/Pet.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/PetCouple.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/School.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/SchoolRef.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/UserAndPet.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/UserAndPetNonNull.java
|
74b28faea4bcc4b7fab113a61a066d22dfae7258 |
15-Feb-2017 |
Yigit Boyar <yboyar@google.com> |
@Update annotation This CL adds support for @Update annotation in @Dao methods. It has the same semantics as a deletion methods so I've moved some functionality into shared functions when feasible. Bug: 32342709 Test: DaoWriter#updateDao, UpdateMethodProcessorTest.kt Test: SimpleEntityReadWriteTest.java Change-Id: I86866b82f9114152d3c9eb2fdc4eefa981be1bb0
ndroidTest/java/com/android/support/room/integration/testapp/dao/UserDao.java
ndroidTest/java/com/android/support/room/integration/testapp/test/SimpleEntityReadWriteTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/TestUtil.java
|
34e95e59b90e821de3621e5e7e6c5a58dbb5891a |
17-Feb-2017 |
Yigit Boyar <yboyar@google.com> |
Fix column name in entitiy parsers This CL fixes a bug in Entitiy Cursor generic reader which was using field name instead of field's column name. Bug: 35442740 Test: SimpleEntityReadWriteTest#renamedField Change-Id: Id2fe4dc74e10cd298f1141b5895bb2ee00ac4b4f
ndroidTest/java/com/android/support/room/integration/testapp/test/SimpleEntityReadWriteTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/TestUtil.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/User.java
|
333b4b5e49c48adf7fb928d445b6f7f276b54a02 |
15-Feb-2017 |
Yigit Boyar <yboyar@google.com> |
Move onConflict strategy to its own class This moves on conflict strategy to its own class in preparation for @Upsert and @Update support. Test: existing tests pass Bug: 34502968 Change-Id: I34d18a9b19f090b97d4312d9f87f67abe978d1d1
ndroidTest/java/com/android/support/room/integration/testapp/dao/UserDao.java
|
275e7088223c097c1a2df718455bede42bc9efed |
02-Feb-2017 |
Yigit Boyar <yboyar@google.com> |
TypeConverters Tihs CL introduces user defined type converters, which are simple methods annotated with @TypeConverter. Each type converter is a custom method that receives 1 parameter and returns 1 value. The container class for the converter must be passed into a @TypeConverters annotation to be picked up. Developer can define these in multiple places depending on the scope they want to use it. With this CL, I also migrated @ColumnName annotation into @ColumnInfo annotation so that we can specify more values. This CL introduces type affinity field in ColumnInfo. Developers can now specify type affinity to help the resolution logic to pick the right converter. Bug: 34610784 Bug: 32342709 Test: CustomConverterProcessorTest.kt, FieldProcessorTest.kt Test: CustomTypeConverterResolutionTest.kt Change-Id: I117e4a194e8c93bee58f06a43d688ae04360b08e
ndroidTest/java/com/android/support/room/integration/testapp/TestDatabase.java
ndroidTest/java/com/android/support/room/integration/testapp/dao/UserDao.java
ndroidTest/java/com/android/support/room/integration/testapp/test/SimpleEntityReadWriteTest.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/AvgWeightByAge.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/User.java
|
13a2048db98b1cc2dbd1692b73b794527975a446 |
26-Jan-2017 |
Yigit Boyar <yboyar@google.com> |
POJO Support This CL adds ability to return arbitrary POJOs from query results as long as we match the columns of the result into the pojo. If the pojo has unused fields or if it ignores some columns from the result, we show a warning. This warning is listed in RoomWarnings class and can be disabled via SuppressWarnings. If SQLVerification is disabled, POJO support does not work. If the return type is an Entity, we still prefer the entity converter. This may change in the future. When converting cursor into POJO, the code is inlined. This is simpler and avoids the cursor field lookup (because we know indices ahead of time). This may get expensive if same pojo is used in multiple places. In the future, we may prefer creating converters for commonly used pojos. Bug: 33463891 Test: QueryMethodProcessorTest.kt, PojoTest.java, LiveDataQueryTest.java Change-Id: Ib82f35d26f839c568e7137c39d4843a9854b20b1
ndroidTest/java/com/android/support/room/integration/testapp/dao/UserDao.java
ndroidTest/java/com/android/support/room/integration/testapp/test/LiveDataQueryTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/PojoTest.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/AvgWeightByAge.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/User.java
|
b030dcb5b7a62854c0bfe85bf04eaf60caeb83bb |
20-Jan-2017 |
Yigit Boyar <yboyar@google.com> |
Bind Cursor queries in a type safe API The rawQuery API in SQLiteDatabase class expects all bind arguments as Strings. Even though this usually works fine for other types due to SQLite's type affinity logic, it fails in some cases. To avoid that, this CL replaces the usage of rawQuery with a new class called SupportSQLQuery which has a callback to bind items to a query using the prepared statement. There is no public API to achieve this so this CL adds a new method to SupportSQLiteDatabase that accepts SupportSQLiteQuery. In the framework version, this method is implemented using a CursorFactory. This callback is not necessarily instantly invoked so to avoid the risk of binding to wrong values (because method parameters may change after the call), the SupportSQLiteStatement is prepared instantly. For this reason, we have a pooled RoomSQLiteStatement class that implements the SupportSQLiteProgram API and can rebound its parameters into another SupportSQLiteProgram. In queries, we instantly populate it and it can be re-run any later time. This implementation also avoids creating inner classes for each query. Bug: 32342709 Bug: 34503410 Test: RoomSQLiteQueryTest, QueryWriterTest, DaoWriterTest Change-Id: Id74ba3e02d8de1f7df839249327b3baf933f5f84
ndroidTest/java/com/android/support/room/integration/testapp/dao/UserDao.java
ndroidTest/java/com/android/support/room/integration/testapp/test/SimpleEntityReadWriteTest.java
|
846dfcf52e22de6d912f8ece05ff939c2c9bd154 |
17-Jan-2017 |
Yigit Boyar <yboyar@google.com> |
LiveDataQuery This CL adds support for returning LiveData<T> from select queries in DAO classes. Rather than extending ResultAdapter to handle this, I've created a new class called ResultBinder which binds the sql and args with the ResultAdapter. This would be the place for Rx etc to hook to implement their observability. Bug: 32342709 Test: LifeDataQueryTest Change-Id: I44c7d0571e3d92df5d07fb3802791fc793bf5617
ndroidTest/java/com/android/support/room/integration/testapp/dao/UserDao.java
ndroidTest/java/com/android/support/room/integration/testapp/test/InvalidationTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/LiveDataQueryTest.java
|
34e5031083f735db3a395b0f6aa430880b072d71 |
14-Jan-2017 |
Yigit Boyar <yboyar@google.com> |
Database invalidation tracking This CL introduces updated table tracking via sqlite triggers. There is a new InvalidationTracker class, which creates a version table in memory that keeps a version for each table. It also creates triggers for each table and these triggers update the version table when observed table changes. When a transaction is committed, we trigger the InvalidationTracker to refresh itself. This covers all queries that go through Room but if someone grabs the db and runs a query directly, it wont work. To support them, there is a public refresh method in the InvalidationTracker. We may also work around it by wrapping the SupportSQLiteDatabase. In a followup CL, I'll introduce an implementataion of LiveData<T> that observes this table automatically. Bug: 32342709 Test: InvalidationTrackerTest Change-Id: I9d0a0cc9dc537200f3fd3cd229df9bfeaf52b56d
ndroidTest/java/com/android/support/room/integration/testapp/test/InvalidationTest.java
|
07a5d70dc1f53f9948d61853c4ae84df9e11d7a1 |
05-Jan-2017 |
Yigit Boyar <yboyar@google.com> |
Allow update queries in Query methods This CL adds support for writing UPDATE queryies in @Query annotations. It uses the same code path w/ delete, nothing is different except the type detection. This CL also fixes a bug where we were enforcing a return type from Delete queries in @Query methods. Test: SqlParserTest, SimpleEntityReadWriteTest Change-Id: I6a0f154dcf2c8804915f7d89074abd1f63681676
ndroidTest/java/com/android/support/room/integration/testapp/dao/UserDao.java
ndroidTest/java/com/android/support/room/integration/testapp/test/SimpleEntityReadWriteTest.java
|
3db6d309415576ef0080c29705dc30496636a986 |
30-Dec-2016 |
Yigit Boyar <yboyar@google.com> |
Add support for Delete queries in @Query annotations This CL adds support for runinng DELETE queries in @Query methods. If the @Query method has predefined number of bind args, we create a prepared statement and re-use it. If it has variable number of args, we recreate the query every time it is run. Bug: 32342709 Test: SqlParserTest, SimpleEntityReadWriteTest, QueryMethodProcessorTest Change-Id: I8d9ad83e36e1eed4ddd5e2d714ffb6cdd9881034
ndroidTest/java/com/android/support/room/integration/testapp/dao/UserDao.java
ndroidTest/java/com/android/support/room/integration/testapp/test/SimpleEntityReadWriteTest.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/User.java
|
958df7dd95c2cecf93cacef6998a4d7e8d39b7ef |
28-Dec-2016 |
Yigit Boyar <yboyar@google.com> |
@Delete support This CL adds support for abstract methods in DAO annoated with @Delete. It is fairly similar to Insert but there are subtle changes so they share only limited number of classes. I've decided to name these methods ShortcutMethods (since they are shortcuts to writing SQL). Suggestions are welcome. There will also be support for @Update but the CL is getting big so i decided to spare it for another CL. Bug: 32342709 Test: DaoWriterTest, SimpleEntityReadWriteTest Test: DeletionMethodProcessorTest Change-Id: Ifbf69067b014f1ae5349567a74b4d3f9efb846c7
ndroidTest/java/com/android/support/room/integration/testapp/dao/UserDao.java
ndroidTest/java/com/android/support/room/integration/testapp/test/SimpleEntityReadWriteTest.java
ndroidTest/java/com/android/support/room/integration/testapp/test/TestUtil.java
|
059b497bb099c867fb65e62047975ffbc41475f4 |
16-Dec-2016 |
Yigit Boyar <yboyar@google.com> |
Database Builder This CL moves database creation from constructor to builder pattern. This avoids ugly constructor override in Database classes and provides flexibility for future changes in the database construction. Bug: 32342709 Test: BuilderTest.java Change-Id: I95de0b47fdd0e32045b8e84c07b997dff6a211c4
ndroidTest/java/com/android/support/room/integration/testapp/TestDatabase.java
ndroidTest/java/com/android/support/room/integration/testapp/test/SimpleEntityReadWriteTest.java
|
b00da61a6f283d47454d64a4ec5e7b14f0aeafe6 |
15-Dec-2016 |
Yigit Boyar <yboyar@google.com> |
Annotate tests with size. Test: N/A Bug: 32342385 Bug: 32342709 Change-Id: If08e5367a7f6fc17c591324d8f8dd7a04917cb09
ndroidTest/java/com/android/support/room/integration/testapp/test/SimpleEntityReadWriteTest.java
|
5ce90e9725b8c9e8fdcef114694d6984a0ef3141 |
10-Dec-2016 |
Yigit Boyar <yboyar@google.com> |
RoomProcessor and Integration test This CL puts together the very first working version :'). Bug: 32342709 Test: SimpleEntityReadWriteTest.java, DatabaseWriterTest.kt Change-Id: I7aa449f92b40aac5b682dccc17d276a4e349115b
ndroidTest/java/com/android/support/room/integration/testapp/TestDatabase.java
ndroidTest/java/com/android/support/room/integration/testapp/dao/UserDao.java
ndroidTest/java/com/android/support/room/integration/testapp/test/SimpleEntityReadWriteTest.java
ndroidTest/java/com/android/support/room/integration/testapp/vo/User.java
ain/AndroidManifest.xml
|