Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Introduce an enum to describe filter handling policy that can be chosen.

We can also introduce other policies such as INDEX_ONLY and NUMBERIC_ONLY to provide users with more choices.

Notice That: The policies that may only applicable to some but not all of the databases. We need to ensure fast failure in scenarios where the policy is not supported by the database and suggest users to choose a suitable policy.

Code Block
languagejava
/** Filter handling policy that can be chosen. */
@PublicEvolving
public enum FilterHandlingPolicy implements DescribedEnum {

    ALWAYS(
            "always",
            text("Always push the supported filters to the external system")),

    NEVER(
            "never",
            text("Never push the supported filters to the external system"));

    private final String name;
    private final InlineElement description;

    FilterHandlingPolicy(String name, InlineElement description) {
        this.name = name;
        this.description = description;
    }

    @Override
    public InlineElement getDescription() {
        return description;
    }

    @Override
    public String toString() {
        return name;
    }
}

...