'Return a callable that will execute this
DDLElement conditionally.
Used to provide a wrapper for event listening::
event.listen(
metadata,
\'before_create\',
DDL("my_ddl").execute_if(dialect=\'postgresql\')
:param dialect: May be a string, tuple or a callable
predicate.  If a string, it will be compared to the name of the
executing database dialect::
DDL(\'something\').execute_if(dialect=\'postgresql\')
If a tuple, specifies multiple dialect names::
DDL(\'something\').execute_if(dialect=(\'postgresql\', \'mysql\'))
:param callable_: A callable, which will be invoked with
four positional arguments as well as optional keyword
arguments:
:ddl:
This DDL element.
:target:
The :class:`.Table` or :class:`.MetaData` object which is the
target of this event. May be None if the DDL is executed
explicitly.
:bind:
The :class:`.Connection` being used for DDL execution
:tables:
Optional keyword argument - a list of Table objects which are to
be created/ dropped within a MetaData.create_all() or drop_all()
method call.
:state:
Optional keyword argument - will be the ``state`` argument
passed to this function.
:checkfirst:
Keyword argument, will be True if the \'checkfirst\' flag was
set during the call to ``create()``, ``create_all()``,
``drop()``, ``drop_all()``.
If the callable returns a true value, the DDL statement will be
executed.
:param state: any value which will be passed to the callable\_
as the ``state`` keyword argument.
.. seealso::
:class:`.DDLEvents`
:ref:`event_toplevel`'

@_generative
def execute_if(self, dialect=None, callable_=None, state=None):

    self.dialect = dialect
    self.callable_ = callable_
    self.state = state
