Skip to content

Commit 4b808a4

Browse files
committed
fix: update query
1 parent 2af2c97 commit 4b808a4

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

.DS_Store

0 Bytes
Binary file not shown.

src/main/java/com/code/advancedsql/query/Update.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public String toQuery() {
5151

5252
for (int i = 0; i < this.fields.size(); i++) query.append(this.fields.size() == 1 ? "SET " + this.fields.get(i) + " = ? " : (i == 0 ? "SET " + this.fields.get(i) + " = ?, " : (i != this.fields.size() - 1 ? this.fields.get(i) + " = ?, " : this.fields.get(i) + " = ?")));
5353

54-
query.append(this.where != null ? "WHERE " + this.where : "");
54+
query.append(this.where != null ? " WHERE " + this.where : "");
5555

5656
query.append(this.limit > 0 ? " LIMIT " + this.limit : "");
5757

0 commit comments

Comments
 (0)