[PR #75] [CLOSED] Add convenient truncate methods to transaction #457

Closed
opened 2025-12-29 15:32:14 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JohnEstropia/CoreStore/pull/75
Author: @ghost
Created: 5/27/2016
Status: Closed

Base: corestore2_developHead: corestore2_develop


📝 Commits (1)

  • 2c9c115 Add convenient truncate methods to transaction

📊 Changes

2 files changed (+51 additions, -0 deletions)

View changed files

📝 CoreStore.xcodeproj/project.pbxproj (+12 -0)
Sources/Convenience/BaseDataTransaction+Convenience.swift (+39 -0)

📄 Description

Provides a convenient method for deleting all entities from DataStack with the ability to preserve some entities.

Sample usage:

transaction.truncateDataStack(shouldSkip: { (entity) -> Bool in
    return (entity == Favorite.self)
})

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/JohnEstropia/CoreStore/pull/75 **Author:** [@ghost](https://github.com/ghost) **Created:** 5/27/2016 **Status:** ❌ Closed **Base:** `corestore2_develop` ← **Head:** `corestore2_develop` --- ### 📝 Commits (1) - [`2c9c115`](https://github.com/JohnEstropia/CoreStore/commit/2c9c1158abbf519a4ef24e7c8be815030ec32695) Add convenient truncate methods to transaction ### 📊 Changes **2 files changed** (+51 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `CoreStore.xcodeproj/project.pbxproj` (+12 -0) ➕ `Sources/Convenience/BaseDataTransaction+Convenience.swift` (+39 -0) </details> ### 📄 Description Provides a convenient method for deleting all entities from DataStack with the ability to preserve some entities. Sample usage: ``` transaction.truncateDataStack(shouldSkip: { (entity) -> Bool in return (entity == Favorite.self) }) ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 15:32:14 +01:00
adam closed this issue 2025-12-29 15:32:14 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore#457