def setdb(url): db = AlchemyDataAccess() db.connect(url) db.create_all(True) db.add_postgis_extension() set_spatial_units(db) return db
def setdb(url): db = AlchemyDataAccess() db.connect(url) db.create_all(True) db.add_postgis_extension() SpatialUnitDynamicMapperFactory.instance().dataaccess = db return db
def createdb(url: str) -> DataAccess: db = AlchemyDataAccess() db.connect(url) db.create_all(True) db.add_postgis_extension() return db