-
-
Notifications
You must be signed in to change notification settings - Fork 982
FR: Add Interfaces to Destroy File Database Entries #6437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
WithoutPants
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For WP: I changed up the verbage of the variables a little bit as I felt like "DestroyFiles" could be misinterpreted by users. I kept the logic the same but modified it to "DestroyFileEntries"
You've named it deleteFileEntries which is inconsistent with other destroy operations. I personally think destroyFiles is fine, assuming that it is properly documented, but destroyFileEntries is still better than the current naming.
Yep, sorry went through like 4-5 naming various before pushing lol. I modified it up to use the |
|
Why are the destroy methods using |
|
It was used as a shortcut to make the parameter optional without updating existing callers. I can refactor it to use a regular bool parameter and update all call sites if you would prefer. |
Yeah it doesn't feel very idiomatic to me this way. The alternative is to have an options struct, but either way its a change to the calling code, and a regular bool parameter is simplest. |
This PR allows users to delete database duplicate entries via the playground. I was able to add a dummy secondary data to some images that were located in my database and then delete them accordingly.
For WP: I changed up the verbage of the variables a little bit as I felt like "DestroyFiles" could be misinterpreted by users. I kept the logic the same but modified it to "DestroyFileEntries"
This example deletes an entry with the ID of 10:
This is an example of removing a primary entry. It should error out and let the user know that it is a primary entry:
Also added
destroy_file_entryoption to SceneDestroyInput, ScenesDestroyInput, ImageDestroyInput, ImagesDestroyInput, and GalleryDestroyInput. This allows deleting the file DB entry (without removing the actual file) when destroying content.fixes: #6355