Re: SQL enhancement request (GROOVY-11342)

2024-03-31 Thread Paul King
On Sat, Mar 30, 2024 at 6:21 AM wrote: > Do you have any thoughts around when this enhancement might come out in a > release? Probably in the next couple of weeks pending feedback. Paul.

RE: SQL enhancement request (GROOVY-11342)

2024-03-29 Thread steve.etchelecu
: Re: SQL enhancement request (GROOVY-11342) That would be eachRowWithIndex, which would imho be nice to have here, as well as for collect (i.e. collectWithIndex)... ;-) Cheers, mg On 29/03/2024 19:17, steve.etchel...@gmail.com <mailto:steve.etchel...@gmail.com> wrote: Basically ther

Re: SQL enhancement request (GROOVY-11342)

2024-03-29 Thread MG
That would be eachRowWithIndex, which would imho be nice to have here, as well as for collect (i.e. collectWithIndex)... ;-) Cheers, mg On 29/03/2024 19:17, steve.etchel...@gmail.com wrote: Basically there's no way to get eachRow() to provide a counter...

RE: SQL enhancement request (GROOVY-11342)

2024-03-29 Thread steve.etchelecu
Message- From: steve.etchel...@gmail.com Sent: Friday, March 29, 2024 1:17 PM To: users@groovy.apache.org Subject: RE: SQL enhancement request (GROOVY-11342) Thanks Paul! I thought that eachrow iteration issue had something to do with eachRow() possibly not returning a List but when I saw it

RE: SQL enhancement request (GROOVY-11342)

2024-03-29 Thread steve.etchelecu
${row[colid]}' ... } rowid++ } Thanks, Steve -----Original Message----- From: Paul King Sent: Thursday, March 28, 2024 9:05 PM To: users@groovy.apache.org Subject: Re: SQL enhancement request (GROOVY-11342) Well spotted for eachRow. You can fix that with:

Re: SQL enhancement request (GROOVY-11342)

2024-03-28 Thread Paul King
rom earlier Oracle/Teradata/SQLServer/MySQL > environments and have basically found Denodo to be a plug-n-play drop-in > replacement for their earlier databases. > > I was happy to see that apparently I understood how to handle the two closure > calls correctly! And you didn't

RE: SQL enhancement request (GROOVY-11342)

2024-03-28 Thread steve.etchelecu
to) throw up when you saw my metaClosure definition with its three parallel lists! If there's a better/groovier way to accomplish what I'm doing in that closure I'm open to learning. :) Apologies for the lengthy email and thanks again, Steve -Original Message- Fro

Re: SQL enhancement request (GROOVY-11342)

2024-03-28 Thread Paul King
Here is the result of running a slightly modified version of your script (I attached it to the issue) after applying the PR I just created: > groovy SqlExamples2.groovy execute --- main(): SQL: CREATE TABLE MYTABLE (COL1 integer, COL2 integer) --- execute() [no metadata available]: successful exec

RE: SQL enhancement request (GROOVY-11342)

2024-03-27 Thread steve.etchelecu
Paul, I created that example (attached) attempting to illustrate my situation with the various (3 anyway) Sql methods. Hopefully my code makes some sense, happy to answer any questions that it raises. :) Running the example with 'execute' which does not provide metadata but does handle SQL th