def configure_db(options, models_mapper=None): global _ENGINE if not _ENGINE: _ENGINE = _create_engine(options) if models_mapper: models_mapper.map(_ENGINE) else: mappers.map(_ENGINE, ipam.models.persisted_models())
def configure_db(options, models_mapper=None): configure_sqlalchemy_log(options) global _ENGINE if not _ENGINE: _ENGINE = _create_engine(options) if models_mapper: models_mapper.map(_ENGINE) else: mappers.map(_ENGINE, ipam.models.persisted_models())
def configure_db(options): configure_sqlalchemy_log(options) global _ENGINE if not _ENGINE: _ENGINE = _create_engine(options) mappers.map(_ENGINE, ipam.models.persisted_models())