[Erp5-report] r25463 - /erp5/trunk/products/ZSQLCatalog/SQLCatalog.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Feb 5 17:31:06 CET 2009
Author: vincent
Date: Thu Feb 5 17:31:00 2009
New Revision: 25463
URL: http://svn.erp5.org?rev=25463&view=rev
Log:
Do not systematicaly copy cached values. It's not good in all cases (mutable subtypes, ...) so it's not a good idea and would set a bad precedent.
Modified:
erp5/trunk/products/ZSQLCatalog/SQLCatalog.py
Modified: erp5/trunk/products/ZSQLCatalog/SQLCatalog.py
URL: http://svn.erp5.org/erp5/trunk/products/ZSQLCatalog/SQLCatalog.py?rev=25463&r1=25462&r2=25463&view=diff
==============================================================================
--- erp5/trunk/products/ZSQLCatalog/SQLCatalog.py [utf8] (original)
+++ erp5/trunk/products/ZSQLCatalog/SQLCatalog.py [utf8] Thu Feb 5 17:31:00 2009
@@ -887,7 +887,7 @@
keys = keys.keys()
keys.sort()
return keys
- return CachingMethod(_getColumnIds, id='SQLCatalog.getColumnIds', cache_factory='erp5_content_long')()[:]
+ return CachingMethod(_getColumnIds, id='SQLCatalog.getColumnIds', cache_factory='erp5_content_long')()
def getColumnMap(self):
"""
@@ -906,7 +906,7 @@
if not keys.has_key(key): keys[key] = []
keys[key].append(table) # Is this inconsistent ?
return keys
- return CachingMethod(_getColumnMap, id='SQLCatalog.getColumnMap', cache_factory='erp5_content_long')().copy()
+ return CachingMethod(_getColumnMap, id='SQLCatalog.getColumnMap', cache_factory='erp5_content_long')()
def getResultColumnIds(self):
"""
@@ -1708,7 +1708,7 @@
%(table_index, table))
return table_index
return CachingMethod(_getTableIndex, id='SQLCatalog.getTableIndex', \
- cache_factory='erp5_content_long')(table=table).copy()
+ cache_factory='erp5_content_long')(table=table)
def getIndex(self, table, column_list, all_column_list):
@@ -1742,7 +1742,7 @@
%(possible_index, table, column_list))
return possible_index
return CachingMethod(_getIndex, id='SQLCatalog.getIndex', cache_factory='erp5_content_long')\
- (table=table, column_list=column_list, all_column_list=all_column_list)[:]
+ (table=table, column_list=column_list, all_column_list=all_column_list)
def buildSQLQuery(self, query_table='catalog', REQUEST=None,
More information about the Erp5-report
mailing list