def table_list_cache(self):
     if self._table_list_cache is None:
         url = query.rest_api_url(self.connection.sf_session, 'sobjects')
         log.debug('Request API URL: %s' % url)
         response = driver.handle_api_exceptions(url, self.connection.sf_session.get)
         # charset is detected from headers by requests package
         self._table_list_cache = response.json(object_pairs_hook=OrderedDict)
     return self._table_list_cache
 def table_list_cache(self):
     if self._table_list_cache is None:
         url = query.rest_api_url(self.connection.sf_session, 'sobjects')
         log.debug('Request API URL: %s' % url)
         response = driver.handle_api_exceptions(
             url, self.connection.sf_session.get)
         # charset is detected from headers by requests package
         self._table_list_cache = response.json(
             object_pairs_hook=OrderedDict)
     return self._table_list_cache
 def table_description_cache(self, table):
     if table not in self._table_description_cache:
         url = query.rest_api_url(self.connection.sf_session, 'sobjects', table, 'describe/')
         log.debug('Request API URL: %s' % url)
         response = driver.handle_api_exceptions(url, self.connection.sf_session.get)
         self._table_description_cache[table] = response.json(object_pairs_hook=OrderedDict)
         assert self._table_description_cache[table]['fields'][0]['type'] == 'id'
         assert self._table_description_cache[table]['fields'][0]['name'] == 'Id'
         del self._table_description_cache[table]['fields'][0]
     return self._table_description_cache[table]
 def table_description_cache(self, table):
     if table not in self._table_description_cache:
         url = query.rest_api_url(self.connection.sf_session, 'sobjects',
                                  table, 'describe/')
         log.debug('Request API URL: %s' % url)
         response = driver.handle_api_exceptions(
             url, self.connection.sf_session.get)
         self._table_description_cache[table] = response.json(
             object_pairs_hook=OrderedDict)
         assert self._table_description_cache[table]['fields'][0][
             'type'] == 'id'
         assert self._table_description_cache[table]['fields'][0][
             'name'] == 'Id'
         del self._table_description_cache[table]['fields'][0]
     return self._table_description_cache[table]