Search in sources :

Example 1 with WallTableStat

use of com.alibaba.druid.wall.WallTableStat in project druid by alibaba.

the class WallStatTest_drop_table method testPG.

public void testPG() throws Exception {
    WallProvider provider = new PGWallProvider();
    provider.getConfig().setDropTableAllow(true);
    Assert.assertTrue(provider.checkValid(sql));
    WallTableStat tableStat = provider.getTableStat("t");
    Assert.assertEquals(1, tableStat.getDropCount());
}
Also used : WallTableStat(com.alibaba.druid.wall.WallTableStat) WallProvider(com.alibaba.druid.wall.WallProvider) MySqlWallProvider(com.alibaba.druid.wall.spi.MySqlWallProvider) OracleWallProvider(com.alibaba.druid.wall.spi.OracleWallProvider) PGWallProvider(com.alibaba.druid.wall.spi.PGWallProvider) SQLServerWallProvider(com.alibaba.druid.wall.spi.SQLServerWallProvider) PGWallProvider(com.alibaba.druid.wall.spi.PGWallProvider)

Example 2 with WallTableStat

use of com.alibaba.druid.wall.WallTableStat in project druid by alibaba.

the class WallStatTest_drop_table method testOracle.

public void testOracle() throws Exception {
    WallProvider provider = new OracleWallProvider();
    provider.getConfig().setDropTableAllow(true);
    Assert.assertTrue(provider.checkValid(sql));
    WallTableStat tableStat = provider.getTableStat("t");
    Assert.assertEquals(1, tableStat.getDropCount());
}
Also used : WallTableStat(com.alibaba.druid.wall.WallTableStat) OracleWallProvider(com.alibaba.druid.wall.spi.OracleWallProvider) WallProvider(com.alibaba.druid.wall.WallProvider) MySqlWallProvider(com.alibaba.druid.wall.spi.MySqlWallProvider) OracleWallProvider(com.alibaba.druid.wall.spi.OracleWallProvider) PGWallProvider(com.alibaba.druid.wall.spi.PGWallProvider) SQLServerWallProvider(com.alibaba.druid.wall.spi.SQLServerWallProvider)

Example 3 with WallTableStat

use of com.alibaba.druid.wall.WallTableStat in project druid by alibaba.

the class WallStatTest_insert 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.getInsertCount());
}
Also used : WallTableStat(com.alibaba.druid.wall.WallTableStat) WallProvider(com.alibaba.druid.wall.WallProvider) MySqlWallProvider(com.alibaba.druid.wall.spi.MySqlWallProvider) OracleWallProvider(com.alibaba.druid.wall.spi.OracleWallProvider) PGWallProvider(com.alibaba.druid.wall.spi.PGWallProvider) SQLServerWallProvider(com.alibaba.druid.wall.spi.SQLServerWallProvider) MySqlWallProvider(com.alibaba.druid.wall.spi.MySqlWallProvider)

Example 4 with WallTableStat

use of com.alibaba.druid.wall.WallTableStat in project druid by alibaba.

the class WallStatTest_insert 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.getInsertCount());
}
Also used : WallTableStat(com.alibaba.druid.wall.WallTableStat) OracleWallProvider(com.alibaba.druid.wall.spi.OracleWallProvider) WallProvider(com.alibaba.druid.wall.WallProvider) MySqlWallProvider(com.alibaba.druid.wall.spi.MySqlWallProvider) OracleWallProvider(com.alibaba.druid.wall.spi.OracleWallProvider) PGWallProvider(com.alibaba.druid.wall.spi.PGWallProvider) SQLServerWallProvider(com.alibaba.druid.wall.spi.SQLServerWallProvider)

Example 5 with WallTableStat

use of com.alibaba.druid.wall.WallTableStat in project druid by alibaba.

the class WallStatTest_insert 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.getInsertCount());
}
Also used : WallTableStat(com.alibaba.druid.wall.WallTableStat) WallProvider(com.alibaba.druid.wall.WallProvider) MySqlWallProvider(com.alibaba.druid.wall.spi.MySqlWallProvider) OracleWallProvider(com.alibaba.druid.wall.spi.OracleWallProvider) PGWallProvider(com.alibaba.druid.wall.spi.PGWallProvider) SQLServerWallProvider(com.alibaba.druid.wall.spi.SQLServerWallProvider) PGWallProvider(com.alibaba.druid.wall.spi.PGWallProvider)

Aggregations

WallTableStat (com.alibaba.druid.wall.WallTableStat)42 MySqlWallProvider (com.alibaba.druid.wall.spi.MySqlWallProvider)42 WallProvider (com.alibaba.druid.wall.WallProvider)41 OracleWallProvider (com.alibaba.druid.wall.spi.OracleWallProvider)34 PGWallProvider (com.alibaba.druid.wall.spi.PGWallProvider)34 SQLServerWallProvider (com.alibaba.druid.wall.spi.SQLServerWallProvider)34 WallFunctionStat (com.alibaba.druid.wall.WallFunctionStat)1 WallProviderStatValue (com.alibaba.druid.wall.WallProviderStatValue)1 WallSqlStat (com.alibaba.druid.wall.WallSqlStat)1