MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / validate_arg_len

Method validate_arg_len

src/sql/src/func.rs:626–631  ·  view source on GitHub ↗

Validates that the number of input elements are viable for `self`.

(&self, input_len: usize)

Source from the content-addressed store, hash-verified

624
625 /// Validates that the number of input elements are viable for `self`.
626 fn validate_arg_len(&self, input_len: usize) -> bool {
627 match self {
628 Self::Exact(p) => p.len() == input_len,
629 Self::Variadic { leading, .. } => input_len > leading.len(),
630 }
631 }
632
633 /// Matches a `&[SqlScalarType]` derived from the user's function argument
634 /// against this `ParamList`'s permitted arguments.

Callers 1

matches_argtypesMethod · 0.80

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected