]> source.dussan.org Git - iciql.git/commitdiff
Moved dialects back to main package. Registered MySQL dialect.
authorJames Moger <james.moger@gmail.com>
Wed, 10 Aug 2011 13:18:43 +0000 (09:18 -0400)
committerJames Moger <james.moger@gmail.com>
Wed, 10 Aug 2011 13:18:43 +0000 (09:18 -0400)
12 files changed:
README.markdown
docs/00_index.mkd
docs/05_releases.mkd
src/com/iciql/Db.java
src/com/iciql/SQLDialectDefault.java [new file with mode: 0644]
src/com/iciql/SQLDialectH2.java [new file with mode: 0644]
src/com/iciql/SQLDialectMySQL.java [new file with mode: 0644]
src/com/iciql/TableDefinition.java
src/com/iciql/dialect/DefaultSQLDialect.java [deleted file]
src/com/iciql/dialect/H2Dialect.java [deleted file]
src/com/iciql/dialect/MySQLDialect.java [deleted file]
src/com/iciql/dialect/package.html [deleted file]

index c212bea739ad67fb13d8c144146418e8eda14564..416bba2f4a5241ff10ae66b239fa477919557fd0 100644 (file)
@@ -18,6 +18,7 @@ iciql **is not**...
 Supported Databases\r
 -------\r
 - [H2](http://h2database.com)\r
+- [MySQL](http://mysql.com)\r
 - Support for others is planned and should only require creating a simple "dialect" class.\r
 \r
 License\r
index 06bec5b47dcb3ca72b2952404665192cc7b6474c..70048e7cab400d6c57ddc117770af867165174b5 100644 (file)
@@ -36,7 +36,7 @@ select * from products
 </table>\r
 \r
 ### Supported Databases\r
-[H2](http://h2database.com)\r
+[H2](http://h2database.com), [MySQL](http://mysql.com)\r
 \r
 Support for others is planned and should only require creating a simple "dialect" class.\r
 \r
index e889f2fa6de9ea0983b05ccdd90b4096144fefbf..7fb0113797ecbf62698e64e5f6b78402b76cfb55 100644 (file)
@@ -7,6 +7,9 @@
 **%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%*\r
 \r
 - api change release (API v4)\r
+- moved dialects back to main package\r
+- refined dialect loading for pooled connections\r
+- added a MySQL dialect\r
 - @IQColumn(allowNull=true) -> @IQColumn(nullable=true)\r
 - All columns are assumed NULLABLE unless explicitly set *@IQColumn(nullable = false)*\r
 - allow using objects to assign default values<br/>\r
index d6f70d136e95686e2a7727ff8252b4a6aa63117a..c7801c22e696193ac95c9e25286ae1b99fd0c230 100644 (file)
@@ -37,8 +37,6 @@ import javax.sql.DataSource;
 import com.iciql.DbUpgrader.DefaultDbUpgrader;\r
 import com.iciql.Iciql.IQTable;\r
 import com.iciql.Iciql.IQVersion;\r
-import com.iciql.dialect.DefaultSQLDialect;\r
-import com.iciql.dialect.H2Dialect;\r
 import com.iciql.util.JdbcUtils;\r
 import com.iciql.util.StringUtils;\r
 import com.iciql.util.Utils;\r
@@ -73,7 +71,8 @@ public class Db {
                // can register by...\r
                // 1. Connection class name\r
                // 2. DatabaseMetaData.getDatabaseProductName()\r
-               DIALECTS.put("h2", H2Dialect.class);\r
+               DIALECTS.put("H2", SQLDialectH2.class);\r
+               DIALECTS.put("MySQL", SQLDialectMySQL.class);\r
        }\r
 \r
        private Db(Connection conn) {\r
@@ -114,7 +113,7 @@ public class Db {
                        dialectClass = DIALECTS.get(databaseName);\r
                } else {\r
                        // did not find a match, use default\r
-                       dialectClass = DefaultSQLDialect.class;\r
+                       dialectClass = SQLDialectDefault.class;\r
                }\r
                return instance(dialectClass);\r
        }\r
diff --git a/src/com/iciql/SQLDialectDefault.java b/src/com/iciql/SQLDialectDefault.java
new file mode 100644 (file)
index 0000000..760a1f4
--- /dev/null
@@ -0,0 +1,99 @@
+/*\r
+ * Copyright 2004-2011 H2 Group.\r
+ * Copyright 2011 James Moger.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+package com.iciql;\r
+\r
+import java.sql.DatabaseMetaData;\r
+import java.sql.SQLException;\r
+\r
+import com.iciql.TableDefinition.IndexDefinition;\r
+import com.iciql.util.StringUtils;\r
+\r
+/**\r
+ * Default implementation of an SQL dialect. Does not support merge nor index\r
+ * creation.\r
+ */\r
+public class SQLDialectDefault implements SQLDialect {\r
+       float databaseVersion;\r
+       String databaseName;\r
+       String productVersion;\r
+\r
+       @Override\r
+       public String toString() {\r
+               return getClass().getName() + ": " + databaseName + " " + productVersion;\r
+       }\r
+\r
+       @Override\r
+       public void configureDialect(String databaseName, DatabaseMetaData data) {\r
+               this.databaseName = databaseName;\r
+               try {\r
+                       databaseVersion = Float.parseFloat(data.getDatabaseMajorVersion() + "."\r
+                                       + data.getDatabaseMinorVersion());\r
+                       productVersion = data.getDatabaseProductVersion();\r
+               } catch (SQLException e) {\r
+                       throw new IciqlException(e);\r
+               }\r
+       }\r
+\r
+       @Override\r
+       public boolean supportsMemoryTables() {\r
+               return false;\r
+       }\r
+\r
+       @Override\r
+       public boolean supportsMerge() {\r
+               return false;\r
+       }\r
+\r
+       @Override\r
+       public boolean supportsLimitOffset() {\r
+               return true;\r
+       }\r
+\r
+       @Override\r
+       public String prepareTableName(String schemaName, String tableName) {\r
+               if (StringUtils.isNullOrEmpty(schemaName)) {\r
+                       return tableName;\r
+               }\r
+               return schemaName + "." + tableName;\r
+       }\r
+\r
+       @Override\r
+       public String prepareColumnName(String name) {\r
+               return name;\r
+       }\r
+\r
+       @Override\r
+       public String prepareCreateIndex(String schemaName, String tableName, IndexDefinition index) {\r
+               throw new IciqlException("Dialect does not support index creation!");\r
+       }\r
+\r
+       @Override\r
+       public <T> void prepareMerge(SQLStatement stat, String schemaName, String tableName, TableDefinition<T> def, Object obj) {\r
+               throw new IciqlException("Dialect does not support merge statements!");\r
+       }\r
+\r
+       @Override\r
+       public void appendLimit(SQLStatement stat, long limit) {\r
+               stat.appendSQL(" LIMIT " + limit);\r
+       }\r
+\r
+       @Override\r
+       public void appendOffset(SQLStatement stat, long offset) {\r
+               stat.appendSQL(" OFFSET " + offset);\r
+       }\r
+}
\ No newline at end of file
diff --git a/src/com/iciql/SQLDialectH2.java b/src/com/iciql/SQLDialectH2.java
new file mode 100644 (file)
index 0000000..c65c277
--- /dev/null
@@ -0,0 +1,97 @@
+/*\r
+ * Copyright 2011 James Moger.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+package com.iciql;\r
+\r
+import com.iciql.TableDefinition.FieldDefinition;\r
+import com.iciql.TableDefinition.IndexDefinition;\r
+import com.iciql.util.StatementBuilder;\r
+\r
+/**\r
+ * H2 database dialect.\r
+ */\r
+public class SQLDialectH2 extends SQLDialectDefault {\r
+\r
+       @Override\r
+       public boolean supportsMemoryTables() {\r
+               return true;\r
+       }\r
+\r
+       @Override\r
+       public boolean supportsMerge() {\r
+               return true;\r
+       }\r
+\r
+       @Override\r
+       public String prepareCreateIndex(String schema, String table, IndexDefinition index) {\r
+               StatementBuilder buff = new StatementBuilder();\r
+               buff.append("CREATE ");\r
+               switch (index.type) {\r
+               case STANDARD:\r
+                       break;\r
+               case UNIQUE:\r
+                       buff.append("UNIQUE ");\r
+                       break;\r
+               case HASH:\r
+                       buff.append("HASH ");\r
+                       break;\r
+               case UNIQUE_HASH:\r
+                       buff.append("UNIQUE HASH ");\r
+                       break;\r
+               }\r
+               buff.append("INDEX IF NOT EXISTS ");\r
+               buff.append(index.indexName);\r
+               buff.append(" ON ");\r
+               buff.append(table);\r
+               buff.append("(");\r
+               for (String col : index.columnNames) {\r
+                       buff.appendExceptFirst(", ");\r
+                       buff.append(col);\r
+               }\r
+               buff.append(")");\r
+               return buff.toString();\r
+       }\r
+       \r
+       @Override\r
+       public <T> void prepareMerge(SQLStatement stat, String schemaName, String tableName, TableDefinition<T> def, Object obj) {\r
+               StatementBuilder buff = new StatementBuilder("MERGE INTO ");\r
+               buff.append(prepareTableName(schemaName, tableName)).append(" (");\r
+               buff.resetCount();\r
+               for (FieldDefinition field : def.fields) {\r
+                       buff.appendExceptFirst(", ");\r
+                       buff.append(field.columnName);\r
+               }\r
+               buff.append(") KEY(");\r
+               buff.resetCount();\r
+               for (FieldDefinition field : def.fields) {\r
+                       if (field.isPrimaryKey) {\r
+                               buff.appendExceptFirst(", ");\r
+                               buff.append(field.columnName);\r
+                       }\r
+               }\r
+               buff.append(") ");\r
+               buff.resetCount();\r
+               buff.append("VALUES (");\r
+               for (FieldDefinition field : def.fields) {\r
+                       buff.appendExceptFirst(", ");\r
+                       buff.append('?');\r
+                       Object value = def.getValue(obj, field);\r
+                       stat.addParameter(value);\r
+               }\r
+               buff.append(')');\r
+               stat.setSQL(buff.toString());\r
+       }\r
+}
\ No newline at end of file
diff --git a/src/com/iciql/SQLDialectMySQL.java b/src/com/iciql/SQLDialectMySQL.java
new file mode 100644 (file)
index 0000000..837d77b
--- /dev/null
@@ -0,0 +1,99 @@
+/*\r
+ * Copyright 2011 James Moger.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+package com.iciql;\r
+\r
+import com.iciql.TableDefinition.FieldDefinition;\r
+import com.iciql.TableDefinition.IndexDefinition;\r
+import com.iciql.util.StatementBuilder;\r
+\r
+/**\r
+ * MySQL database dialect.\r
+ */\r
+public class SQLDialectMySQL extends SQLDialectDefault {\r
+\r
+       @Override\r
+       public boolean supportsMemoryTables() {\r
+               return false;\r
+       }\r
+\r
+       @Override\r
+       public boolean supportsMerge() {\r
+               return true;\r
+       }\r
+\r
+       @Override\r
+       public String prepareColumnName(String name) {\r
+               return "`" + name + "`";\r
+       }\r
+       \r
+       @Override\r
+       public String prepareCreateIndex(String schema, String table, IndexDefinition index) {\r
+               StatementBuilder buff = new StatementBuilder();\r
+               buff.append("CREATE ");\r
+               switch (index.type) {\r
+               case STANDARD:\r
+                       break;\r
+               case UNIQUE:\r
+                       buff.append("UNIQUE ");\r
+                       break;\r
+               case UNIQUE_HASH:\r
+                       buff.append("UNIQUE ");\r
+                       break;\r
+               }\r
+               buff.append("INDEX ");\r
+               buff.append(index.indexName);\r
+               buff.append(" ON ");\r
+               buff.append(table);\r
+               buff.append("(");\r
+               for (String col : index.columnNames) {\r
+                       buff.appendExceptFirst(", ");\r
+                       buff.append(prepareColumnName(col));\r
+               }\r
+               buff.append(") ");\r
+               \r
+               // USING\r
+               switch (index.type) {\r
+               case HASH:\r
+                       buff.append("USING HASH");\r
+                       break;\r
+               case UNIQUE_HASH:\r
+                       buff.append("USING HASH");\r
+                       break;\r
+               }\r
+               return buff.toString().trim();\r
+       }\r
+       \r
+       @Override\r
+       public <T> void prepareMerge(SQLStatement stat, String schemaName, String tableName, TableDefinition<T> def, Object obj) {              \r
+               StatementBuilder buff = new StatementBuilder("REPLACE INTO ");\r
+               buff.append(prepareTableName(schemaName, tableName)).append('(');\r
+               for (FieldDefinition field : def.fields) {\r
+                       buff.appendExceptFirst(", ");\r
+                       buff.append(prepareColumnName(field.columnName));\r
+               }\r
+               buff.append(") VALUES(");\r
+               buff.resetCount();\r
+               for (FieldDefinition field : def.fields) {\r
+                       buff.appendExceptFirst(", ");\r
+                       buff.append('?');\r
+                       Object value = def.getValue(obj, field);\r
+                       stat.addParameter(value);\r
+               }\r
+               buff.append(')');\r
+               stat.setSQL(buff.toString());\r
+       }\r
+}
\ No newline at end of file
index 5d934a575d1a408630c6d7053e4bcba8889d1709..c08a032d76a63a7cb93548716740c219213a893f 100644 (file)
@@ -67,12 +67,12 @@ public class TableDefinition<T> {
         * The meta data of a field.\r
         */\r
 \r
-       public static class FieldDefinition {\r
-               public String columnName;\r
+       static class FieldDefinition {\r
+               String columnName;\r
                Field field;\r
                String dataType;\r
                int maxLength;\r
-               public boolean isPrimaryKey;\r
+               boolean isPrimaryKey;\r
                boolean isAutoIncrement;\r
                boolean trimString;\r
                boolean nullable;\r
@@ -362,7 +362,7 @@ public class TableDefinition<T> {
         * Optionally truncates strings to the maximum length and converts\r
         * java.lang.Enum types to Strings or Integers.\r
         */\r
-       public Object getValue(Object obj, FieldDefinition field) {\r
+       Object getValue(Object obj, FieldDefinition field) {\r
                Object value = field.getValue(obj);\r
                if (value == null) {\r
                        return value;\r
diff --git a/src/com/iciql/dialect/DefaultSQLDialect.java b/src/com/iciql/dialect/DefaultSQLDialect.java
deleted file mode 100644 (file)
index f3f222e..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.iciql.dialect;\r
-\r
-import java.sql.DatabaseMetaData;\r
-import java.sql.SQLException;\r
-\r
-import com.iciql.IciqlException;\r
-import com.iciql.SQLDialect;\r
-import com.iciql.SQLStatement;\r
-import com.iciql.TableDefinition;\r
-import com.iciql.TableDefinition.IndexDefinition;\r
-import com.iciql.util.StringUtils;\r
-\r
-/**\r
- * Default implementation of an SQL dialect. Does not support merge nor index\r
- * creation.\r
- */\r
-public class DefaultSQLDialect implements SQLDialect {\r
-       float databaseVersion;\r
-       String databaseName;\r
-       String productVersion;\r
-\r
-       @Override\r
-       public String toString() {\r
-               return getClass().getName() + ": " + databaseName + " " + productVersion;\r
-       }\r
-\r
-       @Override\r
-       public void configureDialect(String databaseName, DatabaseMetaData data) {\r
-               this.databaseName = databaseName;\r
-               try {\r
-                       databaseVersion = Float.parseFloat(data.getDatabaseMajorVersion() + "."\r
-                                       + data.getDatabaseMinorVersion());\r
-                       productVersion = data.getDatabaseProductVersion();\r
-               } catch (SQLException e) {\r
-                       throw new IciqlException(e);\r
-               }\r
-       }\r
-\r
-       @Override\r
-       public boolean supportsMemoryTables() {\r
-               return false;\r
-       }\r
-\r
-       @Override\r
-       public boolean supportsMerge() {\r
-               return false;\r
-       }\r
-\r
-       @Override\r
-       public boolean supportsLimitOffset() {\r
-               return true;\r
-       }\r
-\r
-       @Override\r
-       public String prepareTableName(String schemaName, String tableName) {\r
-               if (StringUtils.isNullOrEmpty(schemaName)) {\r
-                       return tableName;\r
-               }\r
-               return schemaName + "." + tableName;\r
-       }\r
-\r
-       @Override\r
-       public String prepareColumnName(String name) {\r
-               return name;\r
-       }\r
-\r
-       @Override\r
-       public String prepareCreateIndex(String schemaName, String tableName, IndexDefinition index) {\r
-               throw new IciqlException("Dialect does not support index creation!");\r
-       }\r
-\r
-       @Override\r
-       public <T> void prepareMerge(SQLStatement stat, String schemaName, String tableName, TableDefinition<T> def, Object obj) {\r
-               throw new IciqlException("Dialect does not support merge statements!");\r
-       }\r
-\r
-       @Override\r
-       public void appendLimit(SQLStatement stat, long limit) {\r
-               stat.appendSQL(" LIMIT " + limit);\r
-       }\r
-\r
-       @Override\r
-       public void appendOffset(SQLStatement stat, long offset) {\r
-               stat.appendSQL(" OFFSET " + offset);\r
-       }\r
-}
\ No newline at end of file
diff --git a/src/com/iciql/dialect/H2Dialect.java b/src/com/iciql/dialect/H2Dialect.java
deleted file mode 100644 (file)
index 61babd7..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-package com.iciql.dialect;\r
-\r
-import com.iciql.SQLStatement;\r
-import com.iciql.TableDefinition;\r
-import com.iciql.TableDefinition.FieldDefinition;\r
-import com.iciql.TableDefinition.IndexDefinition;\r
-import com.iciql.util.StatementBuilder;\r
-\r
-/**\r
- * H2 database dialect.\r
- */\r
-public class H2Dialect extends DefaultSQLDialect {\r
-\r
-       @Override\r
-       public boolean supportsMemoryTables() {\r
-               return true;\r
-       }\r
-\r
-       @Override\r
-       public boolean supportsMerge() {\r
-               return true;\r
-       }\r
-\r
-       @Override\r
-       public String prepareCreateIndex(String schema, String table, IndexDefinition index) {\r
-               StatementBuilder buff = new StatementBuilder();\r
-               buff.append("CREATE ");\r
-               switch (index.type) {\r
-               case STANDARD:\r
-                       break;\r
-               case UNIQUE:\r
-                       buff.append("UNIQUE ");\r
-                       break;\r
-               case HASH:\r
-                       buff.append("HASH ");\r
-                       break;\r
-               case UNIQUE_HASH:\r
-                       buff.append("UNIQUE HASH ");\r
-                       break;\r
-               }\r
-               buff.append("INDEX IF NOT EXISTS ");\r
-               buff.append(index.indexName);\r
-               buff.append(" ON ");\r
-               buff.append(table);\r
-               buff.append("(");\r
-               for (String col : index.columnNames) {\r
-                       buff.appendExceptFirst(", ");\r
-                       buff.append(col);\r
-               }\r
-               buff.append(")");\r
-               return buff.toString();\r
-       }\r
-       \r
-       @Override\r
-       public <T> void prepareMerge(SQLStatement stat, String schemaName, String tableName, TableDefinition<T> def, Object obj) {\r
-               StatementBuilder buff = new StatementBuilder("MERGE INTO ");\r
-               buff.append(prepareTableName(schemaName, tableName)).append(" (");\r
-               buff.resetCount();\r
-               for (FieldDefinition field : def.fields) {\r
-                       buff.appendExceptFirst(", ");\r
-                       buff.append(field.columnName);\r
-               }\r
-               buff.append(") KEY(");\r
-               buff.resetCount();\r
-               for (FieldDefinition field : def.fields) {\r
-                       if (field.isPrimaryKey) {\r
-                               buff.appendExceptFirst(", ");\r
-                               buff.append(field.columnName);\r
-                       }\r
-               }\r
-               buff.append(") ");\r
-               buff.resetCount();\r
-               buff.append("VALUES (");\r
-               for (FieldDefinition field : def.fields) {\r
-                       buff.appendExceptFirst(", ");\r
-                       buff.append('?');\r
-                       Object value = def.getValue(obj, field);\r
-                       stat.addParameter(value);\r
-               }\r
-               buff.append(')');\r
-               stat.setSQL(buff.toString());\r
-       }\r
-}
\ No newline at end of file
diff --git a/src/com/iciql/dialect/MySQLDialect.java b/src/com/iciql/dialect/MySQLDialect.java
deleted file mode 100644 (file)
index e1ccaf3..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-package com.iciql.dialect;\r
-\r
-import com.iciql.SQLStatement;\r
-import com.iciql.TableDefinition;\r
-import com.iciql.TableDefinition.FieldDefinition;\r
-import com.iciql.TableDefinition.IndexDefinition;\r
-import com.iciql.util.StatementBuilder;\r
-\r
-/**\r
- * H2 database dialect.\r
- */\r
-public class MySQLDialect extends DefaultSQLDialect {\r
-\r
-       @Override\r
-       public boolean supportsMemoryTables() {\r
-               return false;\r
-       }\r
-\r
-       @Override\r
-       public boolean supportsMerge() {\r
-               return true;\r
-       }\r
-\r
-       @Override\r
-       public String prepareColumnName(String name) {\r
-               return "`" + name + "`";\r
-       }\r
-       \r
-       @Override\r
-       public String prepareCreateIndex(String schema, String table, IndexDefinition index) {\r
-               StatementBuilder buff = new StatementBuilder();\r
-               buff.append("CREATE ");\r
-               switch (index.type) {\r
-               case STANDARD:\r
-                       break;\r
-               case UNIQUE:\r
-                       buff.append("UNIQUE ");\r
-                       break;\r
-               case UNIQUE_HASH:\r
-                       buff.append("UNIQUE ");\r
-                       break;\r
-               }\r
-               buff.append("INDEX ");\r
-               buff.append(index.indexName);\r
-               buff.append(" ON ");\r
-               buff.append(table);\r
-               buff.append("(");\r
-               for (String col : index.columnNames) {\r
-                       buff.appendExceptFirst(", ");\r
-                       buff.append(prepareColumnName(col));\r
-               }\r
-               buff.append(") ");\r
-               \r
-               // USING\r
-               switch (index.type) {\r
-               case HASH:\r
-                       buff.append("USING HASH");\r
-                       break;\r
-               case UNIQUE_HASH:\r
-                       buff.append("USING HASH");\r
-                       break;\r
-               }\r
-               return buff.toString().trim();\r
-       }\r
-       \r
-       @Override\r
-       public <T> void prepareMerge(SQLStatement stat, String schemaName, String tableName, TableDefinition<T> def, Object obj) {              \r
-               StatementBuilder buff = new StatementBuilder("REPLACE INTO ");\r
-               buff.append(prepareTableName(schemaName, tableName)).append('(');\r
-               for (FieldDefinition field : def.fields) {\r
-                       buff.appendExceptFirst(", ");\r
-                       buff.append(prepareColumnName(field.columnName));\r
-               }\r
-               buff.append(") VALUES(");\r
-               buff.resetCount();\r
-               for (FieldDefinition field : def.fields) {\r
-                       buff.appendExceptFirst(", ");\r
-                       buff.append('?');\r
-                       Object value = def.getValue(obj, field);\r
-                       stat.addParameter(value);\r
-               }\r
-               buff.append(')');\r
-               stat.setSQL(buff.toString());\r
-       }\r
-}
\ No newline at end of file
diff --git a/src/com/iciql/dialect/package.html b/src/com/iciql/dialect/package.html
deleted file mode 100644 (file)
index ad91873..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<!--
- Copyright 2004-2011 H2 Group.
- Copyright 2011 James Moger.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-<title>Javadoc package documentation</title>
-</head>
-<body>
-The dialect classes for iciql.
-</body>
-</html>
\ No newline at end of file