Skip to content

where

Function: warmhub.where

where(field_path: str)

Start a field-value predicate for thing.head, query, count.

Explicit form — prefer this in generated code and documentation:

where("temp_celsius").gte(21.0)
where("bay_id").eq("bay-a")
where("name").prefix("probe-")
where("bay_id").in_(["bay-a", "bay-b"])
where("retired_at").exists()

Operator sugar — identical predicates, for queries written by hand:

where("temp_celsius") >= 21.0
where("bay_id") == "bay-a"

Predicates passed together in one where=[...] list are ANDed. There is no OR on the wire; see the module docstring.