I'm in the process of converting a Groovy script that updated a document from a MongoDB and saved it into MongoDB using the save method doc.save()
.
Now I want to use a SQL database using groovy.sql on the Crate Database but cannot use the ResultSet.CONCUR_UPDATABLE
trick as mentioned in Question Updating SQL from object with groovy from 2013 (Crate does not support it).
Is there another "Groovy" way of storing an updated row (from a single table) into an SQL database? What I'm looking for is something like row.update()
or an algorithm that constructs an UPDATE
sql command from a GroovyRowResult
or Map
.