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 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 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 node_create(project, record): n = nodes(project) data = load(n) node_add_record(data[0], data[1], record) save(n, data)
def node_create(project, attr): create("node", nodes(project), attr)