Hi All

ForeignKey and ForeignKeyConstraint copy() method make FK copy without
arguments, for example deferrable, ...

class ForeignKey:
    def copy(self, schema=None):
        """Produce a copy of this ForeignKey object."""
        return ForeignKey(self._get_colspec(schema=schema))

class ForeignKeyConstraint:
    def copy(self, **kw):
        return ForeignKeyConstraint(
                    [x.parent.name for x in self._elements.values()],
                    [x._get_colspec(**kw) for x in
self._elements.values()],
                    name=self.name,
                    onupdate=self.onupdate,
                    ondelete=self.ondelete,
                    use_alter=self.use_alter
                )
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to