Interface SecureParameter


@ThreadSafe public interface SecureParameter
Wraps a bound parameter value so Pyranid can mask it in diagnostics while still binding the underlying value normally.

This is display-only: it does not change what is bound to the database. Pyranid's own diagnostic rendering reads getMask() directly and does not rely on an implementation's Object.toString() method.

Implementations should be threadsafe.

Since:
4.4.0
Author:
Mark Allen
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull String
    Gets the safe display value Pyranid should render in diagnostics.
    @NonNull Optional<Object>
    Gets the value to bind.
  • Method Details

    • getValue

      @NonNull Optional<Object> getValue()
      Gets the value to bind.
      Returns:
      the value to bind, or Optional.empty() if the value is null
    • getMask

      @NonNull String getMask()
      Gets the safe display value Pyranid should render in diagnostics.
      Returns:
      the safe display value