<s> from ... import Table , MetaData , Column <EOL> from ... types import String , Unicode , UnicodeText , Integer , TypeDecorator <EOL> from ... import cast <EOL> from ... import util <EOL> from ... sql import expression <EOL> from ... ext . compiler import compiles <EOL> ischema = MetaData ( ) <EOL> class CoerceUnicode ( TypeDecorator ) : <EOL> impl = Unicode <EOL> def process_bind_param ( self , value , dialect ) : <EOL> if util . py2k and isinstance ( value , util . binary_type ) : <EOL> value = value . decode ( dialect . encoding ) <EOL> return value <EOL> def bind_expression ( self , bindvalue ) : <EOL> return _cast_on_2005 ( bindvalue ) <EOL> class _cast_on_2005 ( expression . ColumnElement ) : <EOL> def __init__ ( self , bindvalue ) : <EOL> self . bindvalue = bindvalue <EOL> @ compiles ( _cast_on_2005 ) <EOL> def _compile ( element , compiler , ** kw ) : <EOL> from . import base <EOL> if compiler . dialect . server_version_info < base . MS_2005_VERSION : <EOL> return compiler . process ( element . bindvalue , ** kw ) <EOL> else : <EOL> return compiler . process ( cast ( element . bindvalue , Unicode ) , ** kw ) <EOL> schemata = Table ( "<STR_LIT>" , ischema , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , key = "<STR_LIT>" ) , <EOL> schema = "<STR_LIT>" ) <EOL> tables = Table ( "<STR_LIT>" , ischema , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , key = "<STR_LIT>" ) , <EOL> Column ( <EOL> "<STR_LIT>" , String ( convert_unicode = True ) , <EOL> key = "<STR_LIT>" ) , <EOL> schema = "<STR_LIT>" ) <EOL> columns = Table ( "<STR_LIT>" , ischema , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , Integer , key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , String , key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , Integer , key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , Integer , <EOL> key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , Integer , key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , Integer , key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , Integer , key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , String , key = "<STR_LIT>" ) , <EOL> schema = "<STR_LIT>" ) <EOL> constraints = Table ( "<STR_LIT>" , ischema , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , <EOL> key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , String ( <EOL> convert_unicode = True ) , key = "<STR_LIT>" ) , <EOL> schema = "<STR_LIT>" ) <EOL> column_constraints = Table ( "<STR_LIT>" , ischema , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , <EOL> key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , <EOL> key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , <EOL> key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , <EOL> key = "<STR_LIT>" ) , <EOL> schema = "<STR_LIT>" ) <EOL> key_constraints = Table ( "<STR_LIT>" , ischema , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , <EOL> key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , <EOL> key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , <EOL> key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , <EOL> key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , Integer , <EOL> key = "<STR_LIT>" ) , <EOL> schema = "<STR_LIT>" ) <EOL> ref_constraints = Table ( "<STR_LIT>" , ischema , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , <EOL> key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , <EOL> key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , <EOL> key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , <EOL> key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , <EOL> key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , <EOL> key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , String , key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , String , key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , String , key = "<STR_LIT>" ) , <EOL> schema = "<STR_LIT>" ) <EOL> views = Table ( "<STR_LIT>" , ischema , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , CoerceUnicode , key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , String , key = "<STR_LIT>" ) , <EOL> Column ( "<STR_LIT>" , String , key = "<STR_LIT>" ) , <EOL> schema = "<STR_LIT>" ) </s>
