A ColumnRestriction that constrains a column to one of a fixed set of allowed values. The allowed values may originate from string, boolean, integer, long, float, or double enum restrictions, but are always normalized to their canonical string representation at construction time (e.g. the integer 10000 becomes "10000", the boolean true becomes "true").

validate performs an exact string match against these canonical representations. A value that the server would accept through its own lenient parsing (e.g. `"1e4"` for the integer `10000`, or `"10000.0"` for the integer `10000`) will fail client-side validation even though it may succeed on the server. Callers should treat a `null` result from validate as a definitive pass, but a non-null result as a client-side hint only — the server remains the authoritative source of truth.

Hierarchy

Constructors

Accessors

Methods

Constructors

Accessors

  • get allowedValues(): string[]
  • The canonical string representations of the allowed values for this column. These are the only values that validate will accept; the server may permit additional representations (e.g. alternate numeric formats).

    Returns string[]

    The allowed values as canonical strings

  • get type(): string
  • The fully-qualified protobuf type name of this restriction (e.g., "io.deephaven.proto.backplane.grpc.IntegerRangeRestriction").

    Returns string

    The restriction type name

Methods

  • Validates a proposed value against this restriction.

    Parameters

    • value: any

      The proposed column value to validate

    Returns string

    An error message if the value violates the restriction, or null if the value is valid