SQlite Swift unexpected result group -


i using swift sqlite. want retrieve 'flights' in groups switch 'departuredate'

    if let flightquery = self.flightquery, let database = self.db {          let flightgroupbydeparturedate = flightquery.group(self.departuredate)          {              let flightfromdb = try database.prepare(flightgroupbydeparturedate)              let flightgroups = array(flightfromdb)              applog.i("flightgroups count \(flightgroups.count)")             // print 2 :              // have 2 groups of flight             // each group got 2 flights             // simulate result static values              flighgroup  in flightgroups  {                  applog.i("flightgroups count \(array(arrayliteral: flighgroup).count)")                 // print 1 : wrong !             }          }catch{              applog.e("fail findflightbydeparturedate" )         }     } 

when print flightgroups, found 2 flights instead of 2 arrays of flight


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -