server/session.py
changeset 9396 e83cbc116352
parent 9385 65ad67b0df22
parent 9351 cfd5d793ac89
child 9402 2c48c091b6a2
child 9411 6aec72169ee1
equal deleted inserted replaced
9395:96dba2efd16d 9396:e83cbc116352
   709     """return a function forwarding calls to transaction.
   709     """return a function forwarding calls to transaction.
   710 
   710 
   711     This is to be used by session"""
   711     This is to be used by session"""
   712     def meth_from_tx(session, *args, **kwargs):
   712     def meth_from_tx(session, *args, **kwargs):
   713         return getattr(session._tx, meth_name)(*args, **kwargs)
   713         return getattr(session._tx, meth_name)(*args, **kwargs)
       
   714     meth_from_tx.__doc__ = getattr(Transaction, meth_name).__doc__
   714     return meth_from_tx
   715     return meth_from_tx
   715 
   716 
   716 
   717 
   717 class Session(RequestSessionBase):
   718 class Session(RequestSessionBase):
   718     """Repository user session
   719     """Repository user session
   765       :attr:`cnxset`, the connections set to use to execute queries on sources.
   766       :attr:`cnxset`, the connections set to use to execute queries on sources.
   766       During a transaction, the connection set may be freed so that is may be
   767       During a transaction, the connection set may be freed so that is may be
   767       used by another session as long as no writing is done. This means we can
   768       used by another session as long as no writing is done. This means we can
   768       have multiple sessions with a reasonably low connections set pool size.
   769       have multiple sessions with a reasonably low connections set pool size.
   769 
   770 
   770     .. automethod:: cubicweb.server.session.set_cnxset
   771       .. automethod:: cubicweb.server.session.Session.set_cnxset
   771     .. automethod:: cubicweb.server.session.free_cnxset
   772       .. automethod:: cubicweb.server.session.Session.free_cnxset
   772 
   773 
   773       :attr:`mode`, string telling the connections set handling mode, may be one
   774       :attr:`mode`, string telling the connections set handling mode, may be one
   774       of 'read' (connections set may be freed), 'write' (some write was done in
   775       of 'read' (connections set may be freed), 'write' (some write was done in
   775       the connections set, it can't be freed before end of the transaction),
   776       the connections set, it can't be freed before end of the transaction),
   776       'transaction' (we want to keep the connections set during all the
   777       'transaction' (we want to keep the connections set during all the