-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathTestQuery.m
More file actions
32 lines (27 loc) · 880 Bytes
/
TestQuery.m
File metadata and controls
32 lines (27 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#import "TestQuery.h"
#import "SlimList.h"
#import "SlimListSerializer.h"
@implementation TestQuery
@synthesize number;
-(id) initWithString:(NSString*) givenString {
if ((self = [super init])) {
self.number = [givenString intValue];
}
return self;
}
-(NSString*) query {
NSLog(@"number :%d", self.number);
SlimList* list = SlimList_Create();
SlimList* subList = SlimList_Create();
SlimList* subSubList = SlimList_Create();
SlimList_AddString(subSubList, "n");
SlimList_AddString(subSubList, "1");
SlimList* subSubList2 = SlimList_Create();
SlimList_AddString(subSubList2, "2n");
SlimList_AddString(subSubList2, "2");
SlimList_AddList(subList, subSubList);
SlimList_AddList(subList, subSubList2);
SlimList_AddList(list, subList);
return [NSString stringWithUTF8String: SlimList_Serialize(list)];
}
@end