Project

General

Profile

« Previous | Next » 

Revision 2948

sql.py: DbConn.DbCursor._cache_result(): Corrected comment to reflect why different types of queries are cached differently

View differences:

sql.py
246 246
            return row
247 247
        
248 248
        def _cache_result(self):
249
            # For inserts, only cache exceptions since inserts are not
250
            # idempotent, but an invalid insert will always be invalid
249
            # For inserts that return a result set, don't cache result set since
250
            # inserts are not idempotent. Other non-SELECT queries don't have
251
            # their result set read, so only exceptions will be cached (an
252
            # invalid query will always be invalid).
251 253
            if self.query_results != None and (not self._is_insert
252 254
                or isinstance(self.result, Exception)):
253 255
                

Also available in: Unified diff