写入成功,但是查询不到数据

服务端 版本 2.0 正式版

客户端 版本 nebula2-python = "2.0.0"

完整 code

写入 edge 类型,但是查询没有数据

    def run(self):
        self.session.execute(f"USE {space}")
        insert_resp = self.session.execute('INSERT EDGE question_disease(id, relation_type) VALUES "84WpfoHRfsF"->"7zZrbldIBqr"@212:(212, "suggest"), "84WpfkVpnp7"->"7zThRp3g8PG"@225:(225, "suggest"), "84Wpfk60IzA"->"7zZrbm2GtPp"@229:(229, "suggest")')
        logger.debug(insert_resp)

        resp = self.session.execute('FETCH PROP ON question_disease "84WpfoHRfsF"->"7zZrbldIBqr";')
        logger.debug(resp)
        self.session.release()

log

2021-03-26 16:22:08.632 | DEBUG    | py:run:30 - ResultSet(ExecutionResponse(
    error_code=0,
    latency_in_us=3271,
    space_name=b'demos'))
2021-03-26 16:22:08.653 | DEBUG    | py:run:33 - ResultSet(ExecutionResponse(
    error_code=0,
    latency_in_us=6811,
    data=DataSet(
        column_names=[b'question_disease._src',
        b'question_disease._dst',
        b'question_disease._rank',
        b'question_disease.id',
        b'question_disease.relation_type'],
        rows=[]),
    space_name=b'demos'))
nebula2-python = "2.0.0"

web Studio 工具也是查不到

你插入的是rank 为 212的,fetch的时候需要指定rank,不然是按rank 0 去查

FETCH PROP ON question_disease "84WpfoHRfsF"->"7zZrbldIBqr"@212;

1 个赞

有rank的话,必须指定rank?

fetch 是的,go就不需要

3 个赞

浙ICP备20010487号