nano-store 0.5.2 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/{CHANGELOG → CHANGELOG.md} +7 -0
- data/README.md +5 -1
- data/Rakefile +1 -1
- data/lib/nano_store.rb +1 -1
- data/lib/nano_store/finder.rb +10 -2
- data/lib/nano_store/model.rb +7 -7
- data/lib/nano_store/version.rb +1 -1
- data/spec/association_spec.rb +6 -6
- data/spec/finder_spec.rb +2 -0
- data/spec/model_spec.rb +33 -3
- data/spec/nano_store_spec.rb +5 -0
- data/spec/spec_helper.rb +14 -0
- data/vendor/Podfile.lock +3 -3
- data/vendor/Pods/BuildHeaders/NanoStore/NSFNanoBag.h +6 -1
- data/vendor/Pods/BuildHeaders/NanoStore/NSFNanoEngine.h +5 -0
- data/vendor/Pods/BuildHeaders/NanoStore/NSFNanoEngine_Private.h +2 -0
- data/vendor/Pods/BuildHeaders/NanoStore/NSFNanoExpression.h +6 -0
- data/vendor/Pods/BuildHeaders/NanoStore/NSFNanoExpression_Private.h +1 -1
- data/vendor/Pods/BuildHeaders/NanoStore/NSFNanoGlobals.h +5 -1
- data/vendor/Pods/BuildHeaders/NanoStore/NSFNanoGlobals_Private.h +6 -2
- data/vendor/Pods/BuildHeaders/NanoStore/NSFNanoObject.h +15 -3
- data/vendor/Pods/BuildHeaders/NanoStore/NSFNanoObject_Private.h +4 -0
- data/vendor/Pods/BuildHeaders/NanoStore/NSFNanoPredicate.h +6 -1
- data/vendor/Pods/BuildHeaders/NanoStore/NSFNanoResult.h +5 -0
- data/vendor/Pods/BuildHeaders/NanoStore/NSFNanoSearch.h +16 -2
- data/vendor/Pods/BuildHeaders/NanoStore/NSFNanoSortDescriptor.h +7 -1
- data/vendor/Pods/BuildHeaders/NanoStore/NSFNanoStore.h +12 -0
- data/vendor/Pods/BuildHeaders/NanoStore/NSFNanoStore_Private.h +3 -1
- data/vendor/Pods/BuildHeaders/NanoStore/NSFOrderedDictionary.h +33 -0
- data/vendor/Pods/BuildHeaders/NanoStore/NanoStore.h +36 -0
- data/vendor/Pods/Headers/NanoStore/NSFNanoBag.h +6 -1
- data/vendor/Pods/Headers/NanoStore/NSFNanoEngine.h +5 -0
- data/vendor/Pods/Headers/NanoStore/NSFNanoEngine_Private.h +2 -0
- data/vendor/Pods/Headers/NanoStore/NSFNanoExpression.h +6 -0
- data/vendor/Pods/Headers/NanoStore/NSFNanoExpression_Private.h +1 -1
- data/vendor/Pods/Headers/NanoStore/NSFNanoGlobals.h +5 -1
- data/vendor/Pods/Headers/NanoStore/NSFNanoGlobals_Private.h +6 -2
- data/vendor/Pods/Headers/NanoStore/NSFNanoObject.h +15 -3
- data/vendor/Pods/Headers/NanoStore/NSFNanoObject_Private.h +4 -0
- data/vendor/Pods/Headers/NanoStore/NSFNanoPredicate.h +6 -1
- data/vendor/Pods/Headers/NanoStore/NSFNanoResult.h +5 -0
- data/vendor/Pods/Headers/NanoStore/NSFNanoSearch.h +16 -2
- data/vendor/Pods/Headers/NanoStore/NSFNanoSortDescriptor.h +7 -1
- data/vendor/Pods/Headers/NanoStore/NSFNanoStore.h +12 -0
- data/vendor/Pods/Headers/NanoStore/NSFNanoStore_Private.h +3 -1
- data/vendor/Pods/Headers/NanoStore/NSFOrderedDictionary.h +33 -0
- data/vendor/Pods/Headers/NanoStore/NanoStore.h +36 -0
- data/vendor/Pods/NanoStore/Classes/Advanced/NSFNanoEngine.h +5 -0
- data/vendor/Pods/NanoStore/Classes/Advanced/NSFNanoEngine.m +142 -131
- data/vendor/Pods/NanoStore/Classes/Advanced/NSFNanoResult.h +5 -0
- data/vendor/Pods/NanoStore/Classes/Advanced/NSFNanoResult.m +148 -51
- data/vendor/Pods/NanoStore/Classes/Advanced/NSFOrderedDictionary.h +33 -0
- data/vendor/Pods/NanoStore/Classes/Advanced/NSFOrderedDictionary.m +148 -0
- data/vendor/Pods/NanoStore/Classes/Private/NSFNanoEngine_Private.h +2 -0
- data/vendor/Pods/NanoStore/Classes/Private/NSFNanoExpression_Private.h +1 -1
- data/vendor/Pods/NanoStore/Classes/Private/NSFNanoGlobals_Private.h +6 -2
- data/vendor/Pods/NanoStore/Classes/Private/NSFNanoObject_Private.h +4 -0
- data/vendor/Pods/NanoStore/Classes/Private/NSFNanoStore_Private.h +3 -1
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoBag.h +6 -1
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoBag.m +126 -117
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoExpression.h +6 -0
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoExpression.m +32 -18
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoGlobals.h +5 -1
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoGlobals.m +6 -3
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoObject.h +15 -3
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoObject.m +152 -31
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoPredicate.h +6 -1
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoPredicate.m +51 -26
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoSearch.h +16 -2
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoSearch.m +156 -115
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoSortDescriptor.h +7 -1
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoSortDescriptor.m +34 -17
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoStore.h +12 -0
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoStore.m +210 -196
- data/vendor/Pods/NanoStore/Classes/Public/NanoStore.h +36 -0
- data/vendor/Pods/NanoStore/README.md +49 -0
- data/vendor/Pods/Pods.bridgesupport +798 -685
- metadata +30 -8
data/{CHANGELOG → CHANGELOG.md}
RENAMED
@@ -1,3 +1,9 @@
|
|
1
|
+
# [0.6.0](https://github.com/siuying/NanoStoreInMotion/compare/v0.5.2%E2%80%A6v0.6.0)
|
2
|
+
|
3
|
+
- Update for NanoStore 2.5.3, some notable changes:
|
4
|
+
- accept nil and NSURL fields in model
|
5
|
+
- can set store per instance
|
6
|
+
|
1
7
|
# [0.5.2](https://github.com/siuying/NanoStoreInMotion/compare/v0.5.1%E2%80%A6v0.5.2)
|
2
8
|
|
3
9
|
- Fix load error on older version of RubyMotion (or that disabled detect_dependencies)
|
@@ -5,6 +11,7 @@
|
|
5
11
|
# [0.5.1](https://github.com/siuying/NanoStoreInMotion/compare/v0.5.0%E2%80%A6v0.5.1)
|
6
12
|
|
7
13
|
- Update to NanoStore 2.1.6
|
14
|
+
- Convert predicate value to string, to fix type error that happen if attriutes are values other than string
|
8
15
|
|
9
16
|
# [0.5.0](https://github.com/siuying/NanoStoreInMotion/compare/v0.4.3%E2%80%A6v0.5.0)
|
10
17
|
|
data/README.md
CHANGED
@@ -4,6 +4,10 @@ Wrapper for NanoStore, a lightweight schema-less key-value document database bas
|
|
4
4
|
|
5
5
|
Status: Work in progress. API subject to change.
|
6
6
|
|
7
|
+
Find a sample application using NanoStore [here](https://github.com/ankit8898/NanoStoreInMotion-example)
|
8
|
+
|
9
|
+
How to use Blog [here](http://ankitinstinct.blogspot.in/2012/12/rubymotion-application-with.html)
|
10
|
+
|
7
11
|
## Installation
|
8
12
|
|
9
13
|
Install the CocoaPods dependency manager if you haven't it already:
|
@@ -29,7 +33,7 @@ Motion::Project::App.setup do |app|
|
|
29
33
|
|
30
34
|
# Add the pod NanoStore to your project
|
31
35
|
app.pods do
|
32
|
-
pod 'NanoStore', '~> 2.
|
36
|
+
pod 'NanoStore', '~> 2.5.3'
|
33
37
|
end
|
34
38
|
end
|
35
39
|
```
|
data/Rakefile
CHANGED
data/lib/nano_store.rb
CHANGED
data/lib/nano_store/finder.rb
CHANGED
@@ -60,7 +60,11 @@ module NanoStore
|
|
60
60
|
searchResults = search.searchObjectsWithReturnType(NSFReturnObjects, error:error_ptr)
|
61
61
|
raise NanoStoreError, error_ptr[0].description if error_ptr[0]
|
62
62
|
|
63
|
-
searchResults
|
63
|
+
if searchResults.is_a?(NSDictionary)
|
64
|
+
searchResults.values
|
65
|
+
else
|
66
|
+
searchResults
|
67
|
+
end
|
64
68
|
end
|
65
69
|
|
66
70
|
# find model keys by criteria
|
@@ -109,7 +113,11 @@ module NanoStore
|
|
109
113
|
searchResults = search.searchObjectsWithReturnType(NSFReturnKeys, error:error_ptr)
|
110
114
|
raise NanoStoreError, error_ptr[0].description if error_ptr[0]
|
111
115
|
|
112
|
-
searchResults
|
116
|
+
if searchResults.is_a?(NSDictionary)
|
117
|
+
searchResults.values
|
118
|
+
else
|
119
|
+
searchResults
|
120
|
+
end
|
113
121
|
end
|
114
122
|
|
115
123
|
# find a model by key
|
data/lib/nano_store/model.rb
CHANGED
@@ -4,7 +4,7 @@ module NanoStore
|
|
4
4
|
raise NanoStoreError, 'No store provided' unless self.class.store
|
5
5
|
|
6
6
|
error_ptr = Pointer.new(:id)
|
7
|
-
self.
|
7
|
+
self.store.addObject(self, error:error_ptr)
|
8
8
|
raise NanoStoreError, error_ptr[0].description if error_ptr[0]
|
9
9
|
self
|
10
10
|
end
|
@@ -13,10 +13,14 @@ module NanoStore
|
|
13
13
|
raise NanoStoreError, 'No store provided' unless self.class.store
|
14
14
|
|
15
15
|
error_ptr = Pointer.new(:id)
|
16
|
-
self.
|
16
|
+
self.store.removeObject(self, error: error_ptr)
|
17
17
|
raise NanoStoreError, error_ptr[0].description if error_ptr[0]
|
18
18
|
self
|
19
19
|
end
|
20
|
+
|
21
|
+
def store
|
22
|
+
super || self.class.store
|
23
|
+
end
|
20
24
|
end
|
21
25
|
|
22
26
|
module ModelClassMethods
|
@@ -46,11 +50,7 @@ module NanoStore
|
|
46
50
|
end
|
47
51
|
|
48
52
|
define_method((name + "=").to_sym) do |*args, &block|
|
49
|
-
|
50
|
-
self.info.delete(name.to_sym)
|
51
|
-
else
|
52
|
-
self.info[name] = args[0]
|
53
|
-
end
|
53
|
+
self.info[name] = args[0]
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
data/lib/nano_store/version.rb
CHANGED
data/spec/association_spec.rb
CHANGED
@@ -46,12 +46,12 @@ describe "Associations" do
|
|
46
46
|
todo.items.is_a?(NanoStore::Bag).should == true
|
47
47
|
todo.save
|
48
48
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
49
|
+
todo = Todo.find(:title => "Today Tasks").first
|
50
|
+
todo.should.not.be.nil
|
51
|
+
todo.items.is_a?(NanoStore::Bag).should == true
|
52
|
+
todo.items.key.should == todo.items.key
|
53
|
+
todo.items.size.should == 3
|
54
|
+
todo.items.to_a.each do |item|
|
55
55
|
item.is_a?(TodoItem).should.be.true
|
56
56
|
end
|
57
57
|
end
|
data/spec/finder_spec.rb
CHANGED
@@ -43,6 +43,8 @@ describe "Finder" do
|
|
43
43
|
it "search object traditional way: supply key, operator and value" do
|
44
44
|
users = User.find(:name, NSFEqualTo, "Bob")
|
45
45
|
users.should.not.be.nil
|
46
|
+
users.is_a?(Array).should.be.true
|
47
|
+
|
46
48
|
user = users.first
|
47
49
|
user.should.not.be.nil
|
48
50
|
user.name.should.be == "Bob"
|
data/spec/model_spec.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
describe NanoStore::Model do
|
2
|
-
|
3
2
|
class User < NanoStore::Model
|
4
3
|
attribute :name
|
5
4
|
attribute :age
|
@@ -14,7 +13,7 @@ describe NanoStore::Model do
|
|
14
13
|
class Listing < NanoStore::Model
|
15
14
|
attribute :name
|
16
15
|
end
|
17
|
-
|
16
|
+
|
18
17
|
def stub_user(name, age, created_at)
|
19
18
|
user = User.new
|
20
19
|
user.name = name
|
@@ -76,7 +75,29 @@ describe NanoStore::Model do
|
|
76
75
|
end
|
77
76
|
|
78
77
|
describe "#save" do
|
79
|
-
it "
|
78
|
+
it "if no store set, create objects using shared store" do
|
79
|
+
user = stub_user("Bob", 10, Time.now)
|
80
|
+
user.save
|
81
|
+
NanoStore.shared_store.count(User).should == 1
|
82
|
+
end
|
83
|
+
|
84
|
+
# per object store since NanoStore 2.5.1
|
85
|
+
it "user per instance store to save" do
|
86
|
+
store1 = NanoStore.store
|
87
|
+
user = stub_user("Bob", 10, Time.now)
|
88
|
+
user.store = store1
|
89
|
+
user.save
|
90
|
+
store1.count(User).should == 1
|
91
|
+
|
92
|
+
store2 = NanoStore.store
|
93
|
+
user2 = stub_user("Lee", 10, Time.now)
|
94
|
+
user2.store = store2
|
95
|
+
user2.save
|
96
|
+
store2.count(User).should == 1
|
97
|
+
store1.count(User).should == 1
|
98
|
+
end
|
99
|
+
|
100
|
+
it "update existing objects" do
|
80
101
|
user = stub_user("Bob", 10, Time.now)
|
81
102
|
user.save
|
82
103
|
|
@@ -87,6 +108,15 @@ describe NanoStore::Model do
|
|
87
108
|
user2 = User.find(:name, NSFEqualTo, "Dom").first
|
88
109
|
user2.key.should == user.key
|
89
110
|
end
|
111
|
+
|
112
|
+
it "create with nil field" do
|
113
|
+
user = stub_user("Bob", 10, nil)
|
114
|
+
user.save
|
115
|
+
|
116
|
+
user1 = User.find(:name, NSFEqualTo, "Bob").first
|
117
|
+
user1.name.should == "Bob"
|
118
|
+
user1.created_at.should.be.nil
|
119
|
+
end
|
90
120
|
end
|
91
121
|
|
92
122
|
describe "#delete" do
|
data/spec/nano_store_spec.rb
CHANGED
@@ -7,6 +7,11 @@ describe NanoStore do
|
|
7
7
|
NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, true)[0]
|
8
8
|
end
|
9
9
|
|
10
|
+
after do
|
11
|
+
path = documents_path + "/nano.db"
|
12
|
+
File.delete(path) rescue nil
|
13
|
+
end
|
14
|
+
|
10
15
|
it "create :memory store" do
|
11
16
|
store = NanoStore.store
|
12
17
|
store.filePath.should == ":memory:"
|
data/spec/spec_helper.rb
ADDED
data/vendor/Podfile.lock
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
|
2
2
|
PODS:
|
3
|
-
- NanoStore (2.
|
3
|
+
- NanoStore (2.5.3)
|
4
4
|
|
5
5
|
DEPENDENCIES:
|
6
|
-
- NanoStore (~> 2.
|
6
|
+
- NanoStore (~> 2.5.3)
|
7
7
|
|
8
8
|
SPEC CHECKSUMS:
|
9
|
-
NanoStore:
|
9
|
+
NanoStore: ea3eabc945dbd7d80678da2b0aed669f683d239f
|
10
10
|
|
11
11
|
COCOAPODS: 0.16.0
|
@@ -302,11 +302,16 @@
|
|
302
302
|
|
303
303
|
/** * Returns a string representation of the bag.
|
304
304
|
* @note Check properties savedObjects, unsavedObjects and removedObjects to find out the current state of the bag.
|
305
|
-
* @see \link dictionaryRepresentation - (NSDictionary *)dictionaryRepresentation \endlink
|
306
305
|
*/
|
307
306
|
|
308
307
|
- (NSString *)description;
|
309
308
|
|
309
|
+
/** Returns a JSON representation of the bag.
|
310
|
+
* @note Check properties savedObjects, unsavedObjects and removedObjects to find out the current state of the bag.
|
311
|
+
*/
|
312
|
+
|
313
|
+
- (NSString *)JSONDescription;
|
314
|
+
|
310
315
|
//@}
|
311
316
|
|
312
317
|
@end
|
@@ -30,10 +30,12 @@
|
|
30
30
|
#import "NSFNanoEngine.h"
|
31
31
|
#import "NSFNanoGlobals_Private.h"
|
32
32
|
#import "NSFNanoResult.h"
|
33
|
+
#import "NSFOrderedDictionary.h"
|
33
34
|
|
34
35
|
/** \cond */
|
35
36
|
|
36
37
|
@interface NSFNanoEngine (Private)
|
38
|
+
- (NSFOrderedDictionary *)dictionaryDescription;
|
37
39
|
+ (NSArray *)NSFP_sharedROWIDKeywords;
|
38
40
|
- (NSString *)NSFP_cacheMethodToString;
|
39
41
|
- (NSString*)NSFP_nestedDescriptionWithPrefixedSpace:(NSString *)prefixedSpace;
|
@@ -120,6 +120,12 @@
|
|
120
120
|
|
121
121
|
- (NSString *)description;
|
122
122
|
|
123
|
+
/** Returns a JSON representation of the expression.
|
124
|
+
* @note Check properties predicates and operators to find out the current state of the expression.
|
125
|
+
*/
|
126
|
+
|
127
|
+
- (NSString *)JSONDescription;
|
128
|
+
|
123
129
|
//@}
|
124
130
|
|
125
131
|
@end
|
@@ -71,7 +71,11 @@ typedef enum {
|
|
71
71
|
/** * Used to store NSDate elements in the format <i>yyyy-MM-dd HH:mm:ss:SSS</i>. Its string equivalent is <b>TEXT</b>. */
|
72
72
|
NSFNanoTypeDate,
|
73
73
|
/** * Used to store NSNumber elements. Its string equivalent is <b>REAL</b>. */
|
74
|
-
NSFNanoTypeNumber
|
74
|
+
NSFNanoTypeNumber,
|
75
|
+
/** * Used to store NSNull elements. Its string equivalent is <b>NULL</b>. */
|
76
|
+
NSFNanoTypeNULL,
|
77
|
+
/** * Used to store NSURL elements. Its string equivalent is <b>URL</b>. */
|
78
|
+
NSFNanoTypeURL
|
75
79
|
} NSFNanoDatatype;
|
76
80
|
|
77
81
|
/** * Returns the name of a NSFNanoDatatype datatype as a string. */
|
@@ -53,6 +53,10 @@
|
|
53
53
|
|
54
54
|
*/
|
55
55
|
|
56
|
+
extern NSDictionary * safeJSONDictionaryFromDictionary (NSDictionary *dictionary);
|
57
|
+
extern NSArray * safeJSONArrayFromArray (NSArray *array);
|
58
|
+
extern id safeJSONObjectFromObject (id object);
|
59
|
+
|
56
60
|
extern NSString * NSFStringFromMatchType (NSFMatchType aMatchType);
|
57
61
|
|
58
62
|
extern void _NSFLog (NSString *format, ...);
|
@@ -67,13 +71,13 @@ extern NSString * const NSFValue;
|
|
67
71
|
extern NSString * const NSFDatatype;
|
68
72
|
extern NSString * const NSFCalendarDate;
|
69
73
|
extern NSString * const NSFObjectClass;
|
70
|
-
extern NSString * const
|
74
|
+
extern NSString * const NSFKeyedArchive;
|
71
75
|
extern NSString * const NSFAttribute;
|
72
76
|
|
73
77
|
#pragma mark -
|
74
78
|
|
75
79
|
extern NSString * const NSF_Private_NSFKeys_NSFKey;
|
76
|
-
extern NSString * const
|
80
|
+
extern NSString * const NSF_Private_NSFKeys_NSFKeyedArchive;
|
77
81
|
extern NSString * const NSF_Private_NSFValues_NSFKey;
|
78
82
|
extern NSString * const NSF_Private_NSFValues_NSFAttribute;
|
79
83
|
extern NSString * const NSF_Private_NSFValues_NSFValue;
|
@@ -181,6 +181,8 @@
|
|
181
181
|
|
182
182
|
@interface NSFNanoObject : NSObject <NSFNanoObjectProtocol, NSCopying>
|
183
183
|
|
184
|
+
/** * The store where the object is saved. */
|
185
|
+
@property (nonatomic, weak, readonly) NSFNanoStore *store;
|
184
186
|
/** * The UUID of the NanoObject. */
|
185
187
|
@property (nonatomic, copy, readonly) NSString *key;
|
186
188
|
/** * The user-supplied information of the NanoObject. */
|
@@ -304,6 +306,13 @@
|
|
304
306
|
|
305
307
|
- (BOOL)isEqualToNanoObject:(NSFNanoObject *)otherNanoObject;
|
306
308
|
|
309
|
+
/** * Saves the uncommitted changes to the document store.
|
310
|
+
* @param outError is used if an error occurs. May be NULL.
|
311
|
+
* @return YES upon success, NO otherwise.
|
312
|
+
*/
|
313
|
+
|
314
|
+
- (BOOL)saveStoreAndReturnError:(out NSError **)outError;
|
315
|
+
|
307
316
|
/** * Returns a dictionary that contains the information stored in the object.
|
308
317
|
* @note Check properties info and key to find out the current state of the object.
|
309
318
|
* @see \link description - (NSString *)description \endlink
|
@@ -311,13 +320,16 @@
|
|
311
320
|
|
312
321
|
- (NSDictionary *)dictionaryRepresentation;
|
313
322
|
|
314
|
-
/** * Returns a string representation of the
|
315
|
-
* @note Check properties info and key to find out the current state of the object.
|
316
|
-
* @see \link dictionaryRepresentation - (NSString *)dictionaryRepresentation \endlink
|
323
|
+
/** * Returns a string representation of the nano object.
|
317
324
|
*/
|
318
325
|
|
319
326
|
- (NSString *)description;
|
320
327
|
|
328
|
+
/** Returns a JSON representation of the nano object.
|
329
|
+
*/
|
330
|
+
|
331
|
+
- (NSString *)JSONDescription;
|
332
|
+
|
321
333
|
//@}
|
322
334
|
|
323
335
|
@end
|
@@ -30,6 +30,10 @@
|
|
30
30
|
|
31
31
|
@interface NSFNanoObject (Private)
|
32
32
|
- (void)_setOriginalClassString:(NSString *)theClassString;
|
33
|
+
+ (NSString *)_NSObjectToJSONString:(id)object error:(NSError **)error;
|
34
|
+
+ (NSDictionary *)_safeDictionaryFromDictionary:(NSDictionary *)dictionary;
|
35
|
+
+ (NSArray *)_safeArrayFromArray:(NSArray *)array;
|
36
|
+
+ (id)_safeObjectFromObject:(id)object;
|
33
37
|
@end
|
34
38
|
|
35
39
|
/** \endcond */
|
@@ -113,11 +113,16 @@
|
|
113
113
|
|
114
114
|
/** * Returns a string representation of the predicate.
|
115
115
|
* @note Check properties column, match and value to find out the current state of the predicate.
|
116
|
-
* @see \link description - (NSString *)description \endlink
|
117
116
|
*/
|
118
117
|
|
119
118
|
- (NSString *)description;
|
120
119
|
|
120
|
+
/** * Returns a JSON representation of the predicate.
|
121
|
+
* @note Check properties column, match and value to find out the current state of the predicate.
|
122
|
+
*/
|
123
|
+
|
124
|
+
- (NSString *)JSONDescription;
|
125
|
+
|
121
126
|
//@}
|
122
127
|
|
123
128
|
@end
|