meth(obj)
if clone:
- obj.copy_internals()
+ obj._copy_internals()
for c in obj.get_children(**self.__traverse_options__):
_trav(c)
This method may be used by a generative API.
Its also used as part of the "deep" copy afforded
- by a traversal that combines the copy_internals()
+ by a traversal that combines the _copy_internals()
method."""
c = self.__class__.__new__(self.__class__)
c.__dict__ = self.__dict__.copy()
return self is other
- def copy_internals(self):
+ def _copy_internals(self):
"""reassign internal elements to be clones of themselves.
called during a copy-and-traverse operation on newly
columns = property(lambda s:[])
- def copy_internals(self):
+ def _copy_internals(self):
self.bindparams = [b._clone() for b in self.bindparams]
def get_children(self, **kwargs):
else:
self.clauses.append(_literal_as_text(clause))
- def copy_internals(self):
+ def _copy_internals(self):
self.clauses = [clause._clone() for clause in self.clauses]
def get_children(self, **kwargs):
key = property(lambda self:self.name or "_calc_")
- def copy_internals(self):
+ def _copy_internals(self):
self.clause_expr = self.clause_expr._clone()
def get_children(self, **kwargs):
key = property(lambda self:self.name)
- def copy_internals(self):
+ def _copy_internals(self):
self._clone_from_clause()
def get_children(self, **kwargs):
self.clause = clause
self.typeclause = _TypeClause(self.type)
- def copy_internals(self):
+ def _copy_internals(self):
self.clause = self.clause._clone()
self.typeclause = self.typeclause._clone()
def _get_from_objects(self, **modifiers):
return self.element._get_from_objects(**modifiers)
- def copy_internals(self):
+ def _copy_internals(self):
self.element = self.element._clone()
def get_children(self, **kwargs):
def _get_from_objects(self, **modifiers):
return self.left._get_from_objects(**modifiers) + self.right._get_from_objects(**modifiers)
- def copy_internals(self):
+ def _copy_internals(self):
self.left = self.left._clone()
self.right = self.right._clone()
self._foreign_keys.add(f)
return column
- def copy_internals(self):
+ def _copy_internals(self):
self._clone_from_clause()
self.left = self.left._clone()
self.right = self.right._clone()
#return self.selectable._exportable_columns()
return self.selectable.columns
- def copy_internals(self):
+ def _copy_internals(self):
self._clone_from_clause()
self.selectable = self.selectable._clone()
baseselectable = self.selectable
_label = property(lambda s: s.elem._label)
orig_set = property(lambda s:s.elem.orig_set)
- def copy_internals(self):
+ def _copy_internals(self):
self.elem = self.elem._clone()
def get_children(self, **kwargs):
def _compare_self(self):
return self.obj
- def copy_internals(self):
+ def _copy_internals(self):
self.obj = self.obj._clone()
def get_children(self, **kwargs):
col.orig_set = colset
return col
- def copy_internals(self):
+ def _copy_internals(self):
self._clone_from_clause()
self._col_map = {}
self.selects = [s._clone() for s in self.selects]
_SelectBaseMixin.__init__(self, **kwargs)
- def get_display_froms(self, correlation_state=None):
+ def _get_display_froms(self, correlation_state=None):
froms = util.Set()
hide_froms = util.Set()
else:
return froms
+ froms = property(_get_display_froms, doc="""Return a list of all FromClause elements which will be applied to the FROM clause of the resulting statement.""")
+
def locate_all_froms(self):
froms = util.Set()
for col in self._raw_columns:
froms.add(f)
return froms
- def calculate_correlations(self, correlation_state):
+ def _calculate_correlations(self, correlation_state):
if self not in correlation_state:
correlation_state[self] = {}
- display_froms = self.get_display_froms(correlation_state)
+ display_froms = self._get_display_froms(correlation_state)
class CorrelatedVisitor(NoColumnVisitor):
def __init__(self, is_where=False, is_column=False, is_from=False):
inner_columns = property(_get_inner_columns)
- def copy_internals(self):
+ def _copy_internals(self):
self._clone_from_clause()
self._raw_columns = [c._clone() for c in self._raw_columns]
self._recorrelate_froms([f._clone() for f in self._froms])
def supports_execution(self):
return True
- def calculate_correlations(self, correlate_state):
+ def _calculate_correlations(self, correlate_state):
class SelectCorrelator(NoColumnVisitor):
def visit_select(s, select):
if select._should_correlate: