Changeset 734 for trunk/pg.py


Ignore:
Timestamp:
Jan 13, 2016, 10:50:25 AM (4 years ago)
Author:
cito
Message:

Add documentation for transaction handling methods

Also, the savepoint name is not optional.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pg.py

    r733 r734  
    446446
    447447    def rollback(self, name=None):
    448         """Rollback the current transaction."""
     448        """Roll back the current transaction."""
    449449        qstr = 'ROLLBACK'
    450450        if name:
     
    452452        return self.query(qstr)
    453453
    454     def savepoint(self, name=None):
     454    def savepoint(self, name):
    455455        """Define a new savepoint within the current transaction."""
    456         qstr = 'SAVEPOINT'
    457         if name:
    458             qstr += ' ' + name
    459         return self.query(qstr)
     456        return self.query('SAVEPOINT ' + name)
    460457
    461458    def release(self, name):
Note: See TracChangeset for help on using the changeset viewer.