gravity: Add support for filtering results in the sqlite3 query builder.