The plaintiff in any action, except those brought for the recovery of specific real or personal property, may also, as an auxiliary relief, have an order of mandamus to compel the performance of a duty established in such action.