Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more sql dumps #615

Merged
merged 5 commits into from
Nov 7, 2023
Merged

more sql dumps #615

merged 5 commits into from
Nov 7, 2023

Conversation

kazet
Copy link
Member

@kazet kazet commented Nov 5, 2023

No description provided.

# strip() to allow lines starting with whitespace
line.strip().startswith("create table")
or line.strip().startswith("alter table")
or line.strip().startswith("insert into")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would put identifier strings in list variable and put these line.strip() conditions in any([line.strip().startswith(s) for s in strings])

for marker in sql_dump_markers:
if line.startswith(marker):
return True
return False
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return any(line.startswith(marker) for marker in sql_dump_markers)

@kazet kazet merged commit e53e10f into main Nov 7, 2023
4 checks passed
@kazet kazet deleted the more-sql-dumps branch November 7, 2023 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants