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
I would like to store an array in a column of my TAP_SCHEMA, but since my DBMS (SQLServer) does not support this feature, I was thinking about saving it as a comma separated string.
Is it possible to tell vollt to convert the string into an array. I was looking at the JDBCTranslator, but it doesn't seem like the method convertTypeFromDB is exactly what I need.
The text was updated successfully, but these errors were encountered:
Indeed, this function just converts the name of the type ; it does not convert a column value. But you may still need to tell JDBCTranslator about the conversion from string (DBMS/SQL) into array (TAP/ADQL).
Anyway, the right place to look at is: tap.data.ResultSetTableIterator.formatColValue(...)
You will have to extend this class and overwrite this function to also include your conversion. Of couse, this operation will have to be done only for columns you marked (somehow) as tables.
Then, you'll have to extend tap.db.JDBCConnection and overwrite createTableIterator(...) so that it returns an instance of your extended ResultSetTableIterator.
The final step is to tell your TAPFactory to return your extended JDBCConnection ; overwrite the function getConnection(...) of your TAPFactory. If you are using the configuration file, you will have to extend ConfigurableTAPFactory and give its path in your configuration file.
Sorry that it can not be easier to do. In a future release I intend to support arrays in some way (see #82 and #81 ). Your idea is interresting ; I think it could be included in VOLLT.
I would like to store an array in a column of my TAP_SCHEMA, but since my DBMS (SQLServer) does not support this feature, I was thinking about saving it as a comma separated string.
Is it possible to tell vollt to convert the string into an array. I was looking at the
JDBCTranslator
, but it doesn't seem like the methodconvertTypeFromDB
is exactly what I need.The text was updated successfully, but these errors were encountered: