Module bus.pager

Interface ReplaceSql

All Known Implementing Classes:
RegexWithNolock, SimpleWithNolock

public interface ReplaceSql
Interface for replacing and restoring SQL statements. Implementations of this interface can modify SQL for parsing and then revert it to its original form.
Since:
Java 17+
Author:
Kimi Liu
  • Method Summary

    Modifier and Type
    Method
    Description
    Temporarily replaces parts of the SQL statement for jsqlparser parsing.
    Restores the SQL statement after it has been parsed and potentially modified.
  • Method Details

    • replace

      String replace(String sql)
      Temporarily replaces parts of the SQL statement for jsqlparser parsing.
      Parameters:
      sql - the original SQL statement
      Returns:
      the modified SQL statement suitable for parsing
    • restore

      String restore(String sql)
      Restores the SQL statement after it has been parsed and potentially modified.
      Parameters:
      sql - the SQL statement that was previously replaced and parsed
      Returns:
      the restored SQL statement