Revert "Revert "improve sqlwall: update""

This commit is contained in:
Yako
2014-09-04 13:51:14 +08:00
parent b3d373496a
commit 03f5788268
9 changed files with 233 additions and 2 deletions
@@ -119,6 +119,9 @@ public class WallConfig implements WallConfigMBean {
private boolean conditionOpBitwseAllow = true;
private boolean caseConditionConstAllow = false;
private boolean completeInsertValuesCheck = false;
private int insertValuesCheckSize = 3;
public WallConfig(){
@@ -770,4 +773,20 @@ public class WallConfig implements WallConfigMBean {
this.startTransactionAllow = startTransactionAllow;
}
public boolean isCompleteInsertValuesCheck() {
return completeInsertValuesCheck;
}
public void setCompleteInsertValuesCheck(boolean completeInsertValuesCheck) {
this.completeInsertValuesCheck = completeInsertValuesCheck;
}
public int getInsertValuesCheckSize() {
return insertValuesCheckSize;
}
public void setInsertValuesCheckSize(int insertValuesCheckSize) {
this.insertValuesCheckSize = insertValuesCheckSize;
}
}
@@ -611,7 +611,11 @@ public abstract class WallProvider {
if (!config.isCommentAllow()) {
parser.getLexer().setAllowComment(false); // deny comment
}
if (!config.isCompleteInsertValuesCheck()) {
parser.setParseCompleteValues(false);
parser.setParseValuesSize(config.getInsertValuesCheckSize());
}
parser.parseStatementList(statementList);
final Token lastToken = parser.getLexer().token();