File tree Expand file tree Collapse file tree 4 files changed +40
-7
lines changed
src/main/java/net/sf/jsqlparser/statement/update Expand file tree Collapse file tree 4 files changed +40
-7
lines changed Original file line number Diff line number Diff line change 124
124
<phase >process-sources</phase >
125
125
</execution >
126
126
</executions >
127
+ <dependencies >
128
+ <dependency >
129
+ <groupId >net.sourceforge.pmd</groupId >
130
+ <artifactId >pmd-core</artifactId >
131
+ <version >${pmdVersion} </version >
132
+ </dependency >
133
+ <dependency >
134
+ <groupId >net.sourceforge.pmd</groupId >
135
+ <artifactId >pmd-java</artifactId >
136
+ <version >${pmdVersion} </version >
137
+ </dependency >
138
+ <dependency >
139
+ <groupId >net.sourceforge.pmd</groupId >
140
+ <artifactId >pmd-javascript</artifactId >
141
+ <version >${pmdVersion} </version >
142
+ </dependency >
143
+ <dependency >
144
+ <groupId >net.sourceforge.pmd</groupId >
145
+ <artifactId >pmd-jsp</artifactId >
146
+ <version >${pmdVersion} </version >
147
+ </dependency >
148
+ </dependencies >
127
149
</plugin >
128
150
<plugin >
129
151
<groupId >org.codehaus.mojo</groupId >
610
632
611
633
<properties >
612
634
<project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
635
+ <pmdVersion >6.36.0</pmdVersion >
613
636
</properties >
614
637
615
638
<description >JSqlParser parses an SQL statement and translate it into a hierarchy of Java classes.
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ under the License.
38
38
<!-- this little fellow will complain about PACKAGE based imports -->
39
39
<!-- <rule ref="category/java/bestpractices.xml/UnusedImports" /> -->
40
40
41
- <rule ref =" category/java/bestpractices.xml/UnusedFormalParameter" />
41
+ <!-- < rule ref="category/java/bestpractices.xml/UnusedFormalParameter" /> -- >
42
42
<rule ref =" category/java/bestpractices.xml/UnusedLocalVariable" />
43
43
<rule ref =" category/java/bestpractices.xml/UnusedPrivateField" />
44
44
<rule ref =" category/java/bestpractices.xml/UnusedPrivateMethod" />
Original file line number Diff line number Diff line change @@ -167,10 +167,11 @@ public Select getSelect() {
167
167
168
168
@ Deprecated
169
169
public void setSelect (Select select ) {
170
- if (select != null ) {
170
+ if (select != null ) {
171
171
SubSelect subSelect = new SubSelect ().withSelectBody (select .getSelectBody ());
172
- if (select .getWithItemsList () != null && select .getWithItemsList ().size () > 0 )
172
+ if (select .getWithItemsList () != null && select .getWithItemsList ().size () > 0 ) {
173
173
subSelect .setWithItemsList (select .getWithItemsList ());
174
+ }
174
175
175
176
if (updateSets .get (0 ).expressions .isEmpty ()) {
176
177
updateSets .get (0 ).expressions .add (subSelect );
@@ -192,11 +193,12 @@ public void setUseColumnsBrackets(boolean useColumnsBrackets) {
192
193
193
194
@ Deprecated
194
195
public boolean isUseSelect () {
195
- return ( updateSets .get (0 ).expressions .get (0 ) instanceof SubSelect ) ;
196
+ return updateSets .get (0 ).expressions .get (0 ) instanceof SubSelect ;
196
197
}
197
198
198
199
@ Deprecated
199
200
public void setUseSelect (boolean useSelect ) {
201
+ //todo
200
202
}
201
203
202
204
public void setOrderByElements (List <OrderByElement > orderByElements ) {
@@ -260,8 +262,8 @@ public String toString() {
260
262
}
261
263
b .append (" SET " );
262
264
263
- int j = 0 ;
264
- for (UpdateSet updateSet : updateSets ) {
265
+ int j = 0 ;
266
+ for (UpdateSet updateSet : updateSets ) {
265
267
if (j > 0 ) {
266
268
b .append (", " );
267
269
}
@@ -317,7 +319,6 @@ public String toString() {
317
319
// b.append(" = ");
318
320
// b.append("(").append(select).append(")");
319
321
// }
320
-
321
322
if (fromItem != null ) {
322
323
b .append (" FROM " ).append (fromItem );
323
324
if (joins != null ) {
Original file line number Diff line number Diff line change
1
+ /*-
2
+ * #%L
3
+ * JSQLParser library
4
+ * %%
5
+ * Copyright (C) 2004 - 2021 JSQLParser
6
+ * %%
7
+ * Dual licensed under GNU LGPL 2.1 or Apache License 2.0
8
+ * #L%
9
+ */
1
10
package net .sf .jsqlparser .statement .update ;
2
11
3
12
import net .sf .jsqlparser .expression .Expression ;
You can’t perform that action at this time.
0 commit comments