olavloite / spanner-jdbc

JDBC Driver for Google Cloud Spanner
MIT License
38 stars 10 forks source link

#75 execute query directly #102

Closed olavloite closed 5 years ago

olavloite commented 5 years ago

Queries were not actually sent to Cloud Spanner when the execute(...) or executeQuery(...) methods were called. Instead, the query would be sent to Cloud Spanner the first time the ResultSet#next() method was called, as this is the standard behavior of the underlying Cloud Spanner Java client library. This also meant that an invalid query would not throw an exception when the execute(...) method was called, but would throw an exception when the ResultSet#next() method was called. This is counter intuitive to what would be expected from a JDBC driver.