comparison pylearn/dbdict/api0.py @ 623:ae954c27fd11

looping works, eagerload of booked jobs works by str() HACK
author James Bergstra <bergstrj@iro.umontreal.ca>
date Sun, 18 Jan 2009 22:00:16 -0500
parents d2d582bcf7dc
children 25d9f91f1afa
comparison
equal deleted inserted replaced
622:d2d582bcf7dc 623:ae954c27fd11
404 h_self._KeyVal = KeyVal 404 h_self._KeyVal = KeyVal
405 h_self._Dict = Dict 405 h_self._Dict = Dict
406 h_self._Query = _Query 406 h_self._Query = _Query
407 407
408 def __iter__(h_self): 408 def __iter__(h_self):
409 return h_self.query.__iter__() 409 s = h_self.session()
410 rval = list(h_self.query(s).__iter__())
411 s.close()
412 return rval.__iter__()
410 413
411 def insert_kwargs(h_self, session=None, **dct): 414 def insert_kwargs(h_self, session=None, **dct):
412 """ 415 """
413 @rtype: DbHandle with reference to self 416 @rtype: DbHandle with reference to self
414 @return: a DbHandle initialized as a copy of dct 417 @return: a DbHandle initialized as a copy of dct