We consider two-dimensional spatial databases defined in terms of polynomial inequalities and focus on the potential of programming languages for such databases to express queries related to topological connectivity. It is known that the topological connectivity test is not first-order expressible. One approach to obtain a language in which connectivity queries can be expressed would be to extend FO+Poly with a generalized (or Lindstr¨om) quantifier expressing that two points belong to the same connected component of a given database. For the expression of topological connectivity, extensions of first-order languages with recursion have been studied (in analogy with the classical relational model). Two such languages are spatial Datalog and FO+Poly+While. Although both languages allow the expression of non-terminating programs, their (proven for FO+Poly+While and conjectured for spatial Datalog) computational completeness makes them interesting objects of study. Previously, spatia...