Mercurial > p > mysql-python > mysqldb-2
comparison MySQLdb/cursors.py @ 31:10038670b963 MySQLdb
Merge back r553 bug fix #2137599 for VALUES regex
author | kylev |
---|---|
date | Wed, 11 Feb 2009 22:15:41 +0000 |
parents | d55bfb1a4701 |
children | 6e31278d3433 |
comparison
equal
deleted
inserted
replaced
30:e3eb10510ddc | 31:10038670b963 |
---|---|
9 | 9 |
10 __revision__ = "$Revision$"[11:-2] | 10 __revision__ = "$Revision$"[11:-2] |
11 __author__ = "$Author$"[9:-2] | 11 __author__ = "$Author$"[9:-2] |
12 | 12 |
13 import re | 13 import re |
14 INSERT_VALUES = re.compile( | 14 |
15 r"^(P<start>.+\svalues\s*)(P<values>\(((?<!\\)'.*?\).*(?<!\\)?'|.)+?\))(P<end>.*)$", | 15 INSERT_VALUES = re.compile(r"\svalues\s*" |
16 re.IGNORECASE) | 16 r"(\(((?<!\\)'[^\)]*?\)[^\)]*(?<!\\)?'" |
17 | 17 r"|[^\(\)]|" |
18 r"(?:\([^\)]*\))" | |
19 r")+\))") | |
18 | 20 |
19 class BaseCursor(object): | 21 class BaseCursor(object): |
20 | 22 |
21 """A base for Cursor classes. Useful attributes: | 23 """A base for Cursor classes. Useful attributes: |
22 | 24 |