ThingPrefixAttrDict

class ros_typedb.typedb_interface.ThingPrefixAttrDict

TypedDict for dict with thing prefix and attributes.

Methods

Attributes

prefix

typedb variable prefix.

attributes

attributes to match.

insert_attributes

attributes to be inserted.

delete_attributes

attributes to be deleted.

update_attributes

attributes to be updated.

relationship

related entities, used when inserting relationship.

attributes: dict[str, str | bool | int | float | datetime]

attributes to match. E.g., {‘email’: ‘test@test.test’} match email

delete_attributes: list[str]

attributes to be deleted. E.g., [‘age’] deletes the ‘age attribute’

insert_attributes: dict[str, str | bool | int | float | datetime]

attributes to be inserted. E.g., {‘age’: ‘30’} inserts age = 30

prefix: str

typedb variable prefix. E.g., person1 results in $person1

relationship: dict[str, str]

related entities, used when inserting relationship. E.g., { ‘employee’: ‘p1’, ‘employer’: ‘p2’} creates the relationship (employee:$p1, employer: $p2)

update_attributes: dict[str, str | bool | int | float | datetime]

attributes to be updated. E.g., {‘age’: ‘35’} changes age to 35