Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/app/pages/queries/QuerySource.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ function QuerySource(props) {
data-executing={isQueryExecuting ? "true" : null}
syntax={dataSource ? dataSource.syntax : null}
value={query.query}
schema={schema}
schema={schema.length && schema[0].name ? schema : null}
autocompleteEnabled={autocompleteAvailable && autocompleteEnabled}
onChange={handleQueryEditorChange}
onSelectionChange={setSelectedText}
Expand Down
11 changes: 9 additions & 2 deletions client/app/services/query-result.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { axios } from "@/services/axios";
import { QueryResultError } from "@/services/query";
import { Auth } from "@/services/auth";
import { isString, uniqBy, each, isNumber, includes, extend, forOwn, get } from "lodash";
import JSONbig from "json-bigint";

const { parse: jsonParse } = JSONbig({ storeAsString: true });
const logger = debug("redash:services:QueryResult");
const filterTypes = ["filter", "multi-filter", "multiFilter"];

Expand Down Expand Up @@ -45,7 +47,10 @@ function getColumnFriendlyName(column) {

const createOrSaveUrl = data => (data.id ? `api/query_results/${data.id}` : "api/query_results");
const QueryResultResource = {
get: ({ id }) => axios.get(`api/query_results/${id}`),
get: ({ id }) =>
axios.get(`api/query_results/${id}`, {
transformResponse: response => jsonParse(response),
}),
post: data => axios.post(createOrSaveUrl(data), data),
};

Expand Down Expand Up @@ -348,7 +353,9 @@ class QueryResult {
queryResult.deferred.onStatusChange(ExecutionStatus.LOADING_RESULT);

axios
.get(`api/queries/${queryId}/results/${id}.json`)
.get(`api/queries/${queryId}/results/${id}.json`, {
transformResponse: response => jsonParse(response),
})
.then(response => {
// Success handler
queryResult.isLoadingResult = false;
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"font-awesome": "^4.7.0",
"history": "^4.10.1",
"hoist-non-react-statics": "^3.3.0",
"json-bigint": "^1.0.0",
"markdown": "0.5.0",
"material-design-iconic-font": "^2.2.0",
"mousetrap": "^1.6.1",
Expand Down Expand Up @@ -179,8 +180,8 @@
]
},
"browser": {
"fs": false,
"path": false
"fs": false,
"path": false
},
"//": "browserslist set to 'Async functions' compatibility",
"browserslist": [
Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3442,6 +3442,11 @@ big.js@^5.2.2:
resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328"
integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==

bignumber.js@^9.0.0:
version "9.1.2"
resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.2.tgz#b7c4242259c008903b13707983b5f4bbd31eda0c"
integrity sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==

binary-extensions@^1.0.0:
version "1.13.0"
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.0.tgz#9523e001306a32444b907423f1de2164222f6ab1"
Expand Down Expand Up @@ -9436,6 +9441,13 @@ jsesc@~0.5.0:
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=

json-bigint@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/json-bigint/-/json-bigint-1.0.0.tgz#ae547823ac0cad8398667f8cd9ef4730f5b01ff1"
integrity sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==
dependencies:
bignumber.js "^9.0.0"

json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9"
Expand Down