nebula 常用命令

756 阅读1分钟

使用空间 use 空间名

插入节点信息:INSERT VERTEX IF NOT EXISTS emailer (username, password, tagstring) values "12345@qq.com":("张三", "123456","dsad,45,ff")

FETCH PROP ON emailer "12@qq.com"

插入边信息:INSERT EDGE IF NOT EXISTS mailside (sendtime, carboncopy,blindcarboncopy,mailtype,tagstring) VALUES "12@qq.com" -> "123@163.com":(datetime("2021-03-17T17:53:59"),"1234@qq.com","12345@qq.com",0,"dsad,45,ff")

查邮箱的边的对应节点:GO FROM "12@qq.com" OVER mailside

查询传入节点的节点:GO FROM "12@qq.com" OVER mailside REVERSELY

查对应两个节点的边的信息:FETCH PROP ON mailside "12@qq.com" -> "123@163.com" where

查询所有的节点 :MATCH (v:emailer) return v

查询所有信息:GO FROM "12@qq.com" OVER mailside BIDIRECT YIELD $^.emailer.username , $$.emailer.username, properties(edge).mailtype,properties(edge).blindcarboncopy,properties(edge).carboncopy,properties(edge).sendtime,properties(edge).tagstring,rank(edge)

时间计算: GO FROM '555@qq.com' OVER mailside YIELD Timestamp(Tostring(properties(edge).sendtime))-Timestamp()