代码优化
This commit is contained in:
parent
cc290474c7
commit
8a2d30d2b0
@ -5,6 +5,7 @@ import org.ssssssss.script.annotation.Comment;
|
||||
import org.ssssssss.script.functions.StreamExtension;
|
||||
import org.ssssssss.script.runtime.RuntimeContext;
|
||||
|
||||
import java.beans.Transient;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
|
||||
@ -417,12 +418,14 @@ public class Where {
|
||||
return namedTable.exists(runtimeContext);
|
||||
}
|
||||
|
||||
void appendAnd() {
|
||||
@Transient
|
||||
public void appendAnd() {
|
||||
remove();
|
||||
tokens.add("and");
|
||||
}
|
||||
|
||||
void appendOr() {
|
||||
@Transient
|
||||
public void appendOr() {
|
||||
remove();
|
||||
tokens.add("or");
|
||||
}
|
||||
@ -457,10 +460,17 @@ public class Where {
|
||||
return tokens.isEmpty();
|
||||
}
|
||||
|
||||
void append(String value) {
|
||||
@Transient
|
||||
public void append(String value) {
|
||||
tokens.add(value);
|
||||
}
|
||||
|
||||
@Transient
|
||||
public void append(String sql, Object value) {
|
||||
tokens.add(sql);
|
||||
params.add(value);
|
||||
}
|
||||
|
||||
String getSql() {
|
||||
remove();
|
||||
if (isEmpty()) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user