Skip to main content

Cayley

brew add cayley
# 启动服务# http://127.0.0.1:64210cayley http
# Docker 启动docker run --rm -it -v $PWD:/data -p 64210:64210 cayleygraph/cayley
# 样本数据curl -OL https://github.com/cayleygraph/cayley/raw/master/data/30kmoviedata.nq.gzcayley http --load 30kmoviedata.nq.gz

cayley repl

gizmo#

// 基本查询g.V().getLimit(5);
// 属性查询g.V().has('<name>', 'Humphrey Bogart').all();
// 复杂路径 - 可以预定义路径var filmToActor = g.Morphism().out('</film/film/starring>').out('</film/performance/actor>');
g.V().has('<name>', 'Casablanca').follow(filmToActor).out('<name>').all();
var result = {};var person = g.V('wener');result['id'] = 'wener';person.outPredicates().forEach(function (d) {  result[d.id] = person.out(d.id).toValue();});
g.emit(result);