-from sqlalchemy.dialects.postgresql import HSTORE, ARRAY, JSONB, array
-from sqlalchemy.dialects.sqlite import JSON as sqlite_json
-
-from nominatim.db.sqlalchemy_types import Geometry
-
-class PostgresTypes:
- """ Type definitions for complex types as used in Postgres variants.
- """
- Composite = HSTORE
- Json = JSONB
- IntArray = ARRAY(sa.Integer()) #pylint: disable=invalid-name
- to_array = array
-
-
-class SqliteTypes:
- """ Type definitions for complex types as used in Postgres variants.
- """
- Composite = sqlite_json
- Json = sqlite_json
- IntArray = sqlite_json
-
- @staticmethod
- def to_array(arr: Any) -> Any:
- """ Sqlite has no special conversion for arrays.
- """
- return arr