You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is my know-how :) represent array as XML string and pass as CLOB parameter
Your SQL code must expect XML - most of databases have XML-to-TABLE functions
The text was updated successfully, but these errors were encountered:
I'm not sure this needs to be built in to sql2o. I think people who want this could add a custom converter like this:
public class ArrayXmlConverter implements Converter<byte[]> {
public byte[] convert(Object val) throws ConverterException {
// get XML from Clob and return byte[]
}
public Object toDatabaseParam(byte[] val) {
// convert to XML string and return Clob
}
}
The current NamedParameterStatement doesn't support setClob() directly, but setObject may work for a java.sql.Clob, I'm not sure
Yes, this can be done via extension
In my closed-source ORM I use ParamSetter interface. ParamSetterFactory is provided by Quirks since different Databases and JDBC drivers works different (Timestamp for DB2 is a good example)
this is my know-how :) represent array as XML string and pass as CLOB parameter
Your SQL code must expect XML - most of databases have XML-to-TABLE functions
The text was updated successfully, but these errors were encountered: