Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #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")
Пример #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")
Пример #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)
Пример #8
0
def edge_create(project, attr):
  create("edge", edges(project), attr)
Пример #9
0
def edge_create(project, attr):
    create("edge", edges(project), attr)
Пример #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)