Issue #2219563 by drunken monkey: Added __toString() methods for queries and filters.