Skip to content

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) -> bool

True if the link existed, otherwise False (also for unknown ids).

  • ValueError link_type is not a valid link type name.

Durable after the next db.save().

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"))
# True
print(db.neighbors("a"))
# []