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