use of com.alibaba.druid.wall.WallConfig in project druid by alibaba.
the class MySqlWallTest25 method test_true_2.
public void test_true_2() throws Exception {
WallConfig config = new WallConfig();
config.setUpdateWhereNoneCheck(true);
Assert.assertTrue(//
WallUtils.isValidateMySql("update test.dml_health_check set id=? limit ?", //
config));
}
use of com.alibaba.druid.wall.WallConfig in project druid by alibaba.
the class MySqlWallTest33 method test_true.
public void test_true() throws Exception {
WallConfig config = new WallConfig();
config.setStrictSyntaxCheck(false);
Assert.assertTrue(//
WallUtils.isValidateMySql("DELETE FROM lhwdesign_data WHERE data_id IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?", //
config));
}
use of com.alibaba.druid.wall.WallConfig in project tesla by linking12.
the class DruidDBConfig method getProxyFilters.
private List<Filter> getProxyFilters() {
List<Filter> proxyFilters = Lists.newArrayList();
WallConfig wallConfig = new WallConfig();
wallConfig.setDir("");
wallConfig.setCommentAllow(true);
wallConfig.init();
WallFilter wallFilter = new WallFilter();
wallFilter.setDbType("mysql");
wallFilter.setConfig(wallConfig);
proxyFilters.add(wallFilter);
return proxyFilters;
}
Aggregations