Length¶
Description¶
This operation counts the number of elements in the set and returns the total.
Method¶
[[[Backendless.shared hive:(NSString *)hiveName] setStore:(NSString *)keyName] lengthWithResponseHandler:^(NSInteger)responseHandler errorHandler:^(Fault *)errorHandler];
Backendless.shared.hive(hiveName: String).setStore(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 set. String value. |
Return Value¶
The number of items stored in the set
Example¶
The example below returns the number of items stored in the "cars"
set.
[[[Backendless.shared hive:@"transport"] setStore:@"cars"] lengthWithResponseHandler:^(NSInteger response) {
// handle response
} errorHandler:^(Fault *fault) {
// handle error
}];
Backendless.shared.hive("transport").setStore("cars").length(responseHandler: { response in
// handle response
}, errorHandler: { fault in
// handle error
})
where:
Argument | Description |
---|---|
"transport" |
Name of a hive where the operation is performed. |
"cars" |
Key name identifying a set. |
Codeless Reference¶
where:
Argument | Description |
---|---|
hive name |
Name of a hive where the operation is performed. |
key names |
A list containing key names identifying unique sets. |
Returns the number of items stored in the set.
Consider the following Set storage:
The example below returns the number of items stored in the "cars"
set.
The logic produces the following output: