#NEWLINE# def _render_check_constraint( constraint , autogen_context ) : #NEWLINE# #INDENT# rendered = _user_defined_render ( 'check' , constraint , autogen_context ) #NEWLINE# if ( rendered is not False ) : #NEWLINE# #INDENT# return rendered #NEWLINE# #UNINDENT# if ( constraint . _create_rule and hasattr ( constraint . _create_rule , 'target' ) and isinstance ( constraint . _create_rule . target , sqltypes . TypeEngine ) ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# opts = [ ] #NEWLINE# if constraint . name : #NEWLINE# #INDENT# opts . append ( ( 'name' , repr ( _render_gen_name ( autogen_context , constraint . name ) ) ) ) #NEWLINE# #UNINDENT# return ( '%(prefix)sCheckConstraint(%(sqltext)r%(opts)s)' % { #NEWLINE# #INDENT# 'prefix' : _sqlalchemy_autogenerate_prefix ( autogen_context ) , #NEWLINE# 'opts' : ( ( ', ' + ', ' . join ( ( ( '%s=%s' % ( k , v ) ) for ( k , v ) in opts ) ) ) if opts else '' ) , #NEWLINE# 'sqltext' : str ( constraint . sqltext . compile ( dialect = autogen_context [ 'dialect' ] ) ) , #NEWLINE# #UNINDENT# } )