-
-
Notifications
You must be signed in to change notification settings - Fork 51
Support query_group for WLM #59
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -567,6 +567,22 @@ def __init__(self, *args, **kwargs): | |
self.introspection = DatabaseIntrospection(self) | ||
self.validation = BaseDatabaseValidation(self) | ||
|
||
def get_connection_params(self): | ||
conn_params = super(DatabaseWrapper, self).get_connection_params() | ||
self.query_group = conn_params.pop('query_group', None) | ||
return conn_params | ||
|
||
def init_connection_state(self): | ||
super(DatabaseWrapper, self).init_connection_state() | ||
assignments = [] | ||
if self.query_group: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it would be better that |
||
assignments.append('SET query_group TO \'{query_group}\''.format( | ||
query_group=self.query_group)) | ||
|
||
if assignments: | ||
with self.cursor() as cursor: | ||
cursor.execute('; '.join(assignments)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are you using LIST type for |
||
|
||
def check_constraints(self, table_names=None): | ||
""" | ||
No constraints to check in Redshift. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.0.1
means PATCH version that should be used for minor bug fix.1.1.0
is good for 'New Features' on semver.