[ 
https://issues.apache.org/jira/browse/CSV-313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17888459#comment-17888459
 ] 

Gary D. Gregory edited comment on CSV-313 at 10/10/24 10:21 PM:
----------------------------------------------------------------

Please use {{CSVPrinter.getRecordCount()}}

In git master and snapshot builds for version 1.13.0-SNAPSHOT in 
https://repository.apache.org/content/repositories/snapshots/




was (Author: garydgregory):
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.13.0
>
>         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)

Reply via email to