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)"
results in 2 roundtrips (as visible in Wireshark):
* The INSERT statement, with the bind variables
* A subsequent SELECT firstname,lastname FROM Author
Is Groovy generating this second statement, or is it the JDBC driver? And why?
BTW: I suspect there is a where clause on the select, but I do not see it in
the wireshark capture.