Skip to content

Commit b71fa17

Browse files
committed
document nonNegativeLiteral() about OFFSET-FETCH
1 parent 7d10730 commit b71fa17

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,8 @@ public static SafeSql of(@TemplateString @CompileTimeConstant String template, O
448448
* <p>Needed because the SQL Server JDBC driver doesn't support parameterizing the TOP number
449449
* through {@link PreparedStatement} API.
450450
*
451+
* <p>Although, you should generally use the OFFSET-FETCH syntax, which supports parameterization.
452+
*
451453
* @throws IllegalArgumentException if {@code number} is negative
452454
*/
453455
public static SafeSql nonNegativeLiteral(int number) {
@@ -1144,7 +1146,7 @@ void writePlaceholder(Substring.Match placeholder, Object value) {
11441146
}
11451147
checkArgument(
11461148
value instanceof Boolean,
1147-
"boolean placeholder {%s->} can only be used with a boolean or Optional value; %s encountered.",
1149+
"conditional placeholder {%s->} can only be used with a boolean or Optional value; %s encountered.",
11481150
conditional.before(),
11491151
value.getClass().getName());
11501152
builder.appendSql(texts.pop());

0 commit comments

Comments
 (0)