Mercurial > p > mysql-python > mysqldb-2
comparison MySQLdb/connections.py @ 9:0e37ee00beb7 MySQLdb
Merge changes from 1.2 branch (r470:483): Mostly build-related.
author | adustman |
---|---|
date | Mon, 26 Feb 2007 00:55:29 +0000 |
parents | b70cce9bd065 |
children | 7773efbe9b30 |
comparison
equal
deleted
inserted
replaced
8:fa8974a41c76 | 9:0e37ee00beb7 |
---|---|
223 used. | 223 used. |
224 | 224 |
225 """ | 225 """ |
226 return (cursorclass or self.cursorclass)(self) | 226 return (cursorclass or self.cursorclass)(self) |
227 | 227 |
228 def __enter__(self): return self.cursor() | |
229 | |
230 def __exit__(self, exc, value, tb): | |
231 if exc: | |
232 self.rollback() | |
233 else: | |
234 self.commit() | |
235 | |
228 def literal(self, o): | 236 def literal(self, o): |
229 """ | 237 """ |
230 | 238 |
231 If o is a single object, returns an SQL literal as a string. | 239 If o is a single object, returns an SQL literal as a string. |
232 If o is a non-string sequence, the items of the sequence are | 240 If o is a non-string sequence, the items of the sequence are |