Monday, May 04. 2015Adding properties to existing JSON object with PLV8Printer FriendlyTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
Yes - it would be "nice", if PLV8 could use (native) JSONB.
Due to it's high speed (except for Trigger-Functions so far) is PLV8 our favoured "language".
PLV8 is pretty nice anyway. I made myself two convenience JSON operators using it:
json + json (merges rightarg into leftarg, overwriting existing values like in your case) json - text (deletes key:value given in rightarg) So I can just execute "UPDATE customer SET other = other - 'legacy_key' - 'another_legacy_key'" etc. Obviously, having such operators in the default installation could cause some unexpected behaviour, which is probably the reason why such don't get distributed in core. Maybe we should start a collection on Github?
#2
on
2015-05-04 11:49
I like that idea. I'm way too disorganized for that though, but if someone starts I'll try to contribute.
#2.1
on
2015-05-05 02:20
https://github.com/plv8-tools
#2.1.1
on
2015-05-05 07:22
The author does not allow comments to this entry
|
Entry's LinksQuicksearchCalendar
Categories
Blog Administration |