class ColumnCollectionConstraint(ColumnCollectionMixin, Constraint): (source)
Known subclasses: sqlalchemy.dialects.postgresql.ExcludeConstraint
, sqlalchemy.sql.schema.CheckConstraint
, sqlalchemy.sql.schema.ForeignKeyConstraint
, sqlalchemy.sql.schema.PrimaryKeyConstraint
, sqlalchemy.sql.schema.UniqueConstraint
A constraint that proxies a ColumnCollection.
Method | __contains__ |
Undocumented |
Method | __init__ |
:param \*columns: A sequence of column names or Column objects. |
Method | __iter__ |
Undocumented |
Method | __len__ |
Undocumented |
Method | contains |
Return True if this constraint contains the given column. |
Method | copy |
Undocumented |
Class Variable | columns |
A :class:`_expression.ColumnCollection` representing the set of columns for this constraint. |
Method | _copy |
Undocumented |
Method | _set |
Associate with this SchemaEvent's parent object. |
Inherited from ColumnCollectionMixin
:
Property | c |
Undocumented |
Method | _check |
Undocumented |
Method | _col |
Undocumented |
Method | _set |
Undocumented |
Class Variable | _allow |
Undocumented |
Instance Variable | _cols |
Undocumented |
Instance Variable | _column |
Undocumented |
Instance Variable | _columns |
Undocumented |
Instance Variable | _pending |
Undocumented |
Inherited from Constraint
(via ColumnCollectionMixin
):
Class Variable | __visit |
Undocumented |
Instance Variable | comment |
Undocumented |
Instance Variable | deferrable |
Undocumented |
Instance Variable | info |
Info dictionary associated with the object, allowing user-defined data to be associated with this :class:`.SchemaItem`. |
Instance Variable | initially |
Undocumented |
Instance Variable | name |
Undocumented |
Instance Variable | parent |
Undocumented |
Property | table |
Undocumented |
Method | _should |
Undocumented |
Class Variable | _creation |
Undocumented |
Instance Variable | _create |
Undocumented |
Instance Variable | _type |
Undocumented |
Inherited from DialectKWArgs
(via ColumnCollectionMixin
, Constraint
):
Class Method | argument |
Add a new kind of dialect-specific keyword argument for this class. |
Class Variable | __slots__ |
Undocumented |
Property | dialect |
A collection of keyword arguments specified as dialect-specific options to this construct. |
Property | dialect |
A collection of keyword arguments specified as dialect-specific options to this construct. |
Property | kwargs |
A synonym for :attr:`.DialectKWArgs.dialect_kwargs`. |
Method | _kw |
Undocumented |
Method | _validate |
Undocumented |
Class Variable | _dialect |
Undocumented |
Class Variable | _kw |
Undocumented |
Inherited from HasConditionalDDL
(via ColumnCollectionMixin
, Constraint
, DialectKWArgs
):
Method | ddl |
apply a conditional DDL rule to this schema item. |
Instance Variable | _ddl |
Undocumented |
Inherited from SchemaItem
(via ColumnCollectionMixin
, Constraint
, DialectKWArgs
, HasConditionalDDL
):
Method | __repr__ |
Undocumented |
Class Variable | create |
Undocumented |
Method | _init |
Initialize the list of child items for this SchemaItem. |
Method | _schema |
Undocumented |
Class Variable | _use |
Undocumented |
Inherited from SchemaEventTarget
(via ColumnCollectionMixin
, Constraint
, DialectKWArgs
, HasConditionalDDL
, SchemaItem
):
Class Variable | dispatch |
Undocumented |
Inherited from Visitable
(via ColumnCollectionMixin
, Constraint
, DialectKWArgs
, HasConditionalDDL
, SchemaItem
, SchemaEventTarget
, EventTarget
):
Method | __class |
Undocumented |
Method | __init |
Undocumented |
Class Method | _generate |
Undocumented |
Method | _compiler |
Undocumented |
Class Variable | _original |
Undocumented |
_DDLColumnArgument
, name: _ConstraintNameArgument
= None, deferrable: Optional[ bool]
= None, initially: Optional[ str]
= None, info: Optional[ _InfoType]
= None, _autoattach: bool
= True, _column_flag: bool
= False, _gather_expressions: Optional[ List[ _DDLColumnArgument]]
= None, **dialect_kw: Any
):
(source)
¶
sqlalchemy.dialects.postgresql.ExcludeConstraint
, sqlalchemy.sql.schema.CheckConstraint
, sqlalchemy.sql.schema.ForeignKeyConstraint
, sqlalchemy.sql.schema.PrimaryKeyConstraint
:param \*columns: A sequence of column names or Column objects. :param name: Optional, the in-database name of this constraint. :param deferrable: Optional bool. If set, emit DEFERRABLE or NOT DEFERRABLE when issuing DDL for this constraint. :param initially: Optional string. If set, emit INITIALLY <value> when issuing DDL for this constraint. :param \**dialect_kw: other keyword arguments including dialect-specific arguments are propagated to the :class:`.Constraint` superclass.
Return True if this constraint contains the given column. Note that this object also contains an attribute ``.columns`` which is a :class:`_expression.ColumnCollection` of :class:`_schema.Column` objects.
def copy(self, *, target_table:
Optional[ Table]
= None, **kw: Any
) -> ColumnCollectionConstraint
:
(source)
¶
sqlalchemy.sql.schema.Constraint.copy
Undocumented
sqlalchemy.sql.schema.ForeignKeyConstraint
A :class:`_expression.ColumnCollection` representing the set of columns for this constraint.
sqlalchemy.dialects.postgresql.ExcludeConstraint
, sqlalchemy.sql.schema.ForeignKeyConstraint
, sqlalchemy.sql.schema.PrimaryKeyConstraint
Associate with this SchemaEvent's parent object.