Expand description
Persistence layer for entities, relationships and their junction tables.
The entity graph mirrors the conceptual content of memories: entities
holds nodes, relationships holds typed edges and memory_entities and
memory_relationships connect each memory to the graph slice it emitted.
Structs§
- Entity
Node - Entity row with enough data for graph export/query.
- NewEntity
- Input payload used to upsert a single entity.
- NewRelationship
- Input payload used to upsert a typed relationship between entities.
- Relationship
Row - Structure representing an existing relation.
Functions§
- create_
or_ fetch_ relationship - Creates a relation if it does not exist (returns action=“created”) or returns the existing relation (action=“already_exists”) with updated weight.
- delete_
entities_ by_ ids - Deletes entities and their associated vectors. Returns the number of entities removed.
- delete_
relationship_ by_ id - Removes a relation by id and cleans up memory_relationships.
- find_
entity_ id - Busca a entidade por nome e namespace. Retorna o id se existir.
- find_
orphan_ entity_ ids - Locates orphan entities: no link in memory_entities and no relations.
- find_
relationship - Looks up a specific relation by (source_id, target_id, relation).
- increment_
degree - knn_
search - link_
memory_ entity - link_
memory_ relationship - list_
entities - Lists entities, filtering by namespace if provided.
- list_
relationships_ by_ namespace - Lists relations filtered by namespace (of source/target entities).
- recalculate_
degree - Recalculates the
degreefield of an entity. - upsert_
entity - Upserts an entity and returns its primary key.
- upsert_
entity_ vec - Replaces the vector row for an entity in
vec_entities. - upsert_
relationship - Upserts a typed relationship between two entity ids.