IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32457 for trunk/ippToPsps


Ignore:
Timestamp:
Sep 29, 2011, 3:18:01 PM (15 years ago)
Author:
rhenders
Message:

added a method to lock a table and a method to unlock all tables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/jython/mysql.py

    r32293 r32457  
    4747        self.everythingOK = True
    4848
    49 
    5049    '''
    5150    Disconnect from database
     
    6160        self.logger.debug("MySql destructor")
    6261        self.disconnect()
     62   
     63    '''
     64    Locks a table. This is wait if the locks is already held by another session
     65    '''
     66    def lockTable(self, table):
     67        self.execute("LOCK TABLES " + table + " WRITE")
     68
     69    '''
     70    Unlocks all tables locked by this session.
     71    '''
     72    def unlockTables(self):
     73        self.execute("UNLOCK TABLES")
    6374
    6475    '''
Note: See TracChangeset for help on using the changeset viewer.