Created
May 12, 2014 12:37
-
-
Save npiv/c0fe72fb214642fb9029 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
r.db(dbName).table(tableName).filter(new DBLambda() { | |
@Override | |
public RTFluentRow apply(RTFluentRow row) { | |
return row.or( | |
row.and( | |
row.field("age").gt(20), | |
row.field("age").lt(30) | |
), | |
row.field("name").eq("heman") | |
); | |
} | |
}).run(con).size() | |
// Java 8 | |
r.db(dbName).table(tableName).filter(row -> row.or( | |
row.and( | |
row.field("age").gt(20), | |
row.field("age").lt(30) | |
), | |
row.field("name").eq("heman") | |
)).run(con).size() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment