Created
July 19, 2016 18:25
-
-
Save dalanmiller/84400513be90c30d0b53d45a8ec0b87a 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
// Creating an index that returns true or false based on if certain property is > 0 | |
r.db("example").table("example").indexCreate("example_index", (row) => { return row('above_zero').gt(0) }) | |
// Only returns true values | |
r.db("example").table("example").getAll( true , {index: "above_zero"}) | |
// Only returns false values | |
r.db("example").table("example").getAll( false , {index: "above_zero"}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment