MCPcopy Create free account
hub / github.com/AQ-MedAI/MedMemoryBench / update

Method update

methods/letta/orm/sqlalchemy_base.py:459–472  ·  view source on GitHub ↗
(self, db_session: Session, actor: Optional["User"] = None, no_commit: bool = False)

Source from the content-addressed store, hash-verified

457
458 @handle_db_timeout
459 def update(self, db_session: Session, actor: Optional["User"] = None, no_commit: bool = False) -> "SqlalchemyBase":
460 logger.debug(...)
461 if actor:
462 self._set_created_and_updated_by_fields(actor.id)
463 self.set_updated_at()
464
465 # remove the context manager:
466 db_session.add(self)
467 if no_commit:
468 db_session.flush() # no commit, just flush to get PK
469 else:
470 db_session.commit()
471 db_session.refresh(self)
472 return self
473
474 @classmethod
475 @handle_db_timeout

Callers 15

deleteMethod · 0.95
update_outputMethod · 0.45
get_text_embeddingMethod · 0.45
__init__Method · 0.45
__setstate__Method · 0.45
_update_identityMethod · 0.45
update_sourceMethod · 0.45
update_message_by_idMethod · 0.45

Calls 6

commitMethod · 0.80
debugMethod · 0.65
set_updated_atMethod · 0.45
addMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected