Matchers

Inheritance diagram of dbt_contracts.contracts.matchers.PatternMatcher, dbt_contracts.contracts.matchers.RangeMatcher, dbt_contracts.contracts.matchers.StringMatcher

Classes

PatternMatcher(*[, include, exclude, match_all])

RangeMatcher(*[, min_count, max_count])

StringMatcher(*[, ignore_whitespace, ...])

class dbt_contracts.contracts.matchers.RangeMatcher(*, min_count: Annotated[int, Ge(ge=1)] = 1, max_count: Annotated[int | None, Gt(gt=0)] = None)

Bases: BaseModelConfig

min_count: int
max_count: int | None
validate_max_count() → Self

Ensure that the maximum count is >= the minimum count.

class dbt_contracts.contracts.matchers.StringMatcher(*, ignore_whitespace: bool = False, case_insensitive: bool = False, compare_start_only: bool = False)

Bases: BaseModelConfig

ignore_whitespace: bool
case_insensitive: bool
compare_start_only: bool
class dbt_contracts.contracts.matchers.PatternMatcher(*, include: Annotated[Sequence[str], BeforeValidator(func=to_tuple, json_schema_input_type=PydanticUndefined)] = (), exclude: Annotated[Sequence[str], BeforeValidator(func=to_tuple, json_schema_input_type=PydanticUndefined)] = (), match_all: bool = False)

Bases: BaseModelConfig

include: Annotated[Sequence[str], BeforeValidator(func=to_tuple, json_schema_input_type=PydanticUndefined)]
exclude: Annotated[Sequence[str], BeforeValidator(func=to_tuple, json_schema_input_type=PydanticUndefined)]
match_all: bool