def __init__(self, sqltext, name=None, deferrable=None,
                 initially=None, table=None, _create_rule=None,
                 _autoattach=True):

        super(CheckConstraint, self).\
            __init__(name, deferrable, initially, _create_rule)
        self.sqltext = _literal_as_text(sqltext)
        if table is not None:
            self._set_parent_with_dispatch(table)
        elif _autoattach:
            cols = _find_columns(self.sqltext)
            tables = set([c.table for c in cols
                          if isinstance(c.table, Table)])
            if len(tables) == 1:
                self._set_parent_with_dispatch(
                    tables.pop())
Construct a CHECK constraint.
dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/sql/schema.py/CheckConstraint.__init__