diff options
author | James Moger <james.moger@gitblit.com> | 2014-10-29 17:12:14 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-10-29 17:12:14 -0400 |
commit | 8d28bc740c9bcb76186e7572f74a144397e780ce (patch) | |
tree | 1815e1d21df77e352ba2e8106557f71cb5561a8e /src/site | |
parent | bdb2899da4cbb27016d85c5e4fe268ddbccef546 (diff) | |
download | iciql-8d28bc740c9bcb76186e7572f74a144397e780ce.tar.gz iciql-8d28bc740c9bcb76186e7572f74a144397e780ce.zip |
Support data type adapters
This allows custom types to be (de)serialized into a standard JDBC type or
to support db-specific data types, like the Postgres json and xml types.
Diffstat (limited to 'src/site')
-rw-r--r-- | src/site/jaqu_comparison.mkd | 1 | ||||
-rw-r--r-- | src/site/model_classes.mkd | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/site/jaqu_comparison.mkd b/src/site/jaqu_comparison.mkd index b37addb..3a00e6d 100644 --- a/src/site/jaqu_comparison.mkd +++ b/src/site/jaqu_comparison.mkd @@ -26,6 +26,7 @@ This is an overview of the fundamental differences between the original JaQu pro <tr><td>DECIMAL(length,scale)</td><td>can specify length/precision and scale</td><td>--</td></tr>
<tr><td>BOOLEAN</td><td>flexible mapping of boolean as bool, varchar, or int</td><td>--</td></tr>
<tr><td>BLOB</td><td>partially supported <em>(can not be used in a WHERE clause)</em></td><td>--</td></tr>
+<tr><td>Custom</td><td>partially supported <em>uses custom-defined data type adapter (can not be used in a WHERE clause)</em></td><td>--</td></tr>
<tr><td>UUID</td><td>fully supported <em>(H2 only)</em> </td><td>--</td></tr>
<tr><th colspan="3">configuration</th></tr>
<tr><td>DEFAULT values</td><td>set from annotation, <em>default object values</em>, or Define.defaultValue()</td><td>set from annotations</td></tr>
diff --git a/src/site/model_classes.mkd b/src/site/model_classes.mkd index cb21dcd..747c094 100644 --- a/src/site/model_classes.mkd +++ b/src/site/model_classes.mkd @@ -73,6 +73,8 @@ can be used for all iciql expressions can not be directly referenced in an expression</td></tr>
<tr><td>byte []</td> <td></td>
<td>BLOB</td><tr/>
+<tr><td>Custom</td> <td>create a DataTypeAdapter<Custom></td>
+<td>Custom</td><tr/>
<tr><td colspan="3"><b>H2 Database Types</b><br/>
fully supported when paired with an H2 database
@@ -180,6 +182,9 @@ public class Product { @IQColumn
private Availability availability;
+
+ @IQColumn(typeAdapter = MyCustomClassAdapter.class)
+ private MyCustomClass;
// ignored because it is not annotated AND the class is @IQTable annotated
private Integer ignoredField;
|