c# - Sones GraphDB Query Returning Error -
i following tutorial here:
http://developers.sones.de/wiki/doku.php?id=quickreference:fiveminuteguide
but when copy , paste command in webshell
create vertices abstract entity attributes (string name), university extends entity attributes(set<student> students), city extends entity attributes(set<university> universities), student extends entity attributes(integer age) backwardedges(university.students studiesat)
the output generates error:
graphdb@localhost [gql-mode] > create vertices abstract entity attributes (string name), university extends entity attributes(set<student> students), city extends entity attributes(set<university> universities), student extends entity attributes(integer age) backwardedges(university.students studiesat) { "query": "create vertices abstract entity attributes (string name), university extends entity attributes(set students), city extends entity attributes(set universities), student extends entity attributes(integer age) backwardedges(university.students studiesat)", "result": "failed", "duration": [ 0, "ms" ], "warnings": [], "errors": [ { "code": "sones.graphdb.errors.error_gqlsyntax", "description": "syntax error in query: [create vertices abstract entity attributes (string name), university extends entity attributes(set students), city extends entity attributes(set universities), student extends entity attributes(integer age) backwardedges(university.students studiesat)]\n\n gql: [syntax error, expected: index,types,abstract,type,]\n\nat position: 1, 8" } ], "results": [] }
instead of expected result:
{ "query": "create vertices abstract entity attributes (string name), city extends entity attributes(set universities), university extends entity attributes(set students), student extends entity attributes(integer age) backwardedges(university.students studiesat)", "result": "successful", "duration": [ 660, "ms" ], "warnings": [], "errors": [], "results": [ { "dbtype": "entity", "uuid": "f1cf505d-3dc9-4ec0-b777-ca1c0075d835", "revision": "20102110.124020.0492167(8edd08775ce5754581140b203163f93d)", "edition": "defaultedition" }, { "dbtype": "city", "uuid": "89dc4d40-2046-4c0b-8599-6c0665ae62a5", "revision": "20102110.124020.1952135(8edd08775ce5754581140b203163f93d)", "edition": "defaultedition" }, { "dbtype": "university", "uuid": "274f1216-7ba0-409d-b466-668157b2a6ee", "revision": "20102110.124020.3592086(8edd08775ce5754581140b203163f93d)", "edition": "defaultedition" }, { "dbtype": "student", "uuid": "7dec86d3-c62d-49cc-840a-93203bb821dc", "revision": "20102110.124020.5402167(8edd08775ce5754581140b203163f93d)", "edition": "defaultedition" } ] }
so what's problem (i used own lastest binary version didn't compile myself).
they don't have forum :(.
examples on site out of date. i've heard sones gmbh (creators of sonesdb) out of money, product may dead.
the correct query of sample sonesdb 2.0+ is:
create vertex types abstract entity attributes (string name), university extends entity attributes(set<student> students), city extends entity attributes(set<university> universities), student extends entity attributes(int32 age) incomingedges(university.students studiesat)
there no more statement "create vertices", it's called "create vertex types"
integer type - int32
backwardedges - incomingedges
cheatsheet sonesdb 2.0+ can see here. see, there correct information.
Comments
Post a Comment