Package com.alibaba.druid.wall.spi

Examples of com.alibaba.druid.wall.spi.OracleWallProvider.checkValid()


    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());
    }

    public void testPG() throws Exception {
View Full Code Here


        return provider.checkValid(sql);
    }

    public static boolean isValidateOracle(String sql) {
        OracleWallProvider provider = new OracleWallProvider();
        return provider.checkValid(sql);
    }

    public static boolean isValidateOracle(String sql, WallConfig config) {
        OracleWallProvider provider = new OracleWallProvider(config);
        return provider.checkValid(sql);
View Full Code Here

        return provider.checkValid(sql);
    }

    public static boolean isValidateOracle(String sql, WallConfig config) {
        OracleWallProvider provider = new OracleWallProvider(config);
        return provider.checkValid(sql);
    }
   
    public static boolean isValidateSqlServer(String sql) {
        SQLServerProvider provider = new SQLServerProvider();
        return provider.checkValid(sql);
View Full Code Here

        return provider.checkValid(sql);
    }

    public static boolean isValidateOracle(String sql) {
        OracleWallProvider provider = new OracleWallProvider();
        return provider.checkValid(sql);
    }

    public static boolean isValidateOracle(String sql, WallConfig config) {
        OracleWallProvider provider = new OracleWallProvider(config);
        return provider.checkValid(sql);
View Full Code Here

        return provider.checkValid(sql);
    }

    public static boolean isValidateOracle(String sql, WallConfig config) {
        OracleWallProvider provider = new OracleWallProvider(config);
        return provider.checkValid(sql);
    }
   
    public static boolean isValidateSqlServer(String sql) {
        SQLServerProvider provider = new SQLServerProvider();
        return provider.checkValid(sql);
View Full Code Here

    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());
    }
   
    public void testmysql() throws Exception {
View Full Code Here

        Assert.assertEquals(1, tableStat.getSelectCount());
    }

    public void testOracle() throws Exception {
        WallProvider provider = new OracleWallProvider();
        Assert.assertTrue(provider.checkValid(sql));
        WallTableStat tableStat = provider.getTableStat("t");
        Assert.assertEquals(1, tableStat.getSelectCount());
    }

    public void testPG() throws Exception {
View Full Code Here

    public void testOracle() throws Exception {
        String sql = "alter table t add (fname varchar(50))";
        WallProvider provider = new OracleWallProvider();
        provider.getConfig().setAlterTableAllow(true);
       
        Assert.assertTrue(provider.checkValid(sql));
        WallTableStat tableStat =  provider.getTableStat("t");
        Assert.assertEquals(1, tableStat.getAlterCount());
    }
   
//    public void testPG() throws Exception {
View Full Code Here

        }
    }

    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());
        }
        {
View Full Code Here

    public void testORACLE() throws Exception {
        String sql = "SELECT *FROM T UNION SELECT F1, F2 FROM SYS.ABC";

        OracleWallProvider provider = new OracleWallProvider();
        Assert.assertFalse(provider.checkValid(sql));

    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.