Search in sources :

Example 6 with WallProvider

use of com.alibaba.druid.wall.WallProvider in project druid by alibaba.

the class WallStatTest_insert method testMySql.

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

Example 7 with WallProvider

use of com.alibaba.druid.wall.WallProvider in project druid by alibaba.

the class WallStatTest_insert 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.getInsertCount());
}
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 8 with WallProvider

use of com.alibaba.druid.wall.WallProvider in project druid by alibaba.

the class WallStatTest_insert method testPG.

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

Example 9 with WallProvider

use of com.alibaba.druid.wall.WallProvider 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 10 with WallProvider

use of com.alibaba.druid.wall.WallProvider in project druid by alibaba.

the class WallStatTest_select method testMySql.

public void testMySql() throws Exception {
    WallProvider provider = new MySqlWallProvider();
    Assert.assertTrue(provider.checkValid(sql));
    WallTableStat tableStat = provider.getTableStat("t");
    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) MySqlWallProvider(com.alibaba.druid.wall.spi.MySqlWallProvider)

Aggregations

WallProvider (com.alibaba.druid.wall.WallProvider)195 MySqlWallProvider (com.alibaba.druid.wall.spi.MySqlWallProvider)182 SQLServerWallProvider (com.alibaba.druid.wall.spi.SQLServerWallProvider)47 WallTableStat (com.alibaba.druid.wall.WallTableStat)41 PGWallProvider (com.alibaba.druid.wall.spi.PGWallProvider)36 OracleWallProvider (com.alibaba.druid.wall.spi.OracleWallProvider)34 WallCheckResult (com.alibaba.druid.wall.WallCheckResult)3 Violation (com.alibaba.druid.wall.Violation)2 SQLStatement (com.alibaba.druid.sql.ast.SQLStatement)1 PGSQLStatementParser (com.alibaba.druid.sql.dialect.postgresql.parser.PGSQLStatementParser)1 PGSchemaStatVisitor (com.alibaba.druid.sql.dialect.postgresql.visitor.PGSchemaStatVisitor)1 WallConfig (com.alibaba.druid.wall.WallConfig)1 WallFunctionStat (com.alibaba.druid.wall.WallFunctionStat)1 Map (java.util.Map)1 Test (org.junit.Test)1