[
https://issues.apache.org/jira/browse/CSV-313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary D. Gregory resolved CSV-313.
---------------------------------
Fix Version/s: 1.12.1
Assignee: Gary D. Gregory
Resolution: Fixed
Please use {{CSVPrinter.getRecordCount()}}
In git master and snapshot builds in
https://repository.apache.org/content/repositories/snapshots/
> Add CSVPrinter.getRecordCount()
> -------------------------------
>
> Key: CSV-313
> URL: https://issues.apache.org/jira/browse/CSV-313
> Project: Commons CSV
> Issue Type: New Feature
> Components: Printer
> Reporter: Mikhail T.
> Assignee: Gary D. Gregory
> Priority: Major
> Fix For: 1.12.1
>
> Attachments: printRecords.patch.txt
>
>
> The {{printRecords(ResultSet)}} variant is very convenient for outputting
> _all_ of a query's results in a single line of code.
> Unfortunately, this provides no way to obtain the number of records printed.
> See [this StackOverflow
> question|https://stackoverflow.com/questions/79071049/], for example.
> A forward-only result-set is "done" after the method returns...
> The simplest way to address this shortcoming would be for the
> {{printRecords()}} to start returning a {{long}} (for lack of {{{}size_t{}}})
> instead of {{{}void{}}}, indicating the number of records printed.
> This seems like an easy fix, for certainly the number of output rows is
> _known_ inside the method...
--
This message was sent by Atlassian Jira
(v8.20.10#820010)