flag for single and multiple db queries to provide the correct response type