Skip to content

Commit bc2afe4

Browse files
author
fuzzagrosner
committed
Merge branch 'feature/agrosner/RewriteUnitTests' into develop
2 parents 9d4518e + 44daff0 commit bc2afe4

File tree

6 files changed

+23
-17
lines changed

6 files changed

+23
-17
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=4.0.0-beta5
1+
version=4.0.0-beta6
22
version_code=1
33
group=com.raizlabs.android
44
bt_siteUrl=https://github.com/Raizlabs/DBFlow

usage2/ContentProviderGeneration.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ public class ContentProviderModel extends BaseProviderModel<ContentProviderModel
110110
@ContentUri(path = NAME, type = ContentUri.ContentType.VND_MULTIPLE + NAME)
111111
public static final Uri CONTENT_URI = ContentUtils.buildUriWithAuthority(ContentDatabase.AUTHORITY);
112112

113-
@Column
114113
@PrimaryKey(autoincrement = true)
115114
long id;
116115

usage2/Databases.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ In DBFlow when an INSERT or UPDATE are performed, by default, we use `NONE`. If
7777

7878
@Database(name = AppDatabase.NAME, version = AppDatabase.VERSION, insertConflict = ConflictAction.IGNORE, updateConflict= ConflictAction.REPLACE)
7979
public class AppDatabase {
80+
}
8081

8182
```
8283

usage2/GettingStarted.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class ExampleApplication extends Application {
4444
@Override
4545
public void onCreate() {
4646
super.onCreate();
47-
FlowManager.init(new FlowConfig.Builder(this).build());
47+
FlowManager.init(this);
4848
}
4949
}
5050

usage2/KotlinSupport.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,16 @@ List<TestModel> items = SQLite.select()
159159
.from(TestModel.class)
160160
.queryList();
161161

162-
TransactionManager.getInstance()
163-
.add(new ProcessModelTransaction(ProcessModelInfo.withModels(items), null) {
164-
@Override
165-
public void processModel(TestModel model) {
166-
// do something.
167-
}
168-
});
162+
database.beginTransactionAsync(new ProcessModelTransaction.Builder<>(
163+
new ProcessModel<TestModel>() {
164+
@Override
165+
public void processModel(TestModel model, DatabaseWrapper database) {
166+
167+
}
168+
})
169+
.success(successCallback)
170+
.error(errorCallback).build()
171+
.execute();
169172

170173
```
171174

@@ -208,18 +211,21 @@ items.processInTransaction { it, databaseWrapper -> it.delete(databaseWrapper) }
208211
#### Class Extensions
209212

210213
If you need access to the Database, ModelAdapter, etc for a specific class you
211-
can now:
212-
214+
can now use the following (and more) reified global functions for easy access!
213215

214216
```kotlin
215217

216-
database<TestModel>
218+
database<MyDatabase>()
217219

218-
tableName<TestModel>
220+
databaseForTable<TestModel>()
219221

220-
modelAdapter<TestModel>
222+
writableDatabaseForTable<TestModel>()
221223

222-
```
224+
tableName<TestModel>()
223225

226+
modelAdapter<TestModel>()
227+
228+
229+
```
224230

225231
Which under-the-hood call their corresponding `FlowManager` methods.

usage2/Migration4Guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ _Major Changes In this release_
1616

1717
6. Removed the `Model` restriction on tables. If you leave out extending `BaseModel`, you _must_ interact with the `ModelAdapter`.
1818

19-
7. We generate ~45% less code than 3.0. Combined the `_Table` + `_Adapter` into the singular `_Table` class, which contains both `Property` + all of the regular `ModelAdapter` methods. To ease the transition to 4.0, it is named `_Table` but extends `ModelAdapter`. So most use cases / interactions will not break.
19+
7. We generate much less less code than 3.0. Combined the `_Table` + `_Adapter` into the singular `_Table` class, which contains both `Property` + all of the regular `ModelAdapter` methods. To ease the transition to 4.0, it is named `_Table` but extends `ModelAdapter`. So most use cases / interactions will not break.
2020

2121
8. `Condition` are now `Operator`, this includes `SQLCondition` -> `SQLOperator`, `ConditionGroup` -> `OperatorGroup`. `Operator` are now typed and safer to use.
2222
1. `Operator` now also have `div`, `times`, `rem`, `plus` and `minus` methods.

0 commit comments

Comments
 (0)