Package com.alibaba.druid.wall.spi

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


import com.alibaba.druid.wall.spi.SQLServerWallProvider;

public class WallUtils {
    public static boolean isValidatePostgres(String sql) {
        PGWallProvider provider = new PGWallProvider();
        return provider.checkValid(sql);
    }

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


        return provider.checkValid(sql);
    }

    public static boolean isValidatePostgres(String sql, WallConfig config) {
        PGWallProvider provider = new PGWallProvider(config);
        return provider.checkValid(sql);
    }
   
    public static boolean isValidateMySql(String sql) {
        MySqlWallProvider provider = new MySqlWallProvider();
        return provider.checkValid(sql);
View Full Code Here

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

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

        return provider.checkValid(sql);
    }

    public static boolean isValidatePostgres(String sql, WallConfig config) {
        PGWallProvider provider = new PGWallProvider(config);
        return provider.checkValid(sql);
    }
   
    public static boolean isValidateMySql(String sql) {
        MySqlWallProvider provider = new MySqlWallProvider();
        return provider.checkValid(sql);
View Full Code Here

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

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

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

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

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

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

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

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

        }
    }

    public void testPG() throws Exception {
        WallProvider provider = new PGWallProvider();
        Assert.assertTrue(provider.checkValid(sql));
        {
            WallTableStat tableStat = provider.getTableStat("lhwbbs_posts_reply");
            Assert.assertEquals(1, tableStat.getSelectCount());
        }
        {
View Full Code Here

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

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

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

        Assert.assertEquals(1, tableStat.getUpdateCount());
    }
   
    public void testPG() throws Exception {
        WallProvider provider = new PGWallProvider();
        Assert.assertTrue(provider.checkValid(sql));
        WallTableStat tableStat =  provider.getTableStat("t");
        Assert.assertEquals(1, tableStat.getUpdateCount());
    }
   
    public void testSQLServer() throws Exception {
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.