def edge_del_record(header, content, source, target): record = get_record("Source", source, get_records("Target", target, content)) content.remove(record)
def edge_upd_record(nheader, ncontent, eheader, econtent, record): existing = get_record("Source", record["Source"], get_records("Target", record["Target"], econtent)) econtent.remove(existing) edge_add_record(nheader, ncontent, eheader, econtent, record)
def node_del_record(nheader, ncontent, eheader, econtent, label): record = get_record("Label", label, ncontent) check_in_record("Label", record) check_not_in_content("edge", "Source", label, econtent) check_not_in_content("edge", "Target", label, econtent) ncontent.remove(record)
def node_upd_record(nheader, ncontent, eheader, econtent, record): existing = get_record("Label", record["Label"], ncontent) ncontent.remove(existing) node_add_record(nheader, ncontent, record)