diff options
author | iElectric <unknown> | 2010-07-11 17:22:28 +0200 |
---|---|---|
committer | iElectric <unknown> | 2010-07-11 17:22:28 +0200 |
commit | a3d3470d5ecc5d89b747f634c32093c8143b6013 (patch) | |
tree | cddc766756e56ac1efaa629bf8e2905ab1de20ff /migrate/changeset/constraint.py | |
parent | b0157137e29ae197ba36e559e172982626e8b1eb (diff) | |
download | sqalchemy-migrate-a3d3470d5ecc5d89b747f634c32093c8143b6013.tar.gz |
adding connection keyword to ORM methods
Diffstat (limited to 'migrate/changeset/constraint.py')
-rw-r--r-- | migrate/changeset/constraint.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/migrate/changeset/constraint.py b/migrate/changeset/constraint.py index 3c20d3f..866ea10 100644 --- a/migrate/changeset/constraint.py +++ b/migrate/changeset/constraint.py @@ -38,6 +38,8 @@ class ConstraintChangeset(object): :param engine: the database engine to use. If this is \ :keyword:`None` the instance's engine will be used :type engine: :class:`sqlalchemy.engine.base.Engine` + :param connection: reuse connection istead of creating new one. + :type connection: :class:`sqlalchemy.engine.base.Connection` instance """ # TODO: set the parent here instead of in __init__ self.__do_imports('constraintgenerator', *a, **kw) @@ -50,6 +52,8 @@ class ConstraintChangeset(object): :param cascade: Issue CASCADE drop if database supports it :type engine: :class:`sqlalchemy.engine.base.Engine` :type cascade: bool + :param connection: reuse connection istead of creating new one. + :type connection: :class:`sqlalchemy.engine.base.Connection` instance :returns: Instance with cleared columns """ self.cascade = kw.pop('cascade', False) @@ -63,7 +67,7 @@ class ConstraintChangeset(object): class PrimaryKeyConstraint(ConstraintChangeset, schema.PrimaryKeyConstraint): """Construct PrimaryKeyConstraint - + Migrate's additional parameters: :param cols: Columns in constraint. @@ -89,7 +93,7 @@ class PrimaryKeyConstraint(ConstraintChangeset, schema.PrimaryKeyConstraint): class ForeignKeyConstraint(ConstraintChangeset, schema.ForeignKeyConstraint): """Construct ForeignKeyConstraint - + Migrate's additional parameters: :param columns: Columns in constraint @@ -132,7 +136,7 @@ class CheckConstraint(ConstraintChangeset, schema.CheckConstraint): """Construct CheckConstraint Migrate's additional parameters: - + :param sqltext: Plain SQL text to check condition :param columns: If not name is applied, you must supply this kw\ to autoname constraint @@ -165,7 +169,7 @@ class CheckConstraint(ConstraintChangeset, schema.CheckConstraint): class UniqueConstraint(ConstraintChangeset, schema.UniqueConstraint): """Construct UniqueConstraint - + Migrate's additional parameters: :param cols: Columns in constraint. |