dbapi.py
changeset 6012 d56fd78006cd
parent 5863 4495b9bc49df
child 6013 8ca424bc393b
equal deleted inserted replaced
6011:b5f15098f282 6012:d56fd78006cd
   505 
   505 
   506     def request(self):
   506     def request(self):
   507         return DBAPIRequest(self.vreg, DBAPISession(self))
   507         return DBAPIRequest(self.vreg, DBAPISession(self))
   508 
   508 
   509     def check(self):
   509     def check(self):
   510         """raise `BadConnectionId` if the connection is no more valid"""
   510         """raise `BadConnectionId` if the connection is no more valid, else
       
   511         return its latest activity timestamp.
       
   512         """
   511         if self._closed is not None:
   513         if self._closed is not None:
   512             raise ProgrammingError('Closed connection')
   514             raise ProgrammingError('Closed connection')
   513         self._repo.check_session(self.sessionid)
   515         return self._repo.check_session(self.sessionid)
   514 
   516 
   515     def set_session_props(self, **props):
   517     def set_session_props(self, **props):
   516         """raise `BadConnectionId` if the connection is no more valid"""
   518         """raise `BadConnectionId` if the connection is no more valid"""
   517         if self._closed is not None:
   519         if self._closed is not None:
   518             raise ProgrammingError('Closed connection')
   520             raise ProgrammingError('Closed connection')