Skip to content

Commit 42bb5ac

Browse files
committed
Update sample
1 parent 4db8246 commit 42bb5ac

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

SJDBMapProject/ViewController.m

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ - (void)viewDidLoad {
6565

6666

6767
[self insertOrUpdate];
68+
6869

6970
// Do any additional setup after loading the view, typically from a nib.
7071
}
@@ -102,7 +103,7 @@ - (void)insertOrUpdate {
102103
[PersonTag tagWithID:4 des:@"E"],];
103104

104105
NSMutableArray <Person *> *arrM = [NSMutableArray new];
105-
for ( int i = 0 ; i < 20 ; i ++ ) {
106+
for ( int i = 0 ; i < 4000 ; i ++ ) {
106107
Person *sj = [Person new];
107108
sj.personID = i;
108109
sj.name = @"sj";
@@ -148,7 +149,11 @@ - (void)update {
148149
// mixed
149150
[tagsM addObject:person.tags.firstObject];
150151
[[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+
152157
}];
153158
}];
154159

@@ -192,6 +197,8 @@ - (void)query {
192197

193198
- (void)queryWithDict:(NSDictionary *)dict {
194199
[[SJDatabaseMap sharedServer] queryDataWithClass:[Person class] queryDict:dict completeCallBlock:^(NSArray<id<SJDBMapUseProtocol>> * _Nullable data) {
200+
201+
// query result
195202
[data enumerateObjectsUsingBlock:^(id<SJDBMapUseProtocol> _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
196203
NSLog(@"%@", obj);
197204
}];

0 commit comments

Comments
 (0)