def edge_update(project, record): e = edges(project) n = nodes(project) edata = load(e) ndata = load(n) edge_upd_record(ndata[0], ndata[1], edata[0], edata[1], record) save(e, ndata)
def node_delete(project, label): e = edges(project) n = nodes(project) edata = load(e) ndata = load(n) node_del_record(ndata[0], ndata[1], edata[0], edata[1], label) save(n, ndata)
def local_create(name): if not p.isdir(store()): fail("store area "+store()+" does not exist") if p.exists(project(name)): fail("store "+project(name)+" already exists") mkdir(project(name)) create(nodes(name), "Id,Label") create(edges(name), "Source,Target,Type,Id,Label,Weight")
def local_create(name): if not p.isdir(store()): fail("store area " + store() + " does not exist") if p.exists(project(name)): fail("store " + project(name) + " already exists") mkdir(project(name)) create(nodes(name), "Id,Label") create(edges(name), "Source,Target,Type,Id,Label,Weight")
def edge_delete(project, source, target): e = edges(project) data = load(e) edge_del_record(data[0], data[1], source, target) save(e, data)
def edge_create(project, attr): create("edge", edges(project), attr)