Skip to content

Commit f32be51

Browse files
committed
like just works
1 parent 71986ac commit f32be51

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

mug-guava/src/main/java/com/google/mu/safesql/SafeSql.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,12 @@
274274
* SELECT name FROM Users WHERE name LIKE '%{term}%' ESCAPE '\'
275275
* }</pre>
276276
*
277-
* <p>...will be rejected, because SafeSql already performs all necessary escaping internally.
278-
* This eliminates the need for developers to deal with brittle double-escaping
279-
* (like {@code '\\'}), improves readability, and avoids cross-database compatibility issues.
277+
* <p>...will be rejected, because SafeSql already performs all necessary escaping internally
278+
* and automatically uses {@code ESCAPE '^'}. In other words, LIKE <em>just works</em>.
279+
*
280+
* <p>This eliminates the need for developers to deal with brittle double-escaping
281+
* (like {@code '\\'}), or any cross-dialect compatibility issues.
282+
* The template is also more readable.
280283
*
281284
* <p>If you find yourself wanting to use {@code ESCAPE}, consider whether you are
282285
* manually escaping strings that could instead be safely passed as-is to SafeSql's

0 commit comments

Comments
 (0)