A statement such as:
String qry = "INSERT INTO Author (firstname, lastname) VALUES ('$name',
'$name')"
sql.execute qry
results in one database roundtrip, as one would expect.
Using bind variables such as this:
sql.execute "INSERT INTO Author (firstname, lastname) VALUES ($fname, $lname)"
result
What Daniel said is correct. Also if there was an accessible getSize()
method, you could use just ".size".
Cheers, Paul.
On Sat, Aug 1, 2020 at 11:19 AM Daniel Sun wrote:
>
> The parentheses of methods without parameters could not be ommitted.
>
> `[1, 2, 3].size` is accessing the private field
The parentheses of methods without parameters could not be ommitted.
`[1, 2, 3].size` is accessing the private field `size` of `ArrayList`, so
illegal reflective access warning will be thrown.
Cheers,
Daniel Sun
On 2020/08/01 00:49:54, paul wrote:
> Hi all,
>
> (on latest groovy 3.0.5 and O
Hi all,
(on latest groovy 3.0.5 and OpenJDK 14) omitting the empty parentheses to the
.size() call works, but throws an illegal reflective access warning:
```
groovy:000> [1,2,3].size
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by
org.codehau