mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-16 22:16:53 +01:00
added ability to query aggregates and attributes straight from the persistent store
This commit is contained in:
@@ -20,7 +20,7 @@ public final class SynchronousDataTransaction: BaseDataTransaction {
|
||||
*/
|
||||
public func commitAndWait() {
|
||||
|
||||
HardcoreData.assert(self.transactionQueue.isCurrentExecutionContext(), "Attempted to commit a <\(self.dynamicType)> outside a transaction queue.")
|
||||
HardcoreData.assert(self.transactionQueue.isCurrentExecutionContext(), "Attempted to commit a <\(self.dynamicType)> outside its designated queue.")
|
||||
HardcoreData.assert(!self.isCommitted, "Attempted to commit a <\(self.dynamicType)> more than once.")
|
||||
|
||||
self.isCommitted = true
|
||||
@@ -35,6 +35,7 @@ public final class SynchronousDataTransaction: BaseDataTransaction {
|
||||
*/
|
||||
public func beginSynchronous(closure: (transaction: SynchronousDataTransaction) -> Void) -> SaveResult? {
|
||||
|
||||
HardcoreData.assert(self.transactionQueue.isCurrentExecutionContext(), "Attempted to begin a child transaction from a <\(self.dynamicType)> outside its designated queue.")
|
||||
HardcoreData.assert(!self.isCommitted, "Attempted to begin a child transaction from an already committed <\(self.dynamicType)>.")
|
||||
|
||||
return SynchronousDataTransaction(
|
||||
|
||||
Reference in New Issue
Block a user