Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does anyone have a working example of JSON insert/select in OrientDB?

Tags:

orientdb

Select query doesn't work for JSON in OrientDB. Can someone provide with a working example showcasing two things:

  1. Inserting JSON data correctly

  2. Querying JSON data

Thanks!

like image 378
Nick Avatar asked May 24 '12 09:05

Nick


1 Answers

1.Use "content" to implement JSON insert.

For Example-
insert into Person content {"name":"nawab","age":25}

for this to run,you must have prior configuration as-
1.Create a Vertex by-

create class Person extends V    

2.Then Create Property name and age

create property Person.name string
create property Person.age integer

like image 163
bondkn Avatar answered Sep 22 '22 08:09

bondkn