Reference
db.unlink
Remove a link between two records.
Remove the link source -link_type-> target.
db.unlink(source: str, link_type: str, target: str) -> boolReturns
Section titled “Returns”True if the link existed, otherwise False (also for unknown ids).
Raises
Section titled “Raises”- ValueError
link_typeis not a valid link type name.
Durable after the next db.save().
Examples
Section titled “Examples”import srvdb
db = srvdb.create("./vectors", dimension=128)db.add(["a", "b"], [[1.0] + [0.0] * 127, [0.0, 1.0] + [0.0] * 126], ["{}", "{}"])db.link("a", "cites", "b")print(db.unlink("a", "cites", "b"))# Trueprint(db.neighbors("a"))# []See also
Section titled “See also”db.link: Add a link.
Was this page helpful? Tell us in Discussions.