diff options
author | James Moger <james.moger@gmail.com> | 2011-08-15 16:44:14 -0400 |
---|---|---|
committer | James Moger <james.moger@gmail.com> | 2011-08-15 16:44:14 -0400 |
commit | 66e810aaf212c5e37b0a1702b6c33480595408ce (patch) | |
tree | 2babeea368dec0023b9a2add5b3ddc2c1aaaeea8 /src/com/iciql/SQLDialect.java | |
parent | 3622ae0026718ac8466e13e8011f8db309d89106 (diff) | |
download | iciql-66e810aaf212c5e37b0a1702b6c33480595408ce.tar.gz iciql-66e810aaf212c5e37b0a1702b6c33480595408ce.zip |
Added Derby dialect. Finished HSQL dialect. Documentation.
* Improved DEFAULT value specifications.
* Fixed bug in buildObjects where the ResultSet could be closed by the
automatic create table attempt.
* DbInspector now uses the dialect's reported DATETIME class preference.
* Improved IciqlException SQLState code checks.
* Integrated LIMIT and OFFSET expression appending in dialects.
* Updated to H2 1.3.159
* Allow reopening of a memory database in the test suite.
Diffstat (limited to 'src/com/iciql/SQLDialect.java')
-rw-r--r-- | src/com/iciql/SQLDialect.java | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/src/com/iciql/SQLDialect.java b/src/com/iciql/SQLDialect.java index 7821c3f..97d9fe9 100644 --- a/src/com/iciql/SQLDialect.java +++ b/src/com/iciql/SQLDialect.java @@ -62,7 +62,7 @@ public interface SQLDialect { * @param def */ <T> void prepareCreateTable(SQLStatement stat, TableDefinition<T> def); - + /** * Get the CREATE INDEX statement. * @@ -90,24 +90,16 @@ public interface SQLDialect { Object obj); /** - * Append "LIMIT limit" to the SQL statement. + * Append "LIMIT limit OFFSET offset" to the SQL statement. * * @param stat * the statement * @param limit * the limit - */ - void appendLimit(SQLStatement stat, long limit); - - /** - * Append "OFFSET offset" to the SQL statement. - * - * @param stat - * the statement * @param offset * the offset */ - void appendOffset(SQLStatement stat, long offset); + void appendLimitOffset(SQLStatement stat, long limit, long offset); /** * Whether memory tables are supported. @@ -115,7 +107,14 @@ public interface SQLDialect { * @return true if they are */ boolean supportsMemoryTables(); - + + /** + * Whether IF NOT EXISTS notation is supported. + * + * @return true if they are + */ + boolean supportsIfNotExists(); + /** * Whether LIMIT/OFFSET notation is supported. * @@ -123,4 +122,12 @@ public interface SQLDialect { */ boolean supportsLimitOffset(); + /** + * Returns the preferred DATETIME class for the database. + * <p> + * Either java.util.Date or java.sql.Timestamp + * + * @return preferred DATETIME class + */ + Class<? extends java.util.Date> getDateTimeClass(); } |