Class SqlParserUtils

java.lang.Object
org.jeecgframework.minidao.sqlparser.impl.util.SqlParserUtils

public class SqlParserUtils extends Object
  • Field Details

  • Constructor Details

    • SqlParserUtils

      public SqlParserUtils()
  • Method Details

    • maskMyBatisPlaceholders

      public static String maskMyBatisPlaceholders(String text, Map<String,String> tokenToRaw)
      将 #{..}/${..} 替换为占位
      Parameters:
      text -
      tokenToRaw -
      Returns:
    • maskMyBatisPlaceholders

      public static String maskMyBatisPlaceholders(String text, Map<String,String> tokenToRaw, String customMaskKey)
      将 #{..}/${..} 替换为占位
      Parameters:
      text -
      tokenToRaw -
      customMaskKey - 自定义占位符前缀
      Returns:
    • restoreMyBatisPlaceholders

      public static String restoreMyBatisPlaceholders(String sql, Map<String,String> tokenToRaw)
      占位符还原:将带引号的占位换回原始 #{..}/${..}
      Parameters:
      sql -
      tokenToRaw -
      Returns: