File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
mug-guava/src/main/java/com/google/mu/safesql Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 8888 * WHERE firstName = {first_name} AND lastName IN ({last_names})
8989 * """,
9090 * firstName, lastNamesList);
91- * List<Long> ids = sql.query(connection, row -> row.getLong("id") );
91+ * List<Long> ids = sql.query(connection, Long.class );
9292 * }</pre>
9393 *
9494 * In the above example if {@code firstName} is "Emma" and {@code lastNamesList} is
262262 * String searchTerm = ...;
263263 * SafeSql sql = SafeSql.of(
264264 * "SELECT id FROM Users WHERE firstName LIKE '%{search_term}%'", searchTerm);
265- * List<Long> ids = sql.query(connection, row -> row.getLong("id") );
265+ * List<Long> ids = sql.query(connection, Long.class );
266266 * }</pre>
267267 *
268268 * <p><strong>Automatic Escaping: No Need for ESCAPE Clause</strong></p>
@@ -371,7 +371,7 @@ private SafeSql(String sql, List<?> paramValues) {
371371 * List<Long> jobIds = SafeSql.of(
372372 * "SELECT id FROM Jobs WHERE timestamp BETWEEN {start} AND {end}",
373373 * startTime, endTime)
374- * .query(connection, row -> row.getLong("id") );
374+ * .query(connection, Long.class );
375375 * }</pre>
376376 *
377377 * <p>Note that if you plan to create a {@link PreparedStatement} and use it multiple times
You can’t perform that action at this time.
0 commit comments