(self, stats)
Create table using the Statistics class structure

      :param stats: the statistics object
Create table using the Statistics class structure
Create table using the Statistics class structure
def createStructure(self, stats):
      """ Create table using the Statistics class structure

      :param stats: the statistics object

      """
      c = self.getCursor()
      pstmt = "create table if not exists %s(identify text, generation integer, " % (Consts.CDefSQLiteDBTable)
      for k, v in stats.items():
         pstmt += "%s %s, " % (k, self.typeDict[type(v)])
      pstmt = pstmt[:-2] + ")"
      logging.debug("Creating table %s: %s.", Consts.CDefSQLiteDBTable, pstmt)
      c.execute(pstmt)

      pstmt = """create table if not exists %s(identify text, generation integer,
              individual integer, fitness real, raw real)""" % (Consts.CDefSQLiteDBTablePop)
      logging.debug("Creating table %s: %s.", Consts.CDefSQLiteDBTablePop, pstmt)
      c.execute(pstmt)
      self.commit()
def createStructure ( self , stats ) : c = self . getCursor ( ) pstmt = "create table if not exists %s(identify text, generation integer, " % ( Consts . CDefSQLiteDBTable ) for k , v in stats . items ( ) : pstmt += "%s %s, " % ( k , self . typeDict [ type ( v ) ] ) pstmt = pstmt [ : - 2 ] + ")" logging . debug ( "Creating table %s: %s." , Consts . CDefSQLiteDBTable , pstmt ) c . execute ( pstmt ) pstmt = """create table if not exists %s(identify text, generation integer,
              individual integer, fitness real, raw real)""" % ( Consts . CDefSQLiteDBTablePop ) logging . debug ( "Creating table %s: %s." , Consts . CDefSQLiteDBTablePop , pstmt ) c . execute ( pstmt ) self . commit ( )