ql-io/ql.io — Issue #196: Object manipulation
Author: s3u
Created: 2011-12-25 05:04:22+00:00
State: open

The language currently supports object selection as in

foo = "{bar.foo}";

But the lang supports no way to update value of bar.foo.

One option is to use insert, update and delete operations. Here is an example.

obj = {
"p1" : "v1",
"p2" : {
"p3" : "v3",
"p4" : "v4"
}
};

p2 = "{obj.p2}";
insert into p2 (p5, p6) values ('v5', 'v6')
return obj;

But this is not ideal. The lang should be much simpler

foo = bar.foo;
bar.foo = 'fool';
return bar.foo;

This should return `fool`.