Open a-gorbunov opened 8 years ago
Hm. Unfortunately, not now... But I think that there is a way...
We can easily extend syntax to:
alasql("UPDATE [Test] SET b->c = ? WHERE a = 1", 3)
//or for 'non-arrow' syntax
alasql("UPDATE [Test] SET b.c = ? WHERE a = 1", 3)
The only problems is time...
What you can do right now... you can register user-defined function:
alasql.fn.modifyb = function(b,v) {
b.c = v;
return b;
};
alasql("UPDATE [Test] SET b = modifyb(b,?) WHERE a = 1", 3)
Example:
Can I update property b.c of inserted object in UPDATE statement? I mean somthing like
Currenly I'm using SELECT + UPDATE of top-level property.