Concept Flow - RENAME and RENAMENX
Start
Check if source key exists
Yes
For RENAME:
Rename key, overwrite if target exists
Return OK
End
For RENAMENX:
Check if target key exists
No
Rename key
Return 1
End
If target exists in RENAMENX
Do not rename
Return 0
End
The flow checks if the source key exists, then for RENAME it renames and overwrites target if exists, while RENAMENX renames only if target does not exist.