comparison sqlpyPlus.py @ 135:4c59f4a8b680

wrestling with multi table names in from clause
author catherine@Elli.myhome.westell.com
date Thu, 28 Aug 2008 07:53:44 -0400
parents b532bc8430a6
children 2e69a257b6ab
comparison
equal deleted inserted replaced
134:b532bc8430a6 135:4c59f4a8b680
511 return [r[0] for r in self.curs.fetchall()] 511 return [r[0] for r in self.curs.fetchall()]
512 512
513 tableNameRegex = re.compile( 513 tableNameRegex = re.compile(
514 r'(from|update)\s+(([a-zA-Z0-9_#$]+)\.)?([a-zA-Z0-9_#$]+)\s+', 514 r'(from|update)\s+(([a-zA-Z0-9_#$]+)\.)?([a-zA-Z0-9_#$]+)\s+',
515 re.IGNORECASE | re.DOTALL | re.MULTILINE) 515 re.IGNORECASE | re.DOTALL | re.MULTILINE)
516 tableNameRegex = re.compile(
517 r'(from|update)(.*)(where|set)',
518 re.IGNORECASE | re.DOTALL | re.MULTILINE)
516 columnNameRegex = re.compile( 519 columnNameRegex = re.compile(
517 r'select\s+(.*)from', 520 r'select\s+(.*)from',
518 re.IGNORECASE | re.DOTALL | re.MULTILINE) 521 re.IGNORECASE | re.DOTALL | re.MULTILINE)
519 def completedefault(self, text, line, begidx, endidx): 522 def completedefault(self, text, line, begidx, endidx):
520 segment = completion.whichSegment(line) 523 segment = completion.whichSegment(line)