3-1-515. Arrest and detention by sheriff. Upon executing the warrant of attachment, the sheriff shall keep the person in custody, bring the person before the court or judge, and detain the person until an order is made in the proceeding unless the person arrested is entitled to be discharged as provided in 3-1-516.