java neo4j rest api,通过neo4j REST API的密码配置文件

Can anyone tell me how to run a PROFILE'd query using teh neo4j REST API such as

PROFILE MATCH (n:LABEL) return n;

When I run this either in Java using the RestCypherQueryEngine or the even using a raw HTTP post directly I get

message: "Invalid input 'P': expected SingleStatement (line 1, column 1) "PROFILE MATCH (n:LABEL) return n;" ^"

exception: "SyntaxException"

I though I had read somewhere that this is possible not only through the server console

解决方案

The old cypher endpoint (i.e /db/data/cypher) had a ?profile=true query parameter that adds profiling information to the result.

e.g.

curl -H accept:application/json -H content-type:application/json

-d'{"query":"MATCH (n) RETURN count(*)","params":{}}'

http://localhost:7474/d/data/cypher?profile=true

{

"columns" : [ "count(*)" ],

"data" : [ [ 0 ] ],

"plan" : {

"args" : {

"returnItemNames" : [ "count(*)" ],

"_rows" : 1,

"_db_hits" : 0,

"symKeys" : [ " INTERNAL_AGGREGATE75acebd9-82d7-4a65-921c-2049c4bde4e7" ]

},

"dbHits" : 0,

"name" : "ColumnFilter",

"children" : [ {

"args" : {

"keys" : [ ],

"_rows" : 1,

"aggregates" : [ "( INTERNAL_AGGREGATE75acebd9-82d7-4a65-921c-2049c4bde4e7,CountStar())" ],

"_db_hits" : 0

},

"dbHits" : 0,

"name" : "EagerAggregation",

"children" : [ {

"args" : {

"_rows" : 0,

"_db_hits" : 0,

"identifier" : "n"

},

"dbHits" : 0,

"name" : "AllNodes",

"children" : [ ],

"rows" : 0

} ],

"rows" : 1

} ],

"rows" : 1

}

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值