parameters: (self, schema=None)
return_statement: return sorted(items, key=cmp_to_key(lambda x, y: (x[1] > y[1]) - (x[1] < y[1])))
docstring: Get list of tables from SQLite cache.
docstring_summary: Get list of tables from SQLite cache.
docstring_tokens: Get list of tables from SQLite cache .
function: def getTablesCache(self, schema=None):
          """Get list of tables from SQLite cache."""
  
          tablenames = []
          items = []
  
          try:
              vectors = self.getVectorTablesCache(schema)
              for tbl in vectors:
                  tablenames.append((tbl[2], tbl[1]))
                  items.append(tbl)
          except DbError:
              pass
  
          if not self.allowGeometrylessTables:
              return sorted(items, key=cmp_to_key(lambda x, y: (x[1] > y[1]) - (x[1] < y[1])))
  
          # get all non geographic tables and views
          schema_where = u""
          if self.userTablesOnly:
              schema_where = u"AND ownername = '{}'".format(
                  self.user)
          if schema and not self.userTablesOnly:
              schema_where = u"AND ownername = '{}'".format(
                  schema)
  
          sql = u"""
          SELECT tablename, ownername, isview
          FROM "oracle_{0}"
          WHERE geometrycolname IS '' {1}
          ORDER BY tablename
          """.format(self.connName, schema_where)
  
          c = self.cache_connection.cursor()
          c.execute(sql)
          for tbl in c.fetchall():
              if tablenames.count((tbl[1], tbl[0])) <= 0:
                  item = list(tbl)
                  item.insert(0, Table.TableType)
                  items.append(item)
          c.close()
  
          return sorted(items, key=cmp_to_key(lambda x, y: (x[1] > y[1]) - (x[1] < y[1])))
function_tokens: def getTablesCache ( self , schema = None ) : tablenames = [ ] items = [ ] try : vectors = self . getVectorTablesCache ( schema ) for tbl in vectors : tablenames . append ( ( tbl [ 2 ] , tbl [ 1 ] ) ) items . append ( tbl ) except DbError : pass if not self . allowGeometrylessTables : return sorted ( items , key = cmp_to_key ( lambda x , y : ( x [ 1 ] > y [ 1 ] ) - ( x [ 1 ] < y [ 1 ] ) ) ) # get all non geographic tables and views schema_where = u"" if self . userTablesOnly : schema_where = u"AND ownername = '{}'" . format ( self . user ) if schema and not self . userTablesOnly : schema_where = u"AND ownername = '{}'" . format ( schema ) sql = u"""
          SELECT tablename, ownername, isview
          FROM "oracle_{0}"
          WHERE geometrycolname IS '' {1}
          ORDER BY tablename
          """ . format ( self . connName , schema_where ) c = self . cache_connection . cursor ( ) c . execute ( sql ) for tbl in c . fetchall ( ) : if tablenames . count ( ( tbl [ 1 ] , tbl [ 0 ] ) ) <= 0 : item = list ( tbl ) item . insert ( 0 , Table . TableType ) items . append ( item ) c . close ( ) return sorted ( items , key = cmp_to_key ( lambda x , y : ( x [ 1 ] > y [ 1 ] ) - ( x [ 1 ] < y [ 1 ] ) ) )