#NEWLINE# def set_input_sizes( self , translate = None , exclude_types = None ) : #NEWLINE# #INDENT# "Given a cursor and ClauseParameters, call the appropriate\n        style of ``setinputsizes()`` on the cursor, using DB-API types\n        from the bind parameter's ``TypeEngine`` objects.\n\n        This method only called by those dialects which require it,\n        currently cx_oracle.\n\n        " #NEWLINE# if ( not hasattr ( self . compiled , 'bind_names' ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# types = dict ( ( ( self . compiled . bind_names [ bindparam ] , bindparam . type ) for bindparam in self . compiled . bind_names ) ) #NEWLINE# if self . dialect . positional : #NEWLINE# #INDENT# inputsizes = [ ] #NEWLINE# for key in self . compiled . positiontup : #NEWLINE# #INDENT# typeengine = types [ key ] #NEWLINE# dbtype = typeengine . dialect_impl ( self . dialect ) . get_dbapi_type ( self . dialect . dbapi ) #NEWLINE# if ( ( dbtype is not None ) and ( ( not exclude_types ) or ( dbtype not in exclude_types ) ) ) : #NEWLINE# #INDENT# inputsizes . append ( dbtype ) #NEWLINE# #UNINDENT# #UNINDENT# try : #NEWLINE# #INDENT# self . cursor . setinputsizes ( * inputsizes ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# self . root_connection . _handle_dbapi_exception ( e , None , None , None , self ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# inputsizes = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for key in self . compiled . bind_names . values ( ) : #NEWLINE# #INDENT# typeengine = types [ key ] #NEWLINE# dbtype = typeengine . dialect_impl ( self . dialect ) . get_dbapi_type ( self . dialect . dbapi ) #NEWLINE# if ( ( dbtype is not None ) and ( ( not exclude_types ) or ( dbtype not in exclude_types ) ) ) : #NEWLINE# #INDENT# if translate : #NEWLINE# #INDENT# key = translate . get ( key , key ) #NEWLINE# #UNINDENT# if ( not self . dialect . supports_unicode_binds ) : #NEWLINE# #INDENT# key = self . dialect . _encoder ( key ) [ 0 ] #NEWLINE# #UNINDENT# inputsizes [ key ] = dbtype #NEWLINE# #UNINDENT# #UNINDENT# try : #NEWLINE# #INDENT# self . cursor . setinputsizes ( ** inputsizes ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# self . root_connection . _handle_dbapi_exception ( e , None , None , None , self )