def __init__(self): FilteringProtocol.__init__(self) # The list of clients is maintained as a stack because disconnections # automatically designate the next one in the list as the active. # However, queries can be received from clients in any order. When a # frontend recieves a query, it will call this instance back so that # we know to send it the reply. self.clientStack = [] # The first set of authentication response messages (between the # AuthenticationOk/R and the ReadyForQuery/Z) are saved here. self.authenticationResponse = []
def messageReceived(self, msg): # tell the postgres protocol to mark this one as the active, # because it will need to see the reply for this message. self.postgresProtocol.activateClient(self) return FilteringProtocol.messageReceived(self, msg)
def __init__(self): FilteringProtocol.__init__(self) self.postgresProtocol = None