Created
February 7, 2022 22:52
-
-
Save victorbrndls/542006062edd4ab55a99ac29a3be5652 to your computer and use it in GitHub Desktop.
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
class MemoryMutationQueue { | |
private final List<MutationBatch> queue; | |
@Override | |
public boolean isEmpty() { | |
return queue.isEmpty(); | |
} | |
} | |
class SQLiteMutationQueue { | |
private final SQLitePersistence db; | |
@Override | |
public boolean isEmpty() { | |
return db.query("SELECT batch_id FROM mutations WHERE uid = ? LIMIT 1") | |
.binding(uid) | |
.isEmpty(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment