Search in sources :

Example 1 with SQLServerWallProvider

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

the class WallStatTest_select_2 method testSQLServer.

public void testSQLServer() throws Exception {
    WallProvider provider = new SQLServerWallProvider();
    assertTrue(provider.checkValid(sql));
}
Also used : 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) SQLServerWallProvider(com.alibaba.druid.wall.spi.SQLServerWallProvider)

Example 2 with SQLServerWallProvider

use of com.alibaba.druid.wall.spi.SQLServerWallProvider 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());
}
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) SQLServerWallProvider(com.alibaba.druid.wall.spi.SQLServerWallProvider)

Example 3 with SQLServerWallProvider

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

the class WallStatTest_insert 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.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) SQLServerWallProvider(com.alibaba.druid.wall.spi.SQLServerWallProvider)

Example 4 with SQLServerWallProvider

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

the class WallStatTest_select_1 method testSQLServer.

public void testSQLServer() throws Exception {
    WallProvider provider = new SQLServerWallProvider();
    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) 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) SQLServerWallProvider(com.alibaba.druid.wall.spi.SQLServerWallProvider)

Example 5 with SQLServerWallProvider

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

the class WallStatTest_update 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.getUpdateCount());
}
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) SQLServerWallProvider(com.alibaba.druid.wall.spi.SQLServerWallProvider)

Aggregations

SQLServerWallProvider (com.alibaba.druid.wall.spi.SQLServerWallProvider)22 WallProvider (com.alibaba.druid.wall.WallProvider)21 MySqlWallProvider (com.alibaba.druid.wall.spi.MySqlWallProvider)10 OracleWallProvider (com.alibaba.druid.wall.spi.OracleWallProvider)9 PGWallProvider (com.alibaba.druid.wall.spi.PGWallProvider)9 WallTableStat (com.alibaba.druid.wall.WallTableStat)8