Changeset 92:0df1b8fbf076 in livinglogic.python.nightshade

Show
Ignore:
Timestamp:
01/14/09 11:37:57 (10 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Add methods commmit, rollback, close and cancel to Connection.

Files:
3 modified

Legend:

Unmodified
Added
Removed
  • NEWS.rst

    r87 r92  
     1Changes in 0.14 (released 01/14/2009) 
     2------------------------------------- 
     3 
     4*   :class:`ll.nightshade.Connection` has new methods :meth:`commit`, 
     5     :meth:`rollback`, :meth:`close` and  :meth:`cancel`. 
     6 
     7 
    18Changes in 0.13.1 (released 08/29/2008) 
    29--------------------------------------- 
  • setup.py

    r87 r92  
    5555args = dict( 
    5656    name="ll-nightshade", 
    57     version="0.13.1", 
     57    version="0.14", 
    5858    description="Serve the output of Oracle functions/procedures with CherryPy", 
    5959    long_description=description, 
  • src/ll/nightshade.py

    r87 r92  
    159159        connection = self._getconnection() 
    160160        return connection.cursor(**kwargs) 
    161          
     161 
     162    def commit(self): 
     163        self._getconnection().commit() 
     164 
     165    def rollback(self): 
     166        self._getconnection().rollback() 
     167 
     168    def close(self): 
     169        connection = self._getconnection() 
     170        connection.close() 
     171        self._dropconnection(connection) 
     172 
     173    def cancel(self): 
     174        self._getconnection().cancel() 
     175 
    162176    def __call__(self, func): 
    163177        def wrapper(*args, **kwargs):