FIX: Don't send extra_data when exporting results to JSON

The extra data is needed to render avatars and user metadata when rendering results in the browser,
we can skip this data for JSON exports to reduce bloat
This commit is contained in:
Rishabh 2019-01-24 12:46:02 +05:30
parent a285a38e9c
commit a3c9cd7363
1 changed files with 6 additions and 3 deletions

View File

@ -1115,9 +1115,12 @@ SQL
default_limit: DataExplorer::QUERY_RESULT_MAX_LIMIT default_limit: DataExplorer::QUERY_RESULT_MAX_LIMIT
} }
json[:explain] = result[:explain] if opts[:explain] json[:explain] = result[:explain] if opts[:explain]
ext = DataExplorer.add_extra_data(pg_result)
json[:colrender] = ext[1] if !params[:download]
json[:relations] = ext[0] ext = DataExplorer.add_extra_data(pg_result)
json[:colrender] = ext[1]
json[:relations] = ext[0]
end
json[:rows] = pg_result.values json[:rows] = pg_result.values