Refactored API for update queries.