Add triggering for query updates