(1) Except as otherwise provided in this section, the rules applicable to a civil action apply to a proceeding to foreclose liens under sections 52-125 to 52-159.
(2) In a proceeding to foreclose a lien, all claimants having recorded liens may join as plaintiffs and those who do not join as plaintiffs may be joined as defendants. Any person who records a lien or acquires an interest in real estate after the commencement of the foreclosure proceeding may be made a defendant before judgment.
(3) The court shall determine the amount due or owing to each claimant and direct foreclosure of the liens against the real estate. Foreclosure may be by any method available for foreclosure of security interests in real estate, or otherwise, as ordered by the court.