Your repository return type may say what it returns, but how would you statically prove the structure of the raw SQL string? Most of the detection today is at runtime perhaps building a class or validating the data.
This supports static verification of queries, your code doesn't need to run to validate the type is correct.
I don't care to argue either way for tests vs static types (I write both frankly), just want the distinction to be clear.