first implementation for spatialite