You could absolutely do that, but it’s a different tool and probably dependent on your DBAL of choice too.
I wonder if we could do the same for let's say an API endpoint that would perform a given amount of SQL queries. Saying something like "no more than 10 queries", in order to catch potential N+1 query issues after a refactor (for example).
commit 2cce5d7