Class SchemaValidationDriver.SchemaConfig

java.lang.Object
org.pjdbc.drivers.SchemaValidationDriver.SchemaConfig
Enclosing class:
SchemaValidationDriver

public static class SchemaValidationDriver.SchemaConfig extends Object
Configuration holder for schema validation parameters.
  • Constructor Details

    • SchemaConfig

      public SchemaConfig(String url)
  • Method Details

    • loadFromMetadata

      public void loadFromMetadata(Connection conn) throws SQLException
      Load allowed tables from database metadata.
      Throws:
      SQLException
    • getAllowedTables

      public Set<String> getAllowedTables()
    • getBlockedTables

      public Set<String> getBlockedTables()
    • getAllowedColumns

      public Set<String> getAllowedColumns()
    • getBlockedColumns

      public Set<String> getBlockedColumns()
    • getMode

    • isCaseSensitive

      public boolean isCaseSensitive()
    • getMessage

      public String getMessage()
    • addAllowedTable

      public void addAllowedTable(String table)
      Add a table to the allowed list programmatically.
    • addBlockedTable

      public void addBlockedTable(String table)
      Add a table to the blocked list programmatically.
    • addBlockedColumn

      public void addBlockedColumn(String column)
      Add a column to the blocked list programmatically.
    • checkStatement

      public void checkStatement(String sql) throws SQLException
      Check if a SQL statement is allowed to execute.
      Throws:
      SQLException - if the statement references blocked tables or columns