use of com.alibaba.druid.wall.spi.SQLServerWallProvider in project druid by alibaba.
the class WallStatTest_drop_table method testSQLServer.
public void testSQLServer() throws Exception {
WallProvider provider = new SQLServerWallProvider();
provider.getConfig().setDropTableAllow(true);
Assert.assertTrue(provider.checkValid(sql));
WallTableStat tableStat = provider.getTableStat("t");
Assert.assertEquals(1, tableStat.getDropCount());
}
use of com.alibaba.druid.wall.spi.SQLServerWallProvider in project druid by alibaba.
the class WallStatTest_delete method testSQLServer.
public void testSQLServer() throws Exception {
WallProvider provider = new SQLServerWallProvider();
Assert.assertTrue(provider.checkValid(sql));
WallTableStat tableStat = provider.getTableStat("t");
Assert.assertEquals(1, tableStat.getDeleteCount());
}
use of com.alibaba.druid.wall.spi.SQLServerWallProvider in project druid by alibaba.
the class WallStatTest_select method testSQLServer.
public void testSQLServer() throws Exception {
WallProvider provider = new SQLServerWallProvider();
Assert.assertTrue(provider.checkValid(sql));
WallTableStat tableStat = provider.getTableStat("t");
Assert.assertEquals(1, tableStat.getSelectCount());
}
use of com.alibaba.druid.wall.spi.SQLServerWallProvider in project druid by alibaba.
the class WallStatTest_select_into method testSQLServer.
public void testSQLServer() throws Exception {
WallProvider provider = new SQLServerWallProvider();
Assert.assertTrue(provider.checkValid(sql));
WallTableStat tableStat = provider.getTableStat("t");
Assert.assertEquals(1, tableStat.getSelectCount());
}
use of com.alibaba.druid.wall.spi.SQLServerWallProvider in project druid by alibaba.
the class SQLServerWallTest_4 method test_true.
public void test_true() throws Exception {
WallProvider provider = new SQLServerWallProvider();
provider.getConfig().setSelectHavingAlwayTrueCheck(true);
Assert.assertTrue(//
provider.checkValid("insert into t (fid, name) values (1, HOST_NAME())"));
Assert.assertEquals(1, provider.getTableStats().size());
Assert.assertTrue(provider.getTableStats().containsKey("t"));
}
Aggregations