Hi,
I wrote some code years ago where I used backendless as part of a proof of concept. I had to bring it back from the dead and fired up ye old backendless, turns out you guys have had some major changes. No biggy I have upgraded my account and installed the changes. But I’m having a little bit of an issue trying to work out how to reference the data the way I use to. Below is the new code, I’m particularly interested in how to rewrite collection.data portion.
New Query as per your documentation.
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}
span.s1 {color: #ba2da2}
span.s2 {color: #703daa}
span.s3 {color: #78492a}
span.s4 {color: #3e1e81}
span.s5 {color: #d12f1b}
span.s6 {color: #4f8187}
span.s7 {text-decoration: underline ; color: #d12f1b}
span.s8 {text-decoration: underline}
span.s9 {text-decoration: underline ; color: #703daa}
id<IDataStore> queryAircraft = [backendless.data ofTable:@"Aircraft"];
DataQueryBuilder *queryBuilder = [DataQueryBuilder new];
NSString *whereClause = [NSString stringWithFormat:@"AircraftIdentification = \'%@\'", aircraftRegoValue];
[queryBuilder setWhereClause:whereClause];
[queryAircraft find:queryBuilder
response:^(NSArray *aircraftObjects) {
NSLog(@"Retrieved %i objects", (int)aircraftObjects.count);
aircraftCount = [NSString stringWithFormat:@"%d",aircraftObjects.count];
}
error:^(Fault *fault) {
NSLog(@"Server reported an error: %@", fault.message);
}];
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4f8187; background-color: #ffffff}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008400; background-color: #ffffff}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}
span.s1 {color: #000000}
span.s2 {color: #ba2da2}
span.s3 {color: #272ad8}
span.s4 {color: #4f8187}
span.s5 {color: #703daa}
span.s6 {color: #3e1e81}
span.s7 {text-decoration: underline}
if (aircraftCount == 0) {
//reset the NSArray to be blank because no values came back
flightRecordData = [[NSMutableArray alloc]init];
}
else
{
flightRecordData = [[NSMutableArray alloc]init];
for (FlightLog *flightlog in collection.data) <---I loop over the results using the NSMutableArray....well I use to....
{
How should I be referencing the data returned instance? queryAircraft?
Please understand I haven’t coded in about 3 years…so be gentle with your answers. I have many cob webs…
Cheers