Syntax for ADD operation with collection of maps?

18 views
Skip to first unread message

Eric24

unread,
Nov 12, 2017, 1:15:57 PM11/12/17
to OrientDB
I can't figure out the proper SQL syntax for adding a map to a collection. For example, the record property "list" is "[{"aaa":1111, "aa":11}, {"bbb":222, "bb":22}, {"ccc":333, "cc":33}]. I can easily create and query this property, but how do I add {"ddd":444, "dd":44} to this collection? UPDATE #20:0 ADD list = {"ddd":444, "dd":44} does not error out, but the result is that '44' is added to the collection. All other syntax forms I've tried result in various errors.

Luigi Dell'Aquila

unread,
Nov 13, 2017, 3:21:02 AM11/13/17
to orient-...@googlegroups.com
Hi Eric,

The correct syntax should be just

UPDATE x ADD list =  {"ddd":444, "dd":44} 

If it doesn't work, I'd say it's a bug. Could you please report in issue?

Thanks

Luigi


2017-11-12 19:15 GMT+01:00 Eric24 <er...@24x8.com>:
I can't figure out the proper SQL syntax for adding a map to a collection. For example, the record property "list" is "[{"aaa":1111, "aa":11}, {"bbb":222, "bb":22}, {"ccc":333, "cc":33}]. I can easily create and query this property, but how do I add {"ddd":444, "dd":44} to this collection? UPDATE #20:0 ADD list = {"ddd":444, "dd":44} does not error out, but the result is that '44' is added to the collection. All other syntax forms I've tried result in various errors.

--

---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eric Lenington

unread,
Nov 13, 2017, 11:15:15 AM11/13/17
to OrientDB

--

---
You received this message because you are subscribed to a topic in the Google Groups "OrientDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orient-database/vWcwJAaFz80/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-database+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages