Created
June 11, 2025 08:09
-
-
Save andreievg/7036c79f5ee430a2c129067e52ab9e24 to your computer and use it in GitHub Desktop.
4D database diff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// FOR SMALL DATABASES ONLY | |
// mkdir /Users/andreievg/Documents/playground/4ddatabasediff/ | |
// cd /Users/andreievg/Documents/playground/4ddatabasediff/ | |
// git init | |
// github (opens github desktop) | |
// run this method (put breakpoint at the end to know it's finished) | |
// commit | |
// do some operations | |
// see diff | |
$tBasefolder:="/Users/andreievg/Documents/playground/4ddatabasediff/" | |
For each ($tableName; OB Keys(ds)) | |
$records:=ds[$tableName].all() | |
File($tBasefolder+$tableName+".json").setText(JSON Stringify($records.toCollection(); *); "UTF-8"; Document with LF) | |
End for each |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment