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
And any educational feedback you might have would be greatly appreciated! > After all I'm sure you have plenty of free time to donate! :D > > So the approach you mentioned of adding a new variant to execute() that adds > a metaClosure would be perfect, though I've reall

RE: SQL enhancement request (GROOVY-11342)

2024-03-27 Thread steve.etchelecu
though I've really gotten comfortable with the rows() method - not sure how it scales when resultSets go to billions of rows though... I expect execute() would perform like a streaming interface and not have any problems at scale. Thanks for all your help, couldn't have made it this f

RE: SQL enhancement request

2024-03-25 Thread steve.etchelecu
erience for me though. Thanks, Steve -Original Message- From: Paul King Sent: Monday, March 25, 2024 8:03 PM To: users@groovy.apache.org Subject: Re: SQL enhancement request Adding a metaClosure to execute seems the easiest change. I created GROOVY-11342 to track here: https://issues.ap

Re: SQL enhancement request

2024-03-25 Thread Paul King
s" (eachRow, > rows, and execute) so that they all have a variant with a metaClosure and/or > a two-parameter processResults closure. > > Thanks, > Steve > > -Original Message- > From: Jörg Prante > Sent: Friday, March 22, 2024 12:03 PM > To:

RE: SQL enhancement request

2024-03-22 Thread steve.etchelecu
Sent: Friday, March 22, 2024 12:03 PM To: users@groovy.apache.org Subject: Re: SQL enhancement request Hi Steve, just use this Sql.execute method https://docs.groovy-lang.org/latest/html/api/groovy/sql/Sql.html#execute(java.lang.String,groovy.lang.Closure) to send arbitrary statements and decid

Re: SQL enhancement request

2024-03-22 Thread Jörg Prante
Hi Steve, just use this Sql.execute method https://docs.groovy-lang.org/latest/html/api/groovy/sql/Sql.html#execute(java.lang.String,groovy.lang.Closure) to send arbitrary statements and decide by the isResultSet flag in the closure whether you have to obtain a result set from a select query, or

Re: SQL enhancement request

2024-03-21 Thread Blake McBride
Greetings, As sort of a side note, you may want to take a look at my Kiss open-source, full-stack web development framework. It includes a super easy to use SQL API that is accessible from Groovy. This API is currently being used in several large-scale, enterprise, production systems. kissweb.o

SQL enhancement request

2024-03-21 Thread steve.etchelecu
Groovy team, It is my understanding (which can always be improved!) that Groovy SQL supports about 3 “families” of interaction methods – execute() and its variants, rows() and eachRow() for submitting SQL statements and processing any results generated. Each of them has a variety of sign