Length¶
Description¶
This operation counts and returns the number of values in the list.
Method¶
[[[Backendless.shared hive:(NSString *)hiveName] listStore:(NSString *)keyName] lengthWithResponseHandler:^(NSInteger)responseHandler errorHandler:^(Fault *)errorHandler];
Backendless.shared.hive(hiveName: String).listStore(keyName: String).length(responseHandler: ((Int) -> Void)!, errorHandler: ((Fault) -> Void)!)
where:
Argument | Description |
---|---|
hiveName |
Name of a hive where the operation is performed. String value. |
keyName |
Key name identifying a list. String value. |
The total number of values stored in the specified list.
Example¶
The example below returns the total number of items stored in the "fruits"
list.
[[[Backendless.shared hive:@"groceryStore"] listStore:@"fruits"] lengthWithResponseHandler:^(NSInteger response) {
// handle response
} errorHandler:^(Fault *fault) {
// handle error
}];
Backendless.shared.hive("groceryStore").listStore("fruits").length(responseHandler: { response in
// handle response
}, errorHandler: { fault in
// handle error
})
where:
Argument | Description |
---|---|
"groceryStore" |
Name of a hive where the operation is performed. |
"fruits" |
Key name identifying a list. |
Codeless Reference¶
where:
Argument | Description |
---|---|
hive name |
Name of a hive where the operation is performed. |
key name |
Key name identifying a list. |
Returns the total number of values in the list.
Consider the following List storage:
The example below counts the number of items in the "fruits"
list:
The output will look as shown below after the Codeless logic runs.