Changes between Version 2 and Version 3 of TracDev/Proposals/Journaling
- Timestamp:
- Nov 24, 2006, 3:01:31 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracDev/Proposals/Journaling
v2 v3 127 127 ... 128 128 # Getting a new transaction for creating a Wiki page 129 tnx = Transaction(self.env.get_db_cnx())130 tnx.prepare(req , 'CREATE')129 tnx = ModelTransaction(self.env.get_db_cnx()) 130 tnx.prepare(req.authname, 'CREATE') 131 131 tnx.save('wiki', id=pagename, readonly=readonly, content=content) 132 132 tnx.commit() # flush all changes to disk … … 135 135 class TicketModule(): 136 136 def _do_save(self, ticket): 137 tnx = Transaction(self.env.get_db_cnx())137 tnx = ModelTransaction(self.env.get_db_cnx()) 138 138 tnx.prepare(req, 'MODIFY') 139 139 tnx.save('ticket', ticket) … … 141 141 self.notify(tnx) # dispatch change information to listeners 142 142 }}} 143 The actual ` Transaction` object would know how to modify the underlying (generic) data model.143 The actual `ModelTransaction` object would know how to modify the underlying (generic) data model, hence the "Model" in the name. 144 144 145 145