diff options
author | James Moger <james.moger@gmail.com> | 2011-08-09 11:28:48 -0400 |
---|---|---|
committer | James Moger <james.moger@gmail.com> | 2011-08-09 11:28:48 -0400 |
commit | 1a2339a9f1f96ddca64ab392dd7f9e1621e6c201 (patch) | |
tree | 413631f6e46e2bb2826e67f98df5b5180468833b /docs | |
parent | fec6df5eaac334540e220d7f7c05c9d21357f554 (diff) | |
download | iciql-1a2339a9f1f96ddca64ab392dd7f9e1621e6c201.tar.gz iciql-1a2339a9f1f96ddca64ab392dd7f9e1621e6c201.zip |
IQTable.primaryKey is now an array. Default values from objects.
Also fixed an error with allowing null objects. Noted rapid churn of
iciql in documentation. Changed build constants for next release.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/00_index.mkd | 2 | ||||
-rw-r--r-- | docs/01_model_classes.mkd | 19 | ||||
-rw-r--r-- | docs/05_releases.mkd | 20 | ||||
-rw-r--r-- | docs/resources/iciql.css | 5 |
4 files changed, 44 insertions, 2 deletions
diff --git a/docs/00_index.mkd b/docs/00_index.mkd index 3371ce2..06bec5b 100644 --- a/docs/00_index.mkd +++ b/docs/00_index.mkd @@ -46,6 +46,8 @@ iciql requires a Java 6 Runtime Environment (JRE) or a Java 6 Development Kit (J ### Current Release
+<span class="warning">iciql is undergoing rapid development so api and configuration are subject to change from release to release</span>
+
**%VERSION%** ([zip](http://code.google.com/p/iciql/downloads/detail?name=%ZIP%)|[jar](http://code.google.com/p/iciql/downloads/detail?name=%JAR%)) *released %BUILDDATE%*
issues, binaries, & source @ [Google Code][googlecode]<br/>
diff --git a/docs/01_model_classes.mkd b/docs/01_model_classes.mkd index 846ef6c..274cb92 100644 --- a/docs/01_model_classes.mkd +++ b/docs/01_model_classes.mkd @@ -143,6 +143,7 @@ The recommended approach to setup a model class is to annotate the class and fie ### advantages
- annotated fields may have any scope
+- annotated fields may specify default values
- annotated models support annotated field inheritance making it possible to design a single base class that defines the fields and then create table subclasses that specify the table mappings.
- model runtime dependency is limited to the small, portable `com.iciql.Iciql` class file which contains the annotation definitions
@@ -151,6 +152,24 @@ The recommended approach to setup a model class is to annotate the class and fie - more verbose model classes
- indexes are defined using "fragile" string column names
- compound primary keys are defined using "fragile" string column names
+
+### default values
+
+You may specify default values for an @IQColumn by either:
+
+1. specifying the default value string within your annotation<br/>
+%BEGINCODE%
+// notice the single ticks!
+@IQColumn(defaultValue="'2000-01-01 00:00:00'")
+Date myDate;
+%ENDCODE%
+2. setting a default object on the field<br/>
+%BEGINCODE%
+@IQColumn
+Date myDate = new Date(100, 0, 1);
+%ENDCODE%
+
+If you want to specify a database-specific variable or function as your default value (e.g. CURRENT_TIMESTAMP) you must do that within the annotation. Also note that the IQColumn.defaultValue must be a well-formatted SQL DEFAULT expression whereas object defaults will be automatically converted to an SQL DEFAULT expression.
### Example Annotated Model
%BEGINCODE%
diff --git a/docs/05_releases.mkd b/docs/05_releases.mkd index b060fd2..8d1295b 100644 --- a/docs/05_releases.mkd +++ b/docs/05_releases.mkd @@ -2,8 +2,26 @@ ### Current Release
+<span class="warning">iciql is undergoing rapid development so api and configuration are subject to change from release to release</span>
+
**%VERSION%** ([zip](http://code.google.com/p/iciql/downloads/detail?name=%ZIP%)|[jar](http://code.google.com/p/iciql/downloads/detail?name=%JAR%)) *released %BUILDDATE%*
+- api change release (API v4)
+- allow using objects to assign default values<br/>
+%BEGINCODE%
+// CREATE TABLE ... myDate DATETIME DEFAULT '2000-02-01 00:00:00'
+@IQColumn
+Date myDate = new Date(100, 1, 1);
+%ENDCODE%
+- changed @IQTable.primaryKey definition to use array of column names<br/>
+%BEGINCODE%
+@IQTable( primaryKey = {"name", "nickname"})
+%ENDCODE%
+
+### Older Releases
+
+**0.6.3** *released 2011-08-08*
+
- api change release (API v3)
- finished enum support (issue 4)
- added UUID type support (H2 databases only)
@@ -11,8 +29,6 @@ - added *between(A y).and(A z)* condition syntax
- moved dialects into separate package
-### Older Releases
-
**0.6.2** *released 2011-08-05*
- api change release (API v2)
diff --git a/docs/resources/iciql.css b/docs/resources/iciql.css index 7f8a48b..3ba942b 100644 --- a/docs/resources/iciql.css +++ b/docs/resources/iciql.css @@ -77,6 +77,11 @@ a:hover, a:visited, a:active { color: #880000;
}
+span.warning {
+ font-weight: bold;
+ color: #f00000;
+}
+
img.logo {
margin-top:-8px;
float: right;
|