Given this java code...
PreparedStatement s = prepare("SELECT ...")
ResultSet r = s.executeQuery()
r.next()
s = prepare("UPDATE ...")
s.setInt(1, r.getInt(3))
s.setInt(2, r.getInt(1))
s.executeUpdate()
s = prepare("UPDATE ...")
s.setInt(1, r.getInt(3))
s.setInt(2, r.getInt(2))
s.executeUpdate()
It seems to me that MySQL JDBC would have to do ...intValue()
and new Integer(..)
. Does anybody know if the above code would perform better if I used setObject
/getObject
instead. What about any other types?
I expect to be using JDBC for years to come so I thought I might as well stop guessing.