Beispiel #1
0
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)
Beispiel #2
0
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)
Beispiel #3
0
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)
Beispiel #4
0
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)
Beispiel #5
0
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")
Beispiel #6
0
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")
Beispiel #7
0
def edge_delete(project, source, target):
  e = edges(project)
  data = load(e)
  edge_del_record(data[0], data[1], source, target)
  save(e, data)
Beispiel #8
0
def edge_create(project, attr):
  create("edge", edges(project), attr)
Beispiel #9
0
def edge_create(project, attr):
    create("edge", edges(project), attr)
Beispiel #10
0
def edge_delete(project, source, target):
    e = edges(project)
    data = load(e)
    edge_del_record(data[0], data[1], source, target)
    save(e, data)