def hash_key(self):
# selects call alot of stuff so we do some "recursion checking"
# to eliminate loops
if Select._hash_recursion.push(self):
return "recursive_select()"
try:
return "Select(%s)" % string.join(
[
"columns=" + string.join([util.hash_key(c) for c in self._raw_columns],','),
"where=" + util.hash_key(self.whereclause),
"from=" + string.join([util.hash_key(f) for f in self.froms],','),
"having=" + util.hash_key(self.having),
"clauses=" + string.join([util.hash_key(c) for c in self.clauses], ',')
] + ["%s=%s" % (k, repr(getattr(self, k))) for k in ['use_labels', 'distinct', 'limit', 'offset']], ","
)
finally:
Select._hash_recursion.pop(self)
评论列表
文章目录