Libraryless. Click here for Pure Java version (20163L/122K).
svoid cMigrateField(Concept c, S oldField, S newField) { if (c == null) ret; O oldValue = cget(c, oldField); O newValue = cget(c, newField); if (oldValue != null && newValue == null) pcall { S name = shortDynName(c); print("Migrating " + name + "." + oldField + " -> " + name + "." + newField + " [id " + c.id + "]"); cset(c, newField, oldValue); cset(c, oldField, null); } }
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034366 |
Snippet name: | cMigrateField |
Eternal ID of this version: | #1034366/2 |
Text MD5: | d3b72c973b3879f8b039285bc85920b2 |
Transpilation MD5: | 27f78101c7b4cb618d604a24b6a909c7 |
Author: | stefan |
Category: | javax / concepts |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-02-03 08:23:25 |
Source code size: | 411 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 143 / 208 |
Version history: | 1 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |