aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/com/iciql/SQLDialectPostgreSQL.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/iciql/SQLDialectPostgreSQL.java')
-rw-r--r--src/main/java/com/iciql/SQLDialectPostgreSQL.java103
1 files changed, 0 insertions, 103 deletions
diff --git a/src/main/java/com/iciql/SQLDialectPostgreSQL.java b/src/main/java/com/iciql/SQLDialectPostgreSQL.java
index f10017c..6998c24 100644
--- a/src/main/java/com/iciql/SQLDialectPostgreSQL.java
+++ b/src/main/java/com/iciql/SQLDialectPostgreSQL.java
@@ -16,11 +16,6 @@
package com.iciql;
-import java.sql.SQLException;
-
-import org.postgresql.util.PGobject;
-
-import com.iciql.Iciql.DataTypeAdapter;
import com.iciql.TableDefinition.IndexDefinition;
import com.iciql.util.StatementBuilder;
@@ -106,102 +101,4 @@ public class SQLDialectPostgreSQL extends SQLDialectDefault {
stat.setSQL(buff.toString().trim());
}
- /**
- * Handles transforming raw strings to/from the Postgres JSON data type.
- */
- public class JsonStringAdapter implements DataTypeAdapter<String> {
-
- @Override
- public String getDataType() {
- return "json";
- }
-
- @Override
- public Class<String> getJavaType() {
- return String.class;
- }
-
- @Override
- public Object serialize(String value) {
- PGobject pg = new PGobject();
- pg.setType(getDataType());
- try {
- pg.setValue(value);
- } catch (SQLException e) {
- // not thrown on base PGobject
- }
- return pg;
- }
-
- @Override
- public String deserialize(Object value) {
- return value.toString();
- }
- }
-
- /**
- * Handles transforming raw strings to/from the Postgres JSONB data type.
- */
- public class JsonbStringAdapter implements DataTypeAdapter<String> {
-
- @Override
- public String getDataType() {
- return "jsonb";
- }
-
- @Override
- public Class<String> getJavaType() {
- return String.class;
- }
-
- @Override
- public Object serialize(String value) {
- PGobject pg = new PGobject();
- pg.setType(getDataType());
- try {
- pg.setValue(value);
- } catch (SQLException e) {
- // not thrown on base PGobject
- }
- return pg;
- }
-
- @Override
- public String deserialize(Object value) {
- return value.toString();
- }
- }
-
- /**
- * Handles transforming raw strings to/from the Postgres XML data type.
- */
- public class XmlStringAdapter implements DataTypeAdapter<String> {
-
- @Override
- public String getDataType() {
- return "xml";
- }
-
- @Override
- public Class<String> getJavaType() {
- return String.class;
- }
-
- @Override
- public Object serialize(String value) {
- PGobject pg = new PGobject();
- pg.setType(getDataType());
- try {
- pg.setValue(value);
- } catch (SQLException e) {
- // not thrown on base PGobject
- }
- return pg;
- }
-
- @Override
- public String deserialize(Object value) {
- return value.toString();
- }
- }
} \ No newline at end of file