session.execute('INSERT VERTEX player(name, age) VALUES '
'\'Bob\':(\'Bob\', 10), '
'\'Lily\':(\'Lily\', 9), '
'\'Tom\':(\'Tom\', 10), '
'\'Jerry\':(\'Jerry\', 13), '
'\'John\':(\'John\', 11)')
session.execute('INSERT EDGE like(likeness) VALUES '
'\'Bob\'->\'Lily\':(80.0), '
'\'Bob\'->\'Tom\':(70.0), '
'\'Lily\'->\'Jerry\':(84.0), '
'\'Tom\'->\'Jerry\':(68.3), '
'\'Bob\'->\'John\':(97.2)')
result = session.execute('FIND ALL PATH FROM \"Bob\" to \"Jerry\" OVER *')
for item in result.rows():
print(item.values[0].get_pVal())
返回的结果
Path(
src=Vertex(
tags=[]),
steps=[Step(
dst=Vertex(
tags=[]),
type=1,
name=b'like',
ranking=0,
props={}),
Step(
dst=Vertex(
tags=[]),
type=1,
name=b'like',
ranking=0,
props={})])
怎么看点的id和属性?