class documentation

class ExcludeConstraint(ColumnCollectionConstraint): (source)

View In Hierarchy

A table-level EXCLUDE constraint. Defines an EXCLUDE constraint as described in the `PostgreSQL documentation`__. __ https://www.postgresql.org/docs/current/static/sql-createtable.html#SQL-CREATETABLE-EXCLUDE

Method __init__ Create an :class:`.ExcludeConstraint` object.
Class Variable __visit_name__ Undocumented
Class Variable create_drop_stringify_dialect Undocumented
Class Variable inherit_cache Undocumented
Instance Variable operators Undocumented
Instance Variable ops Undocumented
Instance Variable using Undocumented
Instance Variable where Undocumented
Method _copy Undocumented
Method _set_parent Associate with this SchemaEvent's parent object.
Instance Variable _render_exprs Undocumented

Inherited from ColumnCollectionConstraint:

Method __contains__ Undocumented
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.

Inherited from ColumnCollectionMixin (via ColumnCollectionConstraint):

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 ColumnCollectionConstraint, ColumnCollectionMixin):

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 ColumnCollectionConstraint, 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 ColumnCollectionConstraint, ColumnCollectionMixin, Constraint, DialectKWArgs):

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

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

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

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

Class Variable dispatch Undocumented

Inherited from Visitable (via ColumnCollectionConstraint, 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
@elements._document_text_coercion('where', ':class:`.ExcludeConstraint`', ':paramref:`.ExcludeConstraint.where`')
def __init__(self, *elements, **kw): (source)

Create an :class:`.ExcludeConstraint` object. E.g.:: const = ExcludeConstraint( (Column('period'), '&&'), (Column('group'), '='), where=(Column('group') != 'some group'), ops={'group': 'my_operator_class'} ) The constraint is normally embedded into the :class:`_schema.Table` construct directly, or added later using :meth:`.append_constraint`:: some_table = Table( 'some_table', metadata, Column('id', Integer, primary_key=True), Column('period', TSRANGE()), Column('group', String) ) some_table.append_constraint( ExcludeConstraint( (some_table.c.period, '&&'), (some_table.c.group, '='), where=some_table.c.group != 'some group', name='some_table_excl_const', ops={'group': 'my_operator_class'} ) ) :param \*elements: A sequence of two tuples of the form ``(column, operator)`` where "column" is either a :class:`_schema.Column` object, or a SQL expression element (e.g. ``func.int8range(table.from, table.to)``) or the name of a column as string, and "operator" is a string containing the operator to use (e.g. `"&&"` or `"="`). In order to specify a column name when a :class:`_schema.Column` object is not available, while ensuring that any necessary quoting rules take effect, an ad-hoc :class:`_schema.Column` or :func:`_expression.column` object should be used. The ``column`` may also be a string SQL expression when passed as :func:`_expression.literal_column` or :func:`_expression.text` :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 using: Optional string. If set, emit USING <index_method> when issuing DDL for this constraint. Defaults to 'gist'. :param where: Optional SQL expression construct or literal SQL string. If set, emit WHERE <predicate> when issuing DDL for this constraint. :param ops: Optional dictionary. Used to define operator classes for the elements; works the same way as that of the :ref:`postgresql_ops <postgresql_operator_classes>` parameter specified to the :class:`_schema.Index` construct. .. versionadded:: 1.3.21 .. seealso:: :ref:`postgresql_operator_classes` - general description of how PostgreSQL operator classes are specified.

create_drop_stringify_dialect: str = (source)
inherit_cache: bool = (source)

Undocumented

operators: dict = (source)

Undocumented

Undocumented

Undocumented

Undocumented

def _copy(self, target_table=None, **kw): (source)
def _set_parent(self, table, **kw): (source)

Associate with this SchemaEvent's parent object.

_render_exprs = (source)

Undocumented