@staticmethod
PYL-R0201238 field = desc(field)
239 return field
240
241 def get_column(self, session, name, **kwargs):242 if get_session_engine(session) == 'oracle':
243 name = quoted_name(name, True)
244 return column(name, **kwargs)
216
217 return queryset
218
219 def paginate_queryset(self, queryset, data):220 if 'offset' in data:
221 queryset = queryset.offset(data['offset'])
222
167 self.lookup = lookup
168 self.exclude = exclude
169
170 def clean_value(self, value):171 return value
172
173 def get_lookup_criterion(self, qs, value):
322
323 return dict(map(lambda x: map_models(x), relationships.items()))
324
325 def get_model_columns_by_clean_name(self, MappedBase, mapper): 326 table = mapper.tables[0]
327 name = get_table_name(MappedBase.metadata, table)
328 Model = MappedBase.classes.get(name)
313
314 return result
315
316 def clean_relationships_by_name(self, relationships): 317 def map_model_relations(x):
318 return clean_name(x[0]), x[1]
319
The method doesn't use its bound instance. Decorate this method with @staticmethod
decorator, so that Python does not have to instantiate a bound method for every instance of this class thereby saving memory and computation. Read more about staticmethods here.