use of com.alibaba.druid.wall.WallTableStat in project druid by alibaba.
the class WallStatTest_create_table method testSQLServer.
public void testSQLServer() throws Exception {
WallProvider provider = new SQLServerWallProvider();
provider.getConfig().setCreateTableAllow(true);
Assert.assertTrue(provider.checkValid(sql));
WallTableStat tableStat = provider.getTableStat("t");
Assert.assertEquals(1, tableStat.getCreateCount());
}
use of com.alibaba.druid.wall.WallTableStat in project druid by alibaba.
the class WallStatTest_delete method testPG.
public void testPG() throws Exception {
WallProvider provider = new PGWallProvider();
Assert.assertTrue(provider.checkValid(sql));
WallTableStat tableStat = provider.getTableStat("t");
Assert.assertEquals(1, tableStat.getDeleteCount());
}
use of com.alibaba.druid.wall.WallTableStat in project druid by alibaba.
the class WallStatTest_delete method testMySql.
public void testMySql() throws Exception {
WallProvider provider = new MySqlWallProvider();
Assert.assertTrue(provider.checkValid(sql));
WallTableStat tableStat = provider.getTableStat("t");
Assert.assertEquals(1, tableStat.getDeleteCount());
}
use of com.alibaba.druid.wall.WallTableStat in project druid by alibaba.
the class WallStatTest_drop_table method testMySql.
public void testMySql() throws Exception {
WallProvider provider = new MySqlWallProvider();
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.WallTableStat in project druid by alibaba.
the class WallStatTest_select_into method testOracle.
public void testOracle() throws Exception {
WallProvider provider = new OracleWallProvider();
Assert.assertTrue(provider.checkValid(sql));
WallTableStat tableStat = provider.getTableStat("t");
Assert.assertEquals(1, tableStat.getSelectCount());
}
Aggregations