aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/01_model_classes.mkd124
-rw-r--r--docs/05_releases.mkd3
2 files changed, 37 insertions, 90 deletions
diff --git a/docs/01_model_classes.mkd b/docs/01_model_classes.mkd
index cd52c2b..1b370d8 100644
--- a/docs/01_model_classes.mkd
+++ b/docs/01_model_classes.mkd
@@ -8,64 +8,74 @@ Alternatively, model classes can be automatically generated by iciql using the m
### Configuration Requirements and Limitations
1. Your model class **must** provide a public default constructor.
-2. All columns are assumed NULLABLE unless explicitly set *@IQColumn(nullable = false)*.
-3. Only the specified types are supported. Other types such as arrays and custom types are not supported.
-4. Triggers, views, and other advanced database features are not supported.
+2. All **Object** columns are assumed NULLABLE unless explicitly set *@IQColumn(nullable = false)*.
+3. All **Primitive** columns are assumed NOT NULLABLE unless explicitly set *@IQColumn(nullable = true)*.
+4. Only the specified types are supported. Any other types are not supported.
+5. Triggers, views, and other advanced database features are not supported.
-### Fully Supported Data Types
-The following data types can be used for all iciql expressions.
+### Supported Data Types
<table>
-<tr><th colspan="2">Standard SQL Types</th></tr>
-<tr><td>java.lang.String</td>
+<tr><td colspan="3"><b>Fully Supported Types</b><br/>
+can be used for all iciql expressions
+</tr>
+<tr><th>Object</th><th>Primitive</th><th>SQL Type</th></tr>
+<tr><td>java.lang.String</td><td></td>
<td>VARCHAR *(length > 0)* or CLOB *(length == 0)*</td></tr>
-<tr><td>java.lang.Boolean</td>
-<td>BIT</td></tr>
+<tr><td>java.lang.Boolean</td><td>boolean</td>
+<td>BOOLEAN</td></tr>
-<tr><td>java.lang.Byte</td>
+<tr><td>java.lang.Byte</td><td>byte</td>
<td>TINYINT</td></tr>
-<tr><td>java.lang.Short</td>
+<tr><td>java.lang.Short</td><td>short</td>
<td>SMALLINT</td></tr>
-<tr><td>java.lang.Integer</td>
+<tr><td>java.lang.Integer</td><td>int</td>
<td>INT</td></tr>
-<tr><td>java.lang.Long</td>
+<tr><td>java.lang.Long</td><td>long</td>
<td>BIGINT</td></tr>
-<tr><td>java.lang.Float</td>
+<tr><td>java.lang.Float</td><td>float</td>
<td>REAL</td></tr>
-<tr><td>java.lang.Double</td>
+<tr><td>java.lang.Double</td><td>double</td>
<td>DOUBLE</td></tr>
-<tr><td>java.math.BigDecimal</td>
+<tr><td>java.math.BigDecimal</td><td></td>
<td>DECIMAL *(length == 0)* or DECIMAL(length,scale) *(length > 0)*</td></tr>
-<tr><td>java.sql.Date</td>
+<tr><td>java.sql.Date</td><td></td>
<td>DATE</td></tr>
-<tr><td>java.sql.Time</td>
+<tr><td>java.sql.Time</td><td></td>
<td>TIME</td></tr>
-<tr><td>java.sql.Timestamp</td>
+<tr><td>java.sql.Timestamp</td><td></td>
<td>TIMESTAMP</td></tr>
-<tr><td>java.util.Date</td>
+<tr><td>java.util.Date</td><td></td>
<td>TIMESTAMP</td></tr>
-<tr><td>java.lang.Enum.name()<br/>*default type*</td>
+<tr><td>java.lang.Enum.name()<br/>*default type*</td><td></td>
<td>VARCHAR *(length > 0)* or CLOB *(length == 0)*<br/>*EnumType.NAME*</td></tr>
-<tr><td>java.lang.Enum.ordinal()</td>
+<tr><td>java.lang.Enum.ordinal()</td><td></td>
<td>INT<br/>*EnumType.ORDINAL*</td></tr>
-<tr><td>java.lang.Enum implements<br/>*com.iciql.Iciql.EnumId.enumId()*</td>
+<tr><td>java.lang.Enum implements<br/>*com.iciql.Iciql.EnumId.enumId()*</td><td></td>
<td>INT<br/>*EnumType.ENUMID*</td></tr>
-<tr><th colspan="2">H2 Database Types</th></tr>
-<tr><td>java.util.UUID</td>
+<tr><td colspan="3"><b>Partially Supported Types</b><br/>
+can not be directly referenced in an expression</td></tr>
+<tr><td>byte []</td><td></td>
+<td>BLOB</td><tr/>
+
+<tr><td colspan="3"><b>H2 Database Types</b><br/>
+fully supported when paired with an H2 database
+</td></tr>
+<tr><td>java.util.UUID</td><td></td>
<td>UUID</td><tr/>
</table>
@@ -74,70 +84,6 @@ The following data types can be used for all iciql expressions.
The reverse lookup used for model generation, SQL type -> Java type, contains more mappings.<br/>
Please consult the `com.iciql.ModelUtils` class for details.
-### Partially Supported Data Types
-The following data types can be mapped to columns for all general statements <u>BUT</u> these field types may **not** be used to specify **compile-time** clauses or constraints.
-
-<table>
-<tr><td>byte []</td>
-<td>BLOB</td></tr>
-
-<tr><td>boolean</td>
-<td>BIT</td></tr>
-
-<tr><td>byte</td>
-<td>TINYINT</td></tr>
-
-<tr><td>short</td>
-<td>SMALLINT</td></tr>
-
-<tr><td>int</td>
-<td>INT</td></tr>
-
-<tr><td>long</td>
-<td>BIGINT</td></tr>
-
-<tr><td>float</td>
-<td>REAL</td></tr>
-
-<tr><td>double</td>
-<td>DOUBLE</td></tr>
-
-</table>
-
-#### Partially Supported Data Types Example
-%BEGINCODE%
-class Primitives {
- @IQColumn(primaryKey = true)
- int id;
-
- @IQColumn
- String name;
-
- public Primitives() {
- }
-
- public Primitives(int id, String name) {
- this.id = id;
- this.name = name;
- }
-}
-
-Primitives p = new Primitives();
-
-// the following expressions compile, but will throw iciql runtime exceptions
-db.from(p).where(p.id).is(100).selectFirst();
-db.from(p).where(p.id).atLeast(10).select();
-
-// the following expressions will work as expected
-db.from(p).select();
-db.from(p).where("id = ?", 100).selectFirst();
-db.from(p).where("id >= ?", 10).select();
-db.insert(new Primitives(150, "test"));
-db.update(new Primitives(150, "modified"));
-db.delete(new Primitives(150, "test"));
-%ENDCODE%
-
-
## Annotation Configuration
The recommended approach to setup a model class is to annotate the class and field declarations.
diff --git a/docs/05_releases.mkd b/docs/05_releases.mkd
index a0905e5..22ebb2e 100644
--- a/docs/05_releases.mkd
+++ b/docs/05_releases.mkd
@@ -7,6 +7,7 @@
**%VERSION%** ([zip](http://code.google.com/p/iciql/downloads/detail?name=%ZIP%)|[jar](http://code.google.com/p/iciql/downloads/detail?name=%JAR%)) &nbsp; *released %BUILDDATE%*
- api change release (API v4)
+- full support for primitives in all clauses
- DECIMAL(length, scale) support
- unspecified length String fields are now CLOB instead of TEXT. dialects can intercept this and convert to another type. e.g. MySQL dialect can change CLOB to TEXT.
- Boolean now maps to BOOLEAN instead of BIT
@@ -15,7 +16,7 @@
- moved dialects back to main package
- improved automatic dialect determination on pooled connections
- moved create table and create index statement generation into dialects
-- added HSQL dialect. HSQL fails 4 out of 49 unit tests: 2 failures are unimplemented merge, 1 has been filed as a bug in HSQL.
+- added HSQL dialect. HSQL fails 4 out of 49 unit tests: 2 failures are unimplemented merge, and 1 has been filed as a [bug in HSQL](https://sourceforge.net/tracker/?func=detail&aid=3390047&group_id=23316&atid=378131).
- added MySQL dialect. untested.
- renamed <b>_ iq_versions</b> table to *iq_versions* since leading _ character is troublesome for some databases.
- @IQColumn(allowNull=true) -> @IQColumn(nullable=true)