FIX: Allow the Data Explorer API to set LIMIT to "ALL"

Fixes a bug that prevented returning unlimited rows.

Example request:
{{base_url}}/admin/plugins/explorer/queries/6/run?api_key={{api_key}}&api_username={{api_username}}&limit=ALL

From the PostgreSQL docs: "LIMIT ALL" is treated as no limit
https://www.postgresql.org/docs/current/static/sql-select.html#SQL-LIMIT
This commit is contained in:
Rishabh
2019-01-23 16:18:06 +05:30
parent a96bfdf6d5
commit a285a38e9c
2 changed files with 8 additions and 4 deletions
@@ -34,7 +34,7 @@ const QueryResultComponent = Ember.Component.extend({
@computed("content.result_count")
resultCount: function(count) {
if (count === this.get("content.result_limit")) {
if (count === this.get("content.default_limit")) {
return I18n.t("explorer.max_result_count", { count });
} else {
return I18n.t("explorer.result_count", { count });