Support for variable queries in backend plugin

How does the backend data source support variable queries.
For instance backend.QueryDataHandler implements the queryData method, and this method should return an array for frames. But the frame data type can not be used for getting variable data.

I am creating a data source for SQL like data base.
So a query “select distinct x from y”, would not exactly fit the requirement of a frame.