#NEWLINE# def _execute_scalar( self , stmt , type_ ) : #NEWLINE# #INDENT# 'Execute a string statement on the current cursor, returning a\n        scalar result.\n\n        Used to fire off sequences, default phrases, and "select lastrowid"\n        types of statements individually or in the context of a parent INSERT\n        or UPDATE statement.\n\n        ' #NEWLINE# conn = self . root_connection #NEWLINE# if ( isinstance ( stmt , util . text_type ) and ( not self . dialect . supports_unicode_statements ) ) : #NEWLINE# #INDENT# stmt = self . dialect . _encoder ( stmt ) [ 0 ] #NEWLINE# #UNINDENT# if self . dialect . positional : #NEWLINE# #INDENT# default_params = self . dialect . execute_sequence_format ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# default_params = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# conn . _cursor_execute ( self . cursor , stmt , default_params , context = self ) #NEWLINE# r = self . cursor . fetchone ( ) [ 0 ] #NEWLINE# if ( type_ is not None ) : #NEWLINE# #INDENT# proc = type_ . _cached_result_processor ( r . dialect , self . cursor . description [ 0 ] [ 1 ] ) #NEWLINE# if proc : #NEWLINE# #INDENT# return proc ( r ) #NEWLINE# #UNINDENT# #UNINDENT# return r