Fixed #22776 -- `sqlall` can now be used with a specific model.

Thanks smeatonj for the report.
Do you think it would be worth adding an example of how to use this command here? It wasn't initially clear to me on how this might look, so I imagine others might find the same.