Commit 24f399a1 authored by Vincent Pelletier's avatar Vincent Pelletier Committed by Sebastien Robin

SQLCatalog._getColumnIds: Merge into only caller.

Callers up the stack should not mutate returned value (and all callers
found in this repository code follow this rule).
Saves a list copy and an extra call on each call, and a few lines of code.
parent 61b89012
......@@ -1112,8 +1112,13 @@ class Catalog(Folder,
"""
return self._getCatalogSchema()[table]
security.declarePrivate('getColumnIds')
@transactional_cache_decorator('SQLCatalog.getColumnIds')
def _getColumnIds(self):
def getColumnIds(self):
"""
Calls the show column method and returns dictionnary of
Field Ids
"""
keys = set()
add_key = keys.add
table_dict = self._getCatalogSchema()
......@@ -1129,14 +1134,6 @@ class Catalog(Folder,
add_key(scriptable_tuple[0].strip())
return sorted(keys)
security.declarePrivate('getColumnIds')
def getColumnIds(self):
"""
Calls the show column method and returns dictionnary of
Field Ids
"""
return self._getColumnIds()[:]
security.declarePrivate('getColumnMap')
@transactional_cache_decorator('SQLCatalog.getColumnMap')
def getColumnMap(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment