query() should return result object instead of rows