Skip to content

Tag: google-cloud-spanner

Cloud Spanner ResultSet Get Length

I have the following piece of code: Problem: I want to use the see if resultSet has strictly a length of 1. Attempt at solution: resultSet.getStats().getRowCountExact() == 1 But: ResultSetStats getStats() returns the ResultSetStats for the query only if the query was executed in either the PLAN or the PROFILE…