If judgment be given for the applicant he or she may recover the damages which he or she has sustained, as found by the jury or as may be determined by the court or referee, upon a reference to be ordered, together with costs; and for such damages and costs an execution may issue, and a peremptory mandate must also be awarded without delay.