aboutsummaryrefslogtreecommitdiffstats
path: root/src/site/usage.mkd
diff options
context:
space:
mode:
Diffstat (limited to 'src/site/usage.mkd')
-rw-r--r--src/site/usage.mkd24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/site/usage.mkd b/src/site/usage.mkd
index b09f91b..21c262e 100644
--- a/src/site/usage.mkd
+++ b/src/site/usage.mkd
@@ -82,25 +82,13 @@ final Customer model = new Customer();
// AND (
// region = 'LA' OR region = 'CA'
// )
-List<Customer> regionals =
- db.from(model)
- .where(model.customerId).isNotNull()
- .and(model.region).isNotNull()
- .and(new Or<Customer>(db, model) {{
- or(model.region).is("LA");
- or(model.region).is("CA");
- }});
-
-List<Customer> regionalType1s =
- db.from(model)
- .where(new And<Customer>(db, model) {{
- and(model.type).is(1);
- and(new Or<Customer>(db, model) {{
- or(model.region).is("CA");
- or(model.region).is("LA");
+List<Customer> regionals = db.from(model)
+ .where(model.customerId).isNotNull()
+ .and(model.region).isNotNull()
+ .and(new Or<Customer>(db, model) {{
+ or(model.region).is("LA");
+ or(model.region).is("CA");
}});
- }});
-
---JAVA---
### Finding Matches for a List of Values