aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorJames Moger <james.moger@gmail.com>2011-08-11 14:04:01 -0400
committerJames Moger <james.moger@gmail.com>2011-08-11 14:04:01 -0400
commit0333ed4cf0b5db3f9ffcb0da31787f6e44139af5 (patch)
treea0c0c57e38dd5e8e48e03b2aa4ad8a2c39bff189 /docs
parentf3faeb5d1ea631b0074441f97080e1f2a9145f4b (diff)
downloadiciql-0333ed4cf0b5db3f9ffcb0da31787f6e44139af5.tar.gz
iciql-0333ed4cf0b5db3f9ffcb0da31787f6e44139af5.zip
Added support for HSQL database. Revised dialects some more.
Moved CREATE TABLE and CREATE INDEX statement generation to the dialect. Added DECIMAL(length, scale) support. Improved automatic dialect detection. Unspecified length string is now CLOB instead of TEXT. Boolean now maps to BOOLEAN instead of BIT. Expressions on unmapped fields will throw an IciqlException. Improved exception reporting.
Diffstat (limited to 'docs')
-rw-r--r--docs/00_index.mkd2
-rw-r--r--docs/01_model_classes.mkd6
-rw-r--r--docs/02_table_versioning.mkd10
-rw-r--r--docs/05_releases.mkd12
4 files changed, 19 insertions, 11 deletions
diff --git a/docs/00_index.mkd b/docs/00_index.mkd
index 70048e7..1377db1 100644
--- a/docs/00_index.mkd
+++ b/docs/00_index.mkd
@@ -36,7 +36,7 @@ select * from products
</table>
### Supported Databases
-[H2](http://h2database.com), [MySQL](http://mysql.com)
+[H2 1.3+](http://h2database.com), [HSQLDB 2.2+](http://hsqldb.org)
Support for others is planned and should only require creating a simple "dialect" class.
diff --git a/docs/01_model_classes.mkd b/docs/01_model_classes.mkd
index bdddd80..658ff2b 100644
--- a/docs/01_model_classes.mkd
+++ b/docs/01_model_classes.mkd
@@ -17,7 +17,7 @@ The following data types can be used for all iciql expressions.
<table>
<tr><th colspan="2">All Databases</th></tr>
<tr><td>java.lang.String</td>
-<td>VARCHAR *(length > 0)* or TEXT *(length == 0)*</td></tr>
+<td>VARCHAR *(length > 0)* or CLOB *(length == 0)*</td></tr>
<tr><td>java.lang.Boolean</td>
<td>BIT</td></tr>
@@ -41,7 +41,7 @@ The following data types can be used for all iciql expressions.
<td>DOUBLE</td></tr>
<tr><td>java.math.BigDecimal</td>
-<td>DECIMAL</td></tr>
+<td>DECIMAL *(length == 0)* or DECIMAL(length,scale) *(length > 0)*</td></tr>
<tr><td>java.sql.Date</td>
<td>DATE</td></tr>
@@ -56,7 +56,7 @@ The following data types can be used for all iciql expressions.
<td>TIMESTAMP</td></tr>
<tr><td>java.lang.Enum.name()<br/>*default type*</td>
-<td>VARCHAR *(length > 0)* or TEXT *(length == 0)*<br/>*EnumType.NAME*</td></tr>
+<td>VARCHAR *(length > 0)* or CLOB *(length == 0)*<br/>*EnumType.NAME*</td></tr>
<tr><td>java.lang.Enum.ordinal()</td>
<td>INT<br/>*EnumType.ORDINAL*</td></tr>
diff --git a/docs/02_table_versioning.mkd b/docs/02_table_versioning.mkd
index 12cdf6c..29942fe 100644
--- a/docs/02_table_versioning.mkd
+++ b/docs/02_table_versioning.mkd
@@ -8,22 +8,22 @@ AND/OR<br/>
Your `com.iciql.DbUpgrader` implementation must specify the `IQVersion(version)` annotation
### How does it work?
-If you choose to use versioning, iciql will maintain a table within your database named *_iq_versions* which is defined as:
+If you choose to use versioning, iciql will maintain a table within your database named *iq_versions* which is defined as:
- CREATE TABLE _IQ_VERSIONS(SCHEMANAME VARCHAR(255) NOT NULL, TABLENAME VARCHAR(255) NOT NULL, VERSION INT NOT NULL)
+ CREATE TABLE IQ_VERSIONS(SCHEMANAME VARCHAR(255) NOT NULL, TABLENAME VARCHAR(255) NOT NULL, VERSION INT NOT NULL)
This database table is automatically created if and only if at least one of your model classes specifies a *version* > 0.
-When you generate a statement, iciql will compare the annotated version field of your model class to its last known value in the *_iq_versions* table. If *_iq_versions* lags behind the model annotation, iciql will immediately call the registered `com.iciql.DbUpgrader` implementation before generating and executing the current statement.
+When you generate a statement, iciql will compare the annotated version field of your model class to its last known value in the *iq_versions* table. If *iq_versions* lags behind the model annotation, iciql will immediately call the registered `com.iciql.DbUpgrader` implementation before generating and executing the current statement.
When an upgrade scenario is identified, the current version and the annotated version information is passed to either:
- `DbUpgrader.upgradeDatabase(db, fromVersion, toVersion)`
- `DbUpgrader.upgradeTable(db, schema, table, fromVersion, toVersion)`
-both of which allow for non-linear upgrades. If the upgrade method call is successful and returns *true*, iciql will update the *_iq_versions* table with the annotated version number.
+both of which allow for non-linear upgrades. If the upgrade method call is successful and returns *true*, iciql will update the *iq_versions* table with the annotated version number.
The actual upgrade procedure is beyond the scope of iciql and is your responsibility to implement. This is simply a mechanism to automatically identify when an upgrade is necessary.
**NOTE:**<br/>
-The database entry of the *_iq_versions* table is specified as SCHEMANAME='' and TABLENAME=''. \ No newline at end of file
+The database entry of the *iq_versions* table is specified as SCHEMANAME='' and TABLENAME=''. \ No newline at end of file
diff --git a/docs/05_releases.mkd b/docs/05_releases.mkd
index 7fb0113..c999062 100644
--- a/docs/05_releases.mkd
+++ b/docs/05_releases.mkd
@@ -7,9 +7,17 @@
**%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)
+- 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
+- expressions on unmapped fields will throw an IciqlException
+- improved exception reporting
- moved dialects back to main package
-- refined dialect loading for pooled connections
-- added a MySQL dialect
+- improved automatic dialect determination on pooled connections
+- moved create table and create index statement generation into dialects
+- added HSQL dialect. HSQL fails 4 unit tests, 2 of which are unimplemented merge, 1 has been filed as a bug in HSQL.
+- 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)
- All columns are assumed NULLABLE unless explicitly set *@IQColumn(nullable = false)*
- allow using objects to assign default values<br/>