Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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