resetQuery method

  1. @override
void resetQuery()
override

Drops every clause accumulated so far, leaving the table, alias and connection in place so the builder can be reused for a fresh query.

A builder never clears itself after executing — paginate depends on that, since it runs count() and get() off the same clauses. But a builder that outlives one query (a Model held on a relation, say) would otherwise carry its old WHEREs into the next one.

Implementation

@override
void resetQuery() {
  super.resetQuery();
  _withRelation = [];
}