class documentation

class ColumnCollectionConstraint(ColumnCollectionMixin, Constraint):

Known subclasses: sqlalchemy.dialects.postgresql.ExcludeConstraint, sqlalchemy.sql.schema.CheckConstraint, sqlalchemy.sql.schema.ForeignKeyConstraint, sqlalchemy.sql.schema.PrimaryKeyConstraint, sqlalchemy.sql.schema.UniqueConstraint

View In Hierarchy

A constraint that proxies a ColumnCollection.
Method __contains__ Undocumented
Method __init__
Method __iter__ Undocumented
Method __len__ Undocumented
Method ​_copy Undocumented
Method ​_set​_parent Associate with this SchemaEvent's parent object.
Method contains​_column Return True if this constraint contains the given column.
Method copy Undocumented
Class Variable columns A _expression.ColumnCollection representing the set of columns for this constraint.

Inherited from ColumnCollectionMixin:

Method ​_check​_attach Undocumented
Method ​_col​_expressions Undocumented
Class Variable ​_allow​_multiple​_tables Undocumented
Instance Variable ​_cols​_wo​_table Undocumented
Instance Variable ​_column​_flag Undocumented
Instance Variable ​_pending​_colargs Undocumented

Inherited from Constraint:

Class Variable __visit​_name__ Undocumented
Instance Variable ​_create​_rule Undocumented
Instance Variable ​_type​_bound Undocumented
Instance Variable deferrable Undocumented
Instance Variable info Info dictionary associated with the object, allowing user-defined data to be associated with this .SchemaItem.
Instance Variable initially Undocumented
Instance Variable name Undocumented
Instance Variable parent Undocumented
Property table Undocumented

Inherited from DialectKWArgs (via Constraint):

Class Method argument​_for Add a new kind of dialect-specific keyword argument for this class.
Method ​_kw​_reg​_for​_dialect​_cls Undocumented
Method ​_validate​_dialect​_kwargs Undocumented
Class Variable ​_dialect​_kwargs​_traverse​_internals Undocumented
Class Variable ​_kw​_registry 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 .DialectKWArgs.dialect_kwargs.

Inherited from SchemaItem (via Constraint):

Method __repr__ Undocumented
Method ​_init​_items Initialize the list of child items for this SchemaItem.
Method ​_schema​_item​_copy Undocumented
Class Variable ​_use​_schema​_map Undocumented
Class Variable create​_drop​_stringify​_dialect Undocumented

Inherited from SchemaEventTarget (via Constraint, SchemaItem):

Method ​_set​_parent​_with​_dispatch Undocumented

Inherited from Traversible (via Constraint, SchemaItem):

Method get​_children Return immediate child .visitors.Traversible elements of this .visitors.Traversible.
Method __class​_getitem__ Undocumented
def __contains__(self, x):

Undocumented

def __init__(self, *columns, **kw):
Parameters
*columnsA sequence of column names or Column objects.
**kwother keyword arguments including dialect-specific arguments are propagated to the .Constraint superclass.
nameOptional, the in-database name of this constraint.
deferrableOptional bool. If set, emit DEFERRABLE or NOT DEFERRABLE when issuing DDL for this constraint.
initiallyOptional string. If set, emit INITIALLY <value> when issuing DDL for this constraint.
def __iter__(self):

Undocumented

def __len__(self):

Undocumented

def contains_column(self, col):

Return True if this constraint contains the given column.

Note that this object also contains an attribute .columns which is a _expression.ColumnCollection of _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=None, **kw):
columns =
A _expression.ColumnCollection representing the set of columns for this constraint.