4 ms·
Most SQL libraries handle this all for you? You really don't have to do any of that. It's perfectly fine to just 'know' that the data is going to be an int and
by mattmanser 6y ago
Most SQL libraries handle this all for you? You really don't have to do any of that.
It's perfectly fine to just 'know' that the data is going to be an int and just do `var id = rs.getInt(id")`.
I'm on my phone so it's too fiddly to write my own brief example, but if you get rid of the silly comments in this you'll see you can do it all in a few lines, just very boilerplate lines:
https://thedeveloperblog.com/sqlconnection https://thedeveloperblog.com/sqlconnection