-
-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename functions that cause shadow members (#1054)
* Rename functions that cause shadow members * Rename prefix from coroutine to suspend
- Loading branch information
1 parent
8771da9
commit 797786f
Showing
9 changed files
with
26 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,11 +18,11 @@ Now we can call a parse query using a synchronous style, this is possible when w | |
|
||
```kotlin | ||
launch { // Coroutine builder | ||
val cat = ParseQuery.getQuery(...).find() | ||
val cat = ParseQuery.getQuery(...).coroutineFind() | ||
// get cats without callback | ||
} | ||
``` | ||
We use a coroutine builder because `find()` is a suspend function. | ||
We use a coroutine builder because `coroutineFind()` is a suspend function. | ||
|
||
We can also, use a function like a coroutine builder, it will be provider us a flexibility call our query without any extensions function. | ||
|
||
|
@@ -56,7 +56,7 @@ launch { // Coroutine builder | |
setPassword("my pass") | ||
setEmail("[email protected]") | ||
}.also { | ||
signUp() | ||
coroutineSignUp() | ||
} | ||
} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...se/coroutines/read/ParseQueryOperation.kt → ...m/parse/coroutines/ParseQueryOperation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
package com.parse.coroutines.read | ||
package com.parse.coroutines | ||
|
||
interface ParseQueryOperation<out T> { | ||
suspend fun find(): List<T> | ||
suspend fun get(id: String): T | ||
suspend fun first(): T | ||
suspend fun count(): Int | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...nes/user/ParseUserCoroutinesExtensions.kt → ...routines/ParseUserCoroutinesExtensions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters