AhmedYoussef98 commented on issue #1017:
URL: https://github.com/apache/fesod/issues/1017#issuecomment-5316627126

   I'd like to work on the `java.sql.Clob` converter (still unassigned in the 
task list).
   
   Proposed approach, following the existing `String` converter family 
(`StringStringConverter`, `StringNumberConverter`) under a new 
`org.apache.fesod.sheet.converters.clob` package:
   
   - **`ClobStringConverter`** (bidirectional, Excel `STRING` cell)
     - **Read**: builds a `java.sql.Clob` from the cell's string value via 
`javax.sql.rowset.serial.SerialClob` (JDK 8 compatible, no external deps), i.e. 
`new SerialClob(cellData.getStringValue().toCharArray())`.
     - **Write**: extracts the full contents with `clob.getSubString(1, (int) 
clob.length())` and wraps it in a `WriteCellData<>(...)`, matching 
`StringStringConverter`'s write path.
   
   Registration: add to `DefaultConverterLoader.initAllConverter()` (as the 
`String`-keyed converters are), keyed on `Clob.class` / 
`CellDataTypeEnum.STRING`.
   
   Tests: add a `ClobConverterTest` under `org.apache.fesod.sheet.converter` 
(same location as `StringPathnameImageConverterTest`/`CustomConverterTest`), 
covering `supportJavaTypeKey`/`supportExcelTypeKey`, round-trip read/write, and 
an empty-string edge case. `SQLException` from `SerialClob` construction will 
propagate per the `Converter` interface's `throws Exception` contract.
   
   Scope is limited to this one converter — happy to take another (e.g. 
`java.sql.Clob`'s counterpart on read-only numeric/boolean cells) as a 
follow-up if useful. Will link this issue in the PR per the contribution guide.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to