Your question has an incorrect assumption. sqlline does not call
Object.toString() on the value. It calls ResultSet.getString(int) on
the column. There is a lot of difference, especially in dateTime
scenarios. Consider TIMESTAMP. SQL TIMESTAMP values do not contain a
time zone, but java.sql.Timestamp values are implicitly based on the
UTC epoch and are printed in the local timezone. Thus,
rs.getObject(i).toString() or rs.getTimestamp(i).toString() will
produce a different string than rs.getString(i).
That said, being able to choose formats for particular columns or
particular data types would be really useful.
Maybe we could do something similar to SQL*Plus: you can associate a
formatter with a particular column alias using the COLUMN command[1].
Julian
[1]
https://docs.oracle.com/cd/B19306_01/server.102/b14357/ch6.htm
> --
> You received this message because you are subscribed to the Google Groups
> "sqlline-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
sqlline-dev...@googlegroups.com.
> To post to this group, send email to
sqlli...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/sqlline-dev/5a887ffe-b3aa-462b-be7c-f3948a70dbea%40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.