(a) An appeal may be taken from every judicial order or determination of a judge of a superior or district court, upon or involving a matter of law or legal inference, whether made in or out of session, which affects a substantial right claimed in any action or proceeding; or which in effect determines the action, and prevents a judgment from which an appeal might be taken; or discontinues the action, or grants or refuses a new trial.
(b) Any interested party shall have the right of immediate appeal from an adverse ruling as to the jurisdiction of the court over the person or property of the defendant or such party may preserve his exception for determination upon any subsequent appeal in the cause. (1818, c. 962, s. 4, P.R.; C.C.P., s. 299; Code, s. 548; Rev., s. 587; C.S., s. 638; 1967, c. 954, s. 3; 1971, c. 268, s. 10.)