We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1806be3 commit 66ddb8cCopy full SHA for 66ddb8c
YTKKeyValueStore/YTKKeyValueStore/YTKTable.swift
@@ -81,9 +81,9 @@ public struct YTKTable{
81
82
if let filter = self.query?.filter(ID == set.objectId).limit(1){
83
if filter.isEmpty{
84
- return self.query!.insert(ID <- set.objectId , JSON <- jsonString! , CREATEDTIME <- NSDate())
+ return filter.insert(ID <- set.objectId , JSON <- jsonString! , CREATEDTIME <- NSDate())
85
}else{
86
- return self.query!.update(JSON <- jsonString! , CREATEDTIME <- NSDate() )
+ return filter.update(JSON <- jsonString! , CREATEDTIME <- NSDate() )
87
}
88
89
return nil
@@ -130,4 +130,4 @@ public struct YTKTable{
130
131
132
133
-}
+}
0 commit comments