#NEWLINE# def copy( self ) : #NEWLINE# #INDENT# '\n        Deeply copies everything in the query object except the connection object is shared\n        ' #NEWLINE# connection = self . connection #NEWLINE# del self . connection #NEWLINE# copied_query = deepcopy ( connection ) #NEWLINE# copied_query . connection = connection #NEWLINE# self . connection = connection #NEWLINE# return copied_query