Skip to content

Commit

Permalink
fix parse set statement for lines with substr set
Browse files Browse the repository at this point in the history
Previously the SQL line `settling_xyz boolean,` was parsed as a SET statement. Now the word SET is being searched by regex.
  • Loading branch information
burakuyar authored and xnuinside committed Mar 25, 2022
1 parent 07f8b1f commit 89f2868
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simple_ddl_parser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def process_set(self) -> None:
self.tables.append({"name": name, "value": value})

def parse_set_statement(self):
if re.match(r"SET", self.line.upper()):
if re.match(r"SET ", self.line.upper()):
self.set_was_in_line = True
if not self.set_line:
self.set_line = self.line
Expand Down

0 comments on commit 89f2868

Please sign in to comment.