|
6 | 6 | Supports Realm query API 110% (there are some bonus features too 😉) |
7 | 7 |
|
8 | 8 | There are two big issues when working with Realm Queries. |
9 | | -1) If a field name is spelled incorectly it failes at runtime instead of compile time. |
10 | | -2) If an argument is an incorect type (Date instead of String) then the query fails at runtime instead of compile time. |
| 9 | +1) If a field name is spelled incorrectly it fails at runtime instead of compile time. |
| 10 | +2) If an argument is an incorrect type (Date instead of String) then the query fails at runtime instead of compile time. |
11 | 11 |
|
12 | | -If you have typesafe query paramaters that allows you to refactor your models without worry of breaking your queries. |
13 | | -All the field descriptors are auto generated using annotatio proccess so you can't make a mistake. |
| 12 | +If you have typesafe query parameters that allows you to refactor your models without worry of breaking your queries. |
| 13 | +All the field descriptors are auto generated using annotation process so you can't make a mistake. |
14 | 14 | If you do, then it is caught at compile time and your app won't compile until you fix it. |
15 | 15 |
|
16 | 16 | ### Here is some java code highlighting what the API looks like |
17 | 17 | ```java |
18 | | -// Bad, field name and type are checked at runtime. This is using Relam the defualt way. |
| 18 | +// Bad, field name and type are checked at runtime. This is using Realm the default way. |
19 | 19 | realm.where(Person.class).equalTo("firstName", "Sally").findFirst(); |
20 | 20 |
|
21 | 21 | // Better, field name is checked at compile time, but type is still at runtime. |
@@ -117,6 +117,6 @@ RealmTypeSafeQuery.with(realm).where(ExampleModel.class).group((query) -> {}).fi |
117 | 117 | RealmTypeSafeQuery.with(realm).where(ExampleModel.class).or((query) -> {}).findAll(); |
118 | 118 |
|
119 | 119 | // For those pesky CSV fields that have a delimiter |
120 | | -final String delemiter = ","; |
121 | | -RealmTypeSafeQuery.with(realm).where(ExampleModel.class).contains(field, value, delemiter).findAll(); |
| 120 | +final String delimiter = ","; |
| 121 | +RealmTypeSafeQuery.with(realm).where(ExampleModel.class).contains(field, value, delimiter).findAll(); |
122 | 122 | ``` |
0 commit comments