Created
March 25, 2015 18:07
-
-
Save aj07mm/30087bcbdc0bb7b44e1a to your computer and use it in GitHub Desktop.
filter rethinkdb
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
filtered = list(r.table(collection).filter( | |
lambda doc: \ | |
(doc['id'] == _filters.get('id')).default(False) | \ | |
(doc['userIds'].contains(_filters.get('userIds'))).default(False) | \ | |
(doc['checkpointIds'].contains(_filters.get('checkpointIds'))).default(False) | |
).run(self.rdb_conn)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment