sqlparse
sqlparse copied to clipboard
Add sql_keywords option (fixes #384)
You may pass a dict with a list of specific dialect keywords to consider.
Default behavior is to consider all supported dialects (oracle, plpgsql, hql).
keywords.keywords_map(*dialects) helper is provided to merge individual dialect maps.
You may use this to restrict keyword matching to a specific subset of dialects i.e. keywords_map(KEYWORDS_HQL,KEYWORDS_PLPGSQL)
See test_regression.py:test_issue384()
This replaces PR #500 with a new one using its own branch instead of master.
@andialbrecht - Is there anything else this PR needs to be merged? We'd like to use sqlparse
for Snowflake and this would be really helpful for adding the additional dialect keywords.
What's the status on this PR? I would love to use this library to parse our BigQuery SQL.
Is there anything I can do to help? @andialbrecht