The use of an error message to communicate that no results returned is just a workaround we implemented to better support these kind of queries. You’re absolutely right that we should support this better and I’m open to changing the query results result API to support additional types of queries.
When planning the implementation, we need to keep in mind that there are different types of databases that handle this differently and not all query runners will support this immediately.
But I’m open to starting a discussion (and accepting and implementation based on that). We can do it in this thread or open a new issue on GitHub.