diff options
author | James Moger <james.moger@gitblit.com> | 2014-10-22 21:56:32 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-10-22 22:29:05 -0400 |
commit | 0c76b61f7c0873567507a705726cf86b58e0e59e (patch) | |
tree | 82f4f320d5b7857dc321ab07a439dd204c9b2f1d | |
parent | c7b36b245d619206dbac00873c8deb7c0681bbe4 (diff) | |
download | iciql-0c76b61f7c0873567507a705726cf86b58e0e59e.tar.gz iciql-0c76b61f7c0873567507a705726cf86b58e0e59e.zip |
Documentation
-rw-r--r-- | releases.moxie | 10 | ||||
-rw-r--r-- | src/site/jaqu_comparison.mkd | 4 | ||||
-rw-r--r-- | src/site/usage.mkd | 24 |
3 files changed, 16 insertions, 22 deletions
diff --git a/releases.moxie b/releases.moxie index 47e06d3..a21662e 100644 --- a/releases.moxie +++ b/releases.moxie @@ -5,7 +5,11 @@ r21: { title: ${project.name} ${project.version} released id: ${project.version} date: ${project.buildDate} - note: "If you are upgrading and using EnumId mapping you will have to update your models to define the target class for the enumid mapping." + note: '' + If you are upgrading and using EnumId mapping you will have to update your enums to define the target class for the EnumId interface since it is now generified. + + Switching to using generic types with the EnumId interface allows you to implement alternative enum-type mappings which may make more sense for your business logic. + '' html: ~ text: ~ security: ~ @@ -16,8 +20,8 @@ r21: { changes: - Revised EnumId interface to support generic types (pr-6) additions: - - Add syntax for IN and NOT IN (pr-7) - - Add support for nested AND/OR conditions (pr-8) + - Add syntax oneOf/noneOf for IN and NOT IN (pr-7) + - Add support for compound nested AND/OR conditions (pr-8) - Add support for mapping SQL BOOLEAN to primitive numeric types, not just object numeric types - Add support for customizing EnumId mapping, you can now map enum constants to values of your choice as long as they are a standard type dependencyChanges: diff --git a/src/site/jaqu_comparison.mkd b/src/site/jaqu_comparison.mkd index 3b060e5..b37addb 100644 --- a/src/site/jaqu_comparison.mkd +++ b/src/site/jaqu_comparison.mkd @@ -18,6 +18,8 @@ This is an overview of the fundamental differences between the original JaQu pro <tr><td>dynamic queries</td><td>methods and where clauses for dynamic queries that build iciql objects</td><td>--</td></tr>
<tr><td>DROP</td><td>syntax to drop a table or view</td><td></td></tr>
<tr><td>BETWEEN</td><td>syntax for specifying a BETWEEN x AND y clause</td><td>--</td></tr>
+<tr><td>(NOT) IN</td><td>syntax (oneOf, noneOf) for specifying a (NOT) IN clause</td><td>--</td></tr>
+<tr><td>compound nested conditions</td><td>WHERE (x = y OR x = z) AND (y = a OR y = b)</td><td>--</td></tr>
<tr><th colspan="3">types</th></tr>
<tr><td>primitives</td><td>fully supported</td><td>--</td></tr>
<tr><td>enums</td><td>fully supported</td><td>--</td></tr>
@@ -29,4 +31,4 @@ This is an overview of the fundamental differences between the original JaQu pro <tr><td>DEFAULT values</td><td>set from annotation, <em>default object values</em>, or Define.defaultValue()</td><td>set from annotations</td></tr>
<tr><td>Interface Configuration<br/>Mapped Fields</td><td><em>all fields</em> are mapped regardless of scope<br/>fields are ignored by annotating with @IQIgnore</td><td><em>all public fields</em> are mapped<br/>fields are ignored by reducing their scope</td></tr>
<tr><td>Index names</td><td>can be set</td><td>--</td></tr>
-</table>
\ No newline at end of file +</table>
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
|