While(qr.next()) will loop all the records one by one. So, get method will get only one whole data at a time. You won't get all the table data in a single go. Thats the reason why you are using QueryRun to pass the query to it and loop the output of query line by line.
Hi, get method will not store entire data in a table data but only one record, it will fetch the current (one) table record fulfulling query creteria. The specified code will run for all valid records. Suppose there are 10 records in query, your code will run 10 times and get method will fetch each record. Every time, custTable table buffer will be overrided by new table record. This approach is used to iterate all records and perform some operations on that records, one by one. Hope this helps.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.