When a magistrate has discharged a defendant, or has held him to answer, he must return immediately to the clerk of the district court of the county, the warrant, if any, the complaint, the depositions, if any have been taken, of all the witnesses examined before him, the statement of the defendant, if he have made one, and all undertakings of bail or for the appearance of witnesses, taken by him, together with a certified record of the proceedings as they appear on his docket.
R.L.1910, § 5692.