piccolo-orm/piccolo

Add a method to the `Array` column for getting the number of dimensions of the array

Closed this issue · 0 comments

In Piccolo API, and Piccolo Admin we need an easy way to get the number of dimensions of an array column, because we have to treat arrays with 2 or more dimensions differently.

For example:

>>> Array(Varchar())._get_dimensions()
1

>>> Array(Array(Varchar()))._get_dimensions()
2