def clean(self, fiware_service=None, **kwargs): types = CrateTranslator.query_entity_types( self, fiware_service=fiware_service, **kwargs) if types: for t in types: CrateTranslator.drop_table(self, t, fiware_service=fiware_service, **kwargs) try: self._refresh(types, fiware_service=fiware_service) except exceptions.ProgrammingError: pass
def insert(self, entities, fiware_service=None, fiware_servicepath=None): r = CrateTranslator.insert(self, entities, fiware_service, fiware_servicepath) self._refresh(set([e['type'] for e in entities]), fiware_service=fiware_service) return r
def entity_types(self, fiware_service=None, **kwargs): r = CrateTranslator.query_entity_types( self, entity_type=None, fiware_service=fiware_service, **kwargs) try: self._refresh(r, fiware_service=fiware_service) except exceptions.ProgrammingError: pass return r
def delete_entities(self, entity_type=None, fiware_service=None, **kwargs): r = CrateTranslator.delete_entities(self, entity_type, fiware_service=fiware_service, **kwargs) try: self._refresh([entity_type], fiware_service=fiware_service) except exceptions.ProgrammingError: pass return r