Skip to content

NodeNameFilterBuilder #

Bases: object

Filters nodes by their name.

Comparisons are performed on the node's string name.

Examples:

Node.name() == "alice" Node.name().contains("ali")

__eq__(value) #

Return self==value.

__ge__(value) #

Return self>=value.

__gt__(value) #

Return self>value.

__le__(value) #

Return self<=value.

__lt__(value) #

Return self<value.

__ne__(value) #

Return self!=value.

contains(value) #

Returns a filter expression that checks whether the entity's string value contains the given substring.

Parameters:

Name Type Description Default
value str

Substring that must appear within the value.

required

Returns:

Type Description
FilterExpr

A filter expression evaluating substring search.

ends_with(value) #

Returns a filter expression that checks whether the entity's string value ends with the specified suffix.

Parameters:

Name Type Description Default
value str

Suffix to check for.

required

Returns:

Type Description
FilterExpr

A filter expression evaluating suffix matching.

Returns a filter expression that performs fuzzy matching against the entity's string value.

Uses a specified Levenshtein distance and optional prefix matching.

Parameters:

Name Type Description Default
value str

String to approximately match against.

required
levenshtein_distance int

Maximum allowed edit distance.

required
prefix_match bool

If true, the value must also match as a prefix.

required

Returns:

Type Description
FilterExpr

A filter expression performing approximate text matching.

is_in(values) #

Returns a filter expression that checks whether the entity's string value is contained within the given iterable of strings.

Parameters:

Name Type Description Default
values list[str]

Iterable of allowed string values.

required

Returns:

Type Description
FilterExpr

A filter expression evaluating membership.

is_not_in(values) #

Returns a filter expression that checks whether the entity's string value is not contained within the given iterable of strings.

Parameters:

Name Type Description Default
values list[str]

Iterable of string values to exclude.

required

Returns:

Type Description
FilterExpr

A filter expression evaluating non-membership.

not_contains(value) #

Returns a filter expression that checks whether the entity's string value does not contain the given substring.

Parameters:

Name Type Description Default
value str

Substring that must not appear within the value.

required

Returns:

Type Description
FilterExpr

A filter expression evaluating substring exclusion.

starts_with(value) #

Returns a filter expression that checks whether the entity's string value starts with the specified prefix.

Parameters:

Name Type Description Default
value str

Prefix to check for.

required

Returns:

Type Description
FilterExpr

A filter expression evaluating prefix matching.