Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Commit

Permalink
Shimming in things for non-pg backends
Browse files Browse the repository at this point in the history
  • Loading branch information
vegitron committed Apr 11, 2017
1 parent 93632db commit 508ce49
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sqlshare_rest/backend/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ def get_query_plan(self, sql, user):
"""
return ""

def run_named_cursor_query(self, *args, **kwargs):
return self.run_query(*args, **kwargs)

def finish_named_cursor(self, *args, **kwargs):
pass

def run_query(self, sql, user, params=None, return_cursor=False,
query=None):
self._not_implemented("run_query")
Expand Down
1 change: 1 addition & 0 deletions sqlshare_rest/views/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def response_for_query(sql, user, download_name):
disposition = 'attachment; filename="%s"' % download_name
response = StreamingHttpResponse(stream_query(cursor, user),
content_type='text/csv')

response['Content-Disposition'] = disposition
return response
except Exception as ex:
Expand Down

0 comments on commit 508ce49

Please sign in to comment.