Package com.alibaba.druid.wall.spi

Examples of com.alibaba.druid.wall.spi.PGWallProvider


        } else if (JdbcUtils.POSTGRESQL.equals(dbType)) {
            if (config == null) {
                config = new WallConfig(PGWallProvider.DEFAULT_CONFIG_DIR);
            }

            provider = new PGWallProvider(config);
        } else if (JdbcUtils.DB2.equals(dbType)) {
            if (config == null) {
                config = new WallConfig(DB2WallProvider.DEFAULT_CONFIG_DIR);
            }
View Full Code Here


        } else if (JdbcUtils.POSTGRESQL.equals(dbType)) {
            if (config == null) {
                config = new WallConfig(PGWallProvider.DEFAULT_CONFIG_DIR);
            }

            provider = new PGWallProvider(config);
        } else {
            throw new IllegalStateException("dbType not support : " + dbType + ", url " + dataSource.getUrl());
        }

        this.inited = true;
View Full Code Here

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

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

        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

        } else if (JdbcUtils.POSTGRESQL.equals(dbType)) {
            if (config == null) {
                config = new WallConfig(PGWallProvider.DEFAULT_CONFIG_DIR);
            }

            provider = new PGWallProvider(config);
        } else {
            throw new IllegalStateException("dbType not support : " + dbType + ", url " + dataSource.getUrl());
        }

        this.inited = true;
View Full Code Here

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

        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

        } else if (JdbcUtils.POSTGRESQL.equals(dbType)) {
            if (config == null) {
                config = new WallConfig(PGWallProvider.DEFAULT_CONFIG_DIR);
            }

            provider = new PGWallProvider(config);
        } else if (JdbcUtils.DB2.equals(dbType)) {
            if (config == null) {
                config = new WallConfig(DB2WallProvider.DEFAULT_CONFIG_DIR);
            }
View Full Code Here

        WallTableStat tableStat = provider.getTableStat("t");
        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());
    }
View Full Code Here

        WallTableStat tableStat = provider.getTableStat("t");
        Assert.assertEquals(1, tableStat.getDropCount());
    }

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

TOP

Related Classes of com.alibaba.druid.wall.spi.PGWallProvider

Copyright © 2018 www.massapicom. 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.