private static int querySingleInteger ( Connection connection , String sql , String [ ] args , boolean allowEmptyResults ) { int result = 0 ; Object value = querySingleResult ( connection , sql , args , 0 , GeoPackageDataType . MEDIUMINT ) ; if ( value != null ) { result = ( ( Number ) value ) . intValue ( ) ; } else if ( ! allowEmptyResults ) { throw new GeoPackageException ( "Failed to query for single result. SQL: " + sql ) ; } return result ; }
Query the SQL for a single integer result