Skip to content

Commit 376f283

Browse files
toverdijkmp911de
authored andcommitted
Fixed falsely rejecting non-parameterized queries in PostgresqlBatch.java
[#468]
1 parent 4d37910 commit 376f283

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/io/r2dbc/postgresql/PostgresqlBatch.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ final class PostgresqlBatch implements io.r2dbc.postgresql.api.PostgresqlBatch {
4141
public PostgresqlBatch add(String sql) {
4242
Assert.requireNonNull(sql, "sql must not be null");
4343

44-
if (!(BasicPostgresqlSqlLexer.tokenize(sql).getParameterCount() > 0)) {
44+
if (!(BasicPostgresqlSqlLexer.tokenize(sql).getParameterCount() == 0)) {
4545
throw new IllegalArgumentException(String.format("Statement '%s' is not supported. This is often due to the presence of parameters.", sql));
4646
}
4747

0 commit comments

Comments
 (0)