我需要检查数据库是否指定了 IP 地址。
这个请求:
echo {"query" : "FOR v in visitors return v.guid"} | curl -X POST --data-binary @- --dump - http://localhost:8529/_db/otest/_api/cursor
返回我的下一个结果:
{"result":["7478d52d-af3e-4a83-9791-4e827dfe9059",null,"8d324b9e-7376-4977-9976-1606045c7086"],"hasMore":false,"cached":false,"extra":{"stats":{"writesExecuted":0,"writesIgnored":0,"scannedFull":3,"scannedIndex":0,"filtered":0,"executionTime":0},"warnings":[]},"error":false,"code":201}
但是当我发送请求时FILTER
:
echo {"query" : "FOR v in visitors FILTER v.ip == "127.0.0.1" return v.guid"} | curl -X POST --data-binary @- --dump - http://localhost:8529/_db/otest/_api/cursor
我收到错误:
HTTP/1.1 400 Bad Request
Server: ArangoDB
Connection: Keep-Alive
Content-Type: application/json; charset=utf-8
Content-Length: 73
{"error":true,"errorMessage":"expecting comma","code":400,"errorNum":600}
我做错了什么?
还有我如何在没有请求元数据的情况下获得结果,例如:..."hasMore":false,"cached":...