diff options
author | James Moger <james.moger@gitblit.com> | 2014-11-10 11:10:01 -0500 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-11-10 21:46:37 -0500 |
commit | c1d81bcdfc948b417964c6b69be2ee5801e5e1c9 (patch) | |
tree | eab491b340179bdf24f7645977977ddb245455c6 /src/main/java/com/iciql/adapter/postgresql | |
parent | 4b9a61d0ef0fc2a9230a53a0ade45a20889aa9e3 (diff) | |
download | iciql-c1d81bcdfc948b417964c6b69be2ee5801e5e1c9.tar.gz iciql-c1d81bcdfc948b417964c6b69be2ee5801e5e1c9.zip |
Add support for runtime Mode in the DataTypeAdapters
Diffstat (limited to 'src/main/java/com/iciql/adapter/postgresql')
3 files changed, 24 insertions, 0 deletions
diff --git a/src/main/java/com/iciql/adapter/postgresql/JsonStringAdapter.java b/src/main/java/com/iciql/adapter/postgresql/JsonStringAdapter.java index c4fbd6a..01d2834 100644 --- a/src/main/java/com/iciql/adapter/postgresql/JsonStringAdapter.java +++ b/src/main/java/com/iciql/adapter/postgresql/JsonStringAdapter.java @@ -20,12 +20,20 @@ import java.sql.SQLException; import org.postgresql.util.PGobject; import com.iciql.Iciql.DataTypeAdapter; +import com.iciql.Iciql.Mode; /** * Handles transforming raw strings to/from the Postgres JSON data type. */ public class JsonStringAdapter implements DataTypeAdapter<String> { + protected Mode mode; + + @Override + public void setMode(Mode mode) { + this.mode = mode; + } + @Override public String getDataType() { return "json"; diff --git a/src/main/java/com/iciql/adapter/postgresql/JsonbStringAdapter.java b/src/main/java/com/iciql/adapter/postgresql/JsonbStringAdapter.java index cc2d9c4..9d7388b 100644 --- a/src/main/java/com/iciql/adapter/postgresql/JsonbStringAdapter.java +++ b/src/main/java/com/iciql/adapter/postgresql/JsonbStringAdapter.java @@ -20,12 +20,20 @@ import java.sql.SQLException; import org.postgresql.util.PGobject; import com.iciql.Iciql.DataTypeAdapter; +import com.iciql.Iciql.Mode; /** * Handles transforming raw strings to/from the Postgres JSONB data type. */ public class JsonbStringAdapter implements DataTypeAdapter<String> { + protected Mode mode; + + @Override + public void setMode(Mode mode) { + this.mode = mode; + } + @Override public String getDataType() { return "jsonb"; diff --git a/src/main/java/com/iciql/adapter/postgresql/XmlStringAdapter.java b/src/main/java/com/iciql/adapter/postgresql/XmlStringAdapter.java index defe9f9..0aea77e 100644 --- a/src/main/java/com/iciql/adapter/postgresql/XmlStringAdapter.java +++ b/src/main/java/com/iciql/adapter/postgresql/XmlStringAdapter.java @@ -20,12 +20,20 @@ import java.sql.SQLException; import org.postgresql.util.PGobject; import com.iciql.Iciql.DataTypeAdapter; +import com.iciql.Iciql.Mode; /** * Handles transforming raw strings to/from the Postgres XML data type. */ public class XmlStringAdapter implements DataTypeAdapter<String> { + protected Mode mode; + + @Override + public void setMode(Mode mode) { + this.mode = mode; + } + @Override public String getDataType() { return "xml"; |