Search in sources :

Example 11 with OracleWallProvider

use of com.alibaba.druid.wall.spi.OracleWallProvider in project druid by alibaba.

the class WallStatTest_delete 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.getDeleteCount());
}
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 12 with OracleWallProvider

use of com.alibaba.druid.wall.spi.OracleWallProvider in project druid by alibaba.

the class WallStatTest_select 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());
}
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 13 with OracleWallProvider

use of com.alibaba.druid.wall.spi.OracleWallProvider in project druid by alibaba.

the class WallStatTest_select_1 method testOracle.

public void testOracle() throws Exception {
    WallProvider provider = new OracleWallProvider();
    Assert.assertTrue(provider.checkValid(sql));
    {
        WallTableStat tableStat = provider.getTableStat("lhwbbs_posts_reply");
        Assert.assertEquals(1, tableStat.getSelectCount());
    }
    {
        WallTableStat tableStat = provider.getTableStat("lhwbbs_posts");
        Assert.assertEquals(1, tableStat.getSelectCount());
    }
}
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 14 with OracleWallProvider

use of com.alibaba.druid.wall.spi.OracleWallProvider in project druid by alibaba.

the class WallCommentTest method testORACLE.

public void testORACLE() throws Exception {
    String sql = "SELECT F1, F2 FROM ABC --test";
    OracleWallProvider provider = new OracleWallProvider();
    Assert.assertFalse(provider.checkValid(sql));
    Assert.assertEquals(1, provider.getCommentDenyStat().getDenyCount());
}
Also used : OracleWallProvider(com.alibaba.druid.wall.spi.OracleWallProvider)

Aggregations

OracleWallProvider (com.alibaba.druid.wall.spi.OracleWallProvider)14 MySqlWallProvider (com.alibaba.druid.wall.spi.MySqlWallProvider)10 PGWallProvider (com.alibaba.druid.wall.spi.PGWallProvider)10 SQLServerWallProvider (com.alibaba.druid.wall.spi.SQLServerWallProvider)10 WallProvider (com.alibaba.druid.wall.WallProvider)9 WallTableStat (com.alibaba.druid.wall.WallTableStat)9 DB2WallProvider (com.alibaba.druid.wall.spi.DB2WallProvider)1