parameters: (self, tableList, schema=None)
docstring: Updates the SQLite cache of table list for a schema.
docstring_summary: Updates the SQLite cache of table list for a schema.
docstring_tokens: Updates the SQLite cache of table list for a schema .
function: def updateCache(self, tableList, schema=None):
          """Updates the SQLite cache of table list for a schema."""
  
          data = []
          # First, we treat the list
          for table in tableList:
              line = ()
              # if the table is a view bring pkCols
              pkCols = None
              if int(table[3]) == 1:
                  pkCols = self.pkCols((schema, table[1]))
              # Deals with non-geographic tables
              if table[0] == Table.TableType:
                  line = (table[1], table[2], int(table[3]),
                          u"",
                          u",".join(pkCols) if pkCols else u"",
                          100, 0, u"")
              # Deals with vector tables
              elif table[0] == Table.VectorType:
                  line = (table[1], table[2], int(table[3]),
                          table[4],
                          u",".join(pkCols) if pkCols else u"",
                          table[9],
                          table[8] if table[10] == u"-1" else table[10],
                          u"")
              else:
                  continue
              data.append(line)
  
          # Then, empty the cache list
          sql = u"""
          DELETE FROM "oracle_{0}" {1}
          """.format(self.connName,
                     u"WHERE ownername = '{}'".format(schema) if schema else u"")
          self.cache_connection.execute(sql)
          self.cache_connection.commit()
  
          # Then we insert into SQLite database
          sql = u"""
          INSERT INTO "oracle_{}"(tablename, ownername, isview,
          geometrycolname, pkcols, geomtypes, geomsrids, sql)
          VALUES (?, ?, ?, ?, ?, ?, ?, ?)
          """.format(self.connName)
          c = self.cache_connection.cursor()
          c.executemany(sql, data)
          c.close()
          self.cache_connection.commit()
function_tokens: def updateCache ( self , tableList , schema = None ) : data = [ ] # First, we treat the list for table in tableList : line = ( ) # if the table is a view bring pkCols pkCols = None if int ( table [ 3 ] ) == 1 : pkCols = self . pkCols ( ( schema , table [ 1 ] ) ) # Deals with non-geographic tables if table [ 0 ] == Table . TableType : line = ( table [ 1 ] , table [ 2 ] , int ( table [ 3 ] ) , u"" , u"," . join ( pkCols ) if pkCols else u"" , 100 , 0 , u"" ) # Deals with vector tables elif table [ 0 ] == Table . VectorType : line = ( table [ 1 ] , table [ 2 ] , int ( table [ 3 ] ) , table [ 4 ] , u"," . join ( pkCols ) if pkCols else u"" , table [ 9 ] , table [ 8 ] if table [ 10 ] == u"-1" else table [ 10 ] , u"" ) else : continue data . append ( line ) # Then, empty the cache list sql = u"""
          DELETE FROM "oracle_{0}" {1}
          """ . format ( self . connName , u"WHERE ownername = '{}'" . format ( schema ) if schema else u"" ) self . cache_connection . execute ( sql ) self . cache_connection . commit ( ) # Then we insert into SQLite database sql = u"""
          INSERT INTO "oracle_{}"(tablename, ownername, isview,
          geometrycolname, pkcols, geomtypes, geomsrids, sql)
          VALUES (?, ?, ?, ?, ?, ?, ?, ?)
          """ . format ( self . connName ) c = self . cache_connection . cursor ( ) c . executemany ( sql , data ) c . close ( ) self . cache_connection . commit ( )