Add has_data query support.