invalidate method

void invalidate({
  1. MssqlSession? session,
})

Drops a cached dialect so the next resolve asks the server again.

session drops that server/database. Omitting it drops everything this cache holds — the right answer after a failover where product version or compatibility level may have changed.

Implementation

void invalidate({MssqlSession? session}) {
  if (session != null) {
    _inflight.remove(keyFor(session));
    return;
  }
  _inflight.clear();
}