File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ - (void)viewDidLoad {
65
65
66
66
67
67
[self insertOrUpdate ];
68
+
68
69
69
70
// Do any additional setup after loading the view, typically from a nib.
70
71
}
@@ -102,7 +103,7 @@ - (void)insertOrUpdate {
102
103
[PersonTag tagWithID: 4 des: @" E" ],];
103
104
104
105
NSMutableArray <Person *> *arrM = [NSMutableArray new ];
105
- for ( int i = 0 ; i < 20 ; i ++ ) {
106
+ for ( int i = 0 ; i < 4000 ; i ++ ) {
106
107
Person *sj = [Person new ];
107
108
sj.personID = i;
108
109
sj.name = @" sj" ;
@@ -148,7 +149,11 @@ - (void)update {
148
149
// mixed
149
150
[tagsM addObject: person.tags.firstObject];
150
151
[[SJDatabaseMap sharedServer ] update: person insertedOrUpdatedValues: @{@" tags" :tagsM, @" goods" :person.goods .firstObject } callBlock: ^(BOOL r) {
151
- NSLog (@" end" );
152
+
153
+
154
+ // query sample
155
+ [self queryWithDict: @{@" personID" :@" 33" }];
156
+
152
157
}];
153
158
}];
154
159
@@ -192,6 +197,8 @@ - (void)query {
192
197
193
198
- (void )queryWithDict : (NSDictionary *)dict {
194
199
[[SJDatabaseMap sharedServer ] queryDataWithClass: [Person class ] queryDict: dict completeCallBlock: ^(NSArray <id <SJDBMapUseProtocol>> * _Nullable data) {
200
+
201
+ // query result
195
202
[data enumerateObjectsUsingBlock: ^(id <SJDBMapUseProtocol> _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
196
203
NSLog (@" %@ " , obj);
197
204
}];
You can’t perform that action at this time.
0 commit comments