pub struct EntityFilter {
pub ids: Vec<Uuid>,
pub kinds: Vec<String>,
pub entity_types: Vec<String>,
pub entity_types_by_kind: BTreeMap<String, Vec<String>>,
pub legacy_entity_type_fallback: bool,
pub name_prefix: Option<String>,
pub name_exact: Option<String>,
pub tags_any: Vec<String>,
pub namespaces: Vec<String>,
pub names_ci: Vec<String>,
}Expand description
Entity filter for query operations.
Fields§
§ids: Vec<Uuid>§kinds: Vec<String>§entity_types: Vec<String>Filter by exact entity_type value. Multiple values are ORed.
entity_types_by_kind: BTreeMap<String, Vec<String>>Kind-qualified accepted subtype spellings. Groups are ORed; each group requires its kind and one of its values. An empty value group matches nothing.
legacy_entity_type_fallback: boolFor entity listing, fall back to a string properties.type only when
entity_type is null. Does not change the returned entity or apply when
both type filters are empty. Other query callers retain exact-column filtering.
name_prefix: Option<String>§name_exact: Option<String>Deterministic, case-sensitive equality on entities.name (binary
comparison — SQLite’s default collation for = on a TEXT column
without an explicit COLLATE NOCASE). Distinct from name_prefix:
that stage’s LIKE is inherently prefix-shaped and, with SQLite’s
default NOCASE-free LIKE on ASCII, still ranks a page by
created_at DESC — a match that is exact but not the newest can be
paged out. name_exact skips paging risk entirely by filtering to
only rows that equal name at the SQL layer.
namespaces: Vec<String>When non-empty, restricts results to any of these namespaces using
namespace IN (...). Takes precedence over the namespace string
parameter passed to query_entities / count_entities. When empty the
caller-supplied namespace parameter is used (single-namespace path,
backward-compatible default).
names_ci: Vec<String>ASCII-case-insensitive batched exact-name match (ADR-104 Stage C).
Compares a caller-bounded set of raw and ASCII-lowercased candidate
strings to LOWER(name). Cased non-ASCII characters require exact form.
Distinct from single-value, case-sensitive name_exact. Results contain
at most one representative row per folded candidate before page limits
and offsets are applied.
Implementations may omit the page total to keep this lookup page-limited
instead of issuing a separate count.