class documentation

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_column 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_parent Associate with this SchemaEvent's parent object.

Inherited from ColumnCollectionMixin:

Property c Undocumented
Method _check_attach Undocumented
Method _col_expressions Undocumented
Method _set_parent_with_dispatch Undocumented
Class Variable _allow_multiple_tables Undocumented
Instance Variable _cols_wo_table Undocumented
Instance Variable _column_flag Undocumented
Instance Variable _columns Undocumented
Instance Variable _pending_colargs Undocumented

Inherited from Constraint (via ColumnCollectionMixin):

Class Variable __visit_name__ 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_create_for_compiler Undocumented
Class Variable _creation_order Undocumented
Instance Variable _create_rule Undocumented
Instance Variable _type_bound Undocumented

Inherited from DialectKWArgs (via ColumnCollectionMixin, Constraint):

Class Method argument_for Add a new kind of dialect-specific keyword argument for this class.
Class Variable __slots__ Undocumented
Property dialect_kwargs A collection of keyword arguments specified as dialect-specific options to this construct.
Property dialect_options A collection of keyword arguments specified as dialect-specific options to this construct.
Property kwargs A synonym for :attr:`.DialectKWArgs.dialect_kwargs`.
Method _kw_reg_for_dialect_cls Undocumented
Method _validate_dialect_kwargs Undocumented
Class Variable _dialect_kwargs_traverse_internals Undocumented
Class Variable _kw_registry Undocumented

Inherited from HasConditionalDDL (via ColumnCollectionMixin, Constraint, DialectKWArgs):

Method ddl_if apply a conditional DDL rule to this schema item.
Instance Variable _ddl_if Undocumented

Inherited from SchemaItem (via ColumnCollectionMixin, Constraint, DialectKWArgs, HasConditionalDDL):

Method __repr__ Undocumented
Class Variable create_drop_stringify_dialect Undocumented
Method _init_items Initialize the list of child items for this SchemaItem.
Method _schema_item_copy Undocumented
Class Variable _use_schema_map 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_getitem__ Undocumented
Method __init_subclass__ Undocumented
Class Method _generate_compiler_dispatch Undocumented
Method _compiler_dispatch Undocumented
Class Variable _original_compiler_dispatch Undocumented
def __contains__(self, x: Any) -> bool: (source)

Undocumented

def __init__(self, *columns: _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)

: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.

def __iter__(self) -> Iterator[Column[Any]]: (source)

Undocumented

def __len__(self) -> int: (source)

Undocumented

def contains_column(self, col: Column[Any]) -> bool: (source)

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.

@util.deprecated('1.4', 'The :meth:`_schema.ColumnCollectionConstraint.copy` method is deprecated and will be removed in a future release.')
def copy(self, *, target_table: Optional[Table] = None, **kw: Any) -> ColumnCollectionConstraint: (source)

A :class:`_expression.ColumnCollection` representing the set of columns for this constraint.