Skip to content

Commit

Permalink
Merge pull request #240 from olgadanylova/master
Browse files Browse the repository at this point in the history
5.6.0
  • Loading branch information
Olha Danylova authored Nov 15, 2019
2 parents 9e96826 + 192ded1 commit 3ca3311
Show file tree
Hide file tree
Showing 31 changed files with 70 additions and 12 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# RELEASE HISTORY

## 5.6.0 November 15, 2019
* added methods to the DataQueryBuilder:
```
-(NSNumber *)getRelationsPageSize;
-(instancetype)setRelationsPageSize:(int)relationsPageSize;
```

## 5.5.0 October 8, 2019
* fixed the device registration for iOS 13 and above

Expand Down
4 changes: 2 additions & 2 deletions Pods/Backendless.podspec

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion SDK/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 5cd4b8ef98be7dc5a7082de9b679e21d33e284c4

COCOAPODS: 1.8.1
COCOAPODS: 1.8.4
2 changes: 2 additions & 0 deletions SDK/backendlessAPI/Classes/Persistence/DataQueryBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,7 @@
-(instancetype)addGroupByProperty:(NSString *)groupBy;
-(instancetype)addGroupByProperies:(NSArray<NSString *> *)groupBy;
-(instancetype)setHavingClause:(NSString *)havingClause;
-(NSNumber *)getRelationsPageSize;
-(instancetype)setRelationsPageSize:(int)relationsPageSize;

@end
9 changes: 9 additions & 0 deletions SDK/backendlessAPI/Classes/Persistence/DataQueryBuilder.m
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,13 @@ -(instancetype)setHavingClause:(NSString *)havingClause {
return self;
}

-(NSNumber *)getRelationsPageSize {
return [_queryOptionsBuilder getRelationsPageSize];
}

-(instancetype)setRelationsPageSize:(int)relationsPageSize {
[_queryOptionsBuilder setRelationsPageSize:relationsPageSize];
return self;
}

@end
8 changes: 4 additions & 4 deletions SDK/backendlessAPI/Classes/Persistence/MapDrivenDataStore.m
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ -(id)findFirst:(DataQueryBuilder *)queryBuilder {
if (!queryBuilder) {
return [backendless throwFault:FAULT_FIELD_IS_NULL];
}
NSArray *args = @[_tableName, [queryBuilder getRelated]?[queryBuilder getRelated]:@[], [queryBuilder getRelationsDepth]?[queryBuilder getRelationsDepth]:[NSNull null], [queryBuilder getProperties]];
NSArray *args = @[_tableName, [queryBuilder getRelated]?[queryBuilder getRelated]:@[], [queryBuilder getRelationsDepth]?[queryBuilder getRelationsDepth]:[NSNull null], [queryBuilder getProperties], [queryBuilder getRelationsPageSize]?[queryBuilder getRelationsPageSize]:[NSNull null]];
id result = [invoker invokeSync:SERVER_PERSISTENCE_SERVICE_PATH method:METHOD_FIRST args:args responseAdapter:[MapAdapter new]];
if ([result isKindOfClass:[Fault class]]) {
return [backendless throwFault:result];
Expand All @@ -193,7 +193,7 @@ -(id)findLast:(DataQueryBuilder *)queryBuilder {
if (!queryBuilder) {
return [backendless throwFault:FAULT_FIELD_IS_NULL];
}
NSArray *args = @[_tableName, [queryBuilder getRelated]?[queryBuilder getRelated]:@[], [queryBuilder getRelationsDepth]?[queryBuilder getRelationsDepth]:[NSNull null], [queryBuilder getProperties]];
NSArray *args = @[_tableName, [queryBuilder getRelated]?[queryBuilder getRelated]:@[], [queryBuilder getRelationsDepth]?[queryBuilder getRelationsDepth]:[NSNull null], [queryBuilder getProperties], [queryBuilder getRelationsPageSize]?[queryBuilder getRelationsPageSize]:[NSNull null]];
id result = [invoker invokeSync:SERVER_PERSISTENCE_SERVICE_PATH method:METHOD_LAST args:args responseAdapter:[MapAdapter new]];
if ([result isKindOfClass:[Fault class]]) {
return [backendless throwFault:result];
Expand Down Expand Up @@ -380,7 +380,7 @@ -(void)findFirst:(void(^)(id))responseBlock error:(void(^)(Fault *))errorBlock {
}

-(void)findFirst:(DataQueryBuilder *)queryBuilder response:(void(^)(id))responseBlock error:(void(^)(Fault *))errorBlock {
NSArray *args = @[_tableName, [queryBuilder getRelated]?[queryBuilder getRelated]:@[], [queryBuilder getRelationsDepth]?[queryBuilder getRelationsDepth]:[NSNull null], [queryBuilder getProperties]];
NSArray *args = @[_tableName, [queryBuilder getRelated]?[queryBuilder getRelated]:@[], [queryBuilder getRelationsDepth]?[queryBuilder getRelationsDepth]:[NSNull null], [queryBuilder getProperties], [queryBuilder getRelationsPageSize]?[queryBuilder getRelationsPageSize]:[NSNull null]];
Responder *responder = [ResponderBlocksContext responderBlocksContext:responseBlock error:errorBlock];
[invoker invokeAsync:SERVER_PERSISTENCE_SERVICE_PATH method:METHOD_FIRST args:args responder:responder responseAdapter:[MapAdapter new]];
}
Expand All @@ -392,7 +392,7 @@ -(void)findLast:(void(^)(id))responseBlock error:(void(^)(Fault *))errorBlock {
}

-(void)findLast:(DataQueryBuilder *)queryBuilder response:(void(^)(id))responseBlock error:(void(^)(Fault *))errorBlock {
NSArray *args = @[_tableName, [queryBuilder getRelated]?[queryBuilder getRelated]:@[], [queryBuilder getRelationsDepth]?[queryBuilder getRelationsDepth]:[NSNull null], [queryBuilder getProperties]];
NSArray *args = @[_tableName, [queryBuilder getRelated]?[queryBuilder getRelated]:@[], [queryBuilder getRelationsDepth]?[queryBuilder getRelationsDepth]:[NSNull null], [queryBuilder getProperties], [queryBuilder getRelationsPageSize]?[queryBuilder getRelationsPageSize]:[NSNull null]];
Responder *responder = [ResponderBlocksContext responderBlocksContext:responseBlock error:errorBlock];
[invoker invokeAsync:SERVER_PERSISTENCE_SERVICE_PATH method:METHOD_LAST args:args responder:responder responseAdapter:[MapAdapter new]];
}
Expand Down
8 changes: 4 additions & 4 deletions SDK/backendlessAPI/Classes/Persistence/PersistenceService.m
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ -(id)first:(Class)entity queryBuilder:(DataQueryBuilder *)queryBuilder {
}
[self prepareClass:entity];
NSString *entityName = [self getEntityName:[self typeClassName:entity]];
NSArray *args = @[entityName, [queryBuilder getRelated], [queryBuilder getRelationsDepth]?[queryBuilder getRelationsDepth]:[NSNull null], [queryBuilder getProperties]];
NSArray *args = @[entityName, [queryBuilder getRelated], [queryBuilder getRelationsDepth]?[queryBuilder getRelationsDepth]:[NSNull null], [queryBuilder getProperties], [queryBuilder getRelationsPageSize]?[queryBuilder getRelationsPageSize]:[NSNull null]];
id result = [invoker invokeSync:SERVER_PERSISTENCE_SERVICE_PATH method:METHOD_FIRST args:args responseAdapter:[[AdapterFactory new] adapterForClassName:entityName]];
if ([result isKindOfClass:[Fault class]]) {
return [backendless throwFault:result];
Expand Down Expand Up @@ -350,7 +350,7 @@ -(id)last:(Class)entity queryBuilder:(DataQueryBuilder *)queryBuilder {
}
[self prepareClass:entity];
NSString *entityName = [self getEntityName:[self typeClassName:entity]];
NSArray *args = @[entityName, [queryBuilder getRelated], [queryBuilder getRelationsDepth]?[queryBuilder getRelationsDepth]:[NSNull null], [queryBuilder getProperties]];
NSArray *args = @[entityName, [queryBuilder getRelated], [queryBuilder getRelationsDepth]?[queryBuilder getRelationsDepth]:[NSNull null], [queryBuilder getProperties], [queryBuilder getRelationsPageSize]?[queryBuilder getRelationsPageSize]:[NSNull null]];
id result = [invoker invokeSync:SERVER_PERSISTENCE_SERVICE_PATH method:METHOD_LAST args:args responseAdapter:[[AdapterFactory new] adapterForClassName:entityName]];
if ([result isKindOfClass:[Fault class]]) {
return [backendless throwFault:result];
Expand Down Expand Up @@ -818,7 +818,7 @@ -(void)first:(Class)entity queryBuilder:(DataQueryBuilder *)queryBuilder respons
}
[self prepareClass:entity];
NSString *entityName = [self getEntityName:[self typeClassName:entity]];
NSArray *args = @[entityName, [queryBuilder getRelated], [queryBuilder getRelationsDepth]?[queryBuilder getRelationsDepth]:[NSNull null], [queryBuilder getProperties]];
NSArray *args = @[entityName, [queryBuilder getRelated], [queryBuilder getRelationsDepth]?[queryBuilder getRelationsDepth]:[NSNull null], [queryBuilder getProperties], [queryBuilder getRelationsPageSize]?[queryBuilder getRelationsPageSize]:[NSNull null]];
[invoker invokeAsync:SERVER_PERSISTENCE_SERVICE_PATH method:METHOD_FIRST args:args responder:chainedResponder responseAdapter:[[AdapterFactory new] adapterForClassName:entityName]];
}

Expand All @@ -840,7 +840,7 @@ -(void)last:(Class)entity queryBuilder:(DataQueryBuilder *)queryBuilder response
}
[self prepareClass:entity];
NSString *entityName = [self getEntityName:[self typeClassName:entity]];
NSArray *args = @[entityName, [queryBuilder getRelated], [queryBuilder getRelationsDepth]?[queryBuilder getRelationsDepth]:[NSNull null], [queryBuilder getProperties]];
NSArray *args = @[entityName, [queryBuilder getRelated], [queryBuilder getRelationsDepth]?[queryBuilder getRelationsDepth]:[NSNull null], [queryBuilder getProperties], [queryBuilder getRelationsPageSize]?[queryBuilder getRelationsPageSize]:[NSNull null]];
[invoker invokeAsync:SERVER_PERSISTENCE_SERVICE_PATH method:METHOD_LAST args:args responder:chainedResponder responseAdapter:[[AdapterFactory new] adapterForClassName:entityName]];
}

Expand Down
1 change: 1 addition & 0 deletions SDK/backendlessAPI/Classes/Persistence/QueryOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
@property (strong, nonatomic) NSMutableArray<NSString*> *sortBy;
@property (strong, nonatomic) NSMutableArray<NSString*> *related;
@property (strong, nonatomic) NSNumber *relationsDepth;
@property (strong, nonatomic) NSNumber *relationsPageSize;

+(instancetype)query;
-(BOOL)addSortByOption:(NSString *)sortBy;
Expand Down
2 changes: 2 additions & 0 deletions SDK/backendlessAPI/Classes/Persistence/QueryOptionsBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
-(id)addListRelated:(NSArray<NSString *> *)related;
-(NSNumber *)getRelationsDepth;
-(id)setRelationsDepth:(int)relationsDepth;
-(NSNumber *)getRelationsPageSize;
-(id)setRelationsPageSize:(int)relationsPageSize;

@end

Expand Down
12 changes: 12 additions & 0 deletions SDK/backendlessAPI/Classes/Persistence/QueryOptionsBuilder.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ @interface QueryOptionsBuilder () {
NSMutableArray<NSString *> *_sortBy;
NSMutableArray<NSString *> *_related;
NSNumber *_relationsDepth;
NSNumber *_relationsPageSize;
id _builder;
}
@end
Expand All @@ -39,6 +40,7 @@ -(instancetype)init {
_related = [NSMutableArray new];
_builder = nil;
_relationsDepth = nil;
_relationsPageSize = nil;
}
return self;
}
Expand Down Expand Up @@ -66,6 +68,7 @@ -(QueryOptions *)build {
queryOptions.sortBy = [[NSMutableArray alloc] initWithArray:_sortBy];
queryOptions.related = [[NSMutableArray alloc] initWithArray:_related];
queryOptions.relationsDepth = _relationsDepth;
queryOptions.relationsPageSize = _relationsPageSize;
return queryOptions;
}

Expand Down Expand Up @@ -128,4 +131,13 @@ -(id)setRelationsDepth:(int)relationsDepth {
return _builder;
}

-(NSNumber *)getRelationsPageSize {
return _relationsPageSize;
}

-(id)setRelationsPageSize:(int)relationsPageSize {
_relationsPageSize = @(relationsPageSize);
return _builder;
}

@end
1 change: 0 additions & 1 deletion SDK/backendlessAPI/Classes/RT/RTClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ -(void)connectSocket:(void(^)(void))connected {
if (!socketCreated) {
NSString *path = [@"/" stringByAppendingString:[backendless getAppId]];
NSURL *url = [NSURL URLWithString:[RTHelper lookup]];

NSString *clientId = @"";

#if !TARGET_OS_WATCH
Expand Down
Binary file modified SDK/ios/backendless/backendless.a
Binary file not shown.
2 changes: 2 additions & 0 deletions SDK/ios/backendless/include/DataQueryBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,7 @@
-(instancetype)addGroupByProperty:(NSString *)groupBy;
-(instancetype)addGroupByProperies:(NSArray<NSString *> *)groupBy;
-(instancetype)setHavingClause:(NSString *)havingClause;
-(NSNumber *)getRelationsPageSize;
-(instancetype)setRelationsPageSize:(int)relationsPageSize;

@end
1 change: 1 addition & 0 deletions SDK/ios/backendless/include/QueryOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
@property (strong, nonatomic) NSMutableArray<NSString*> *sortBy;
@property (strong, nonatomic) NSMutableArray<NSString*> *related;
@property (strong, nonatomic) NSNumber *relationsDepth;
@property (strong, nonatomic) NSNumber *relationsPageSize;

+(instancetype)query;
-(BOOL)addSortByOption:(NSString *)sortBy;
Expand Down
Loading

0 comments on commit 3ca3311

Please sign in to comment.