diff --git a/src/Explorer/Tabs/QueryTab.html b/src/Explorer/Tabs/QueryTab.html index e27a4bb7c..ff4b40b06 100644 --- a/src/Explorer/Tabs/QueryTab.html +++ b/src/Explorer/Tabs/QueryTab.html @@ -11,6 +11,17 @@ Start by writing a Mongo query, for example: {'id':'foo'} or { } to get all the documents. +
+
+ Error + + We have detected you may be using a subquery. Non-correlated subqueries are not currently supported. + Please see Cosmos sub query documentation for further information + +
+
; + public maybeSubQuery: ko.Computed; public sqlQueryEditorContent: ko.Observable; public selectedContent: ko.Observable; public sqlStatementToExecute: ko.Observable; @@ -120,6 +119,11 @@ export default class QueryTab extends TabsBase implements ViewModels.WaitsForTem return (container && (container.isPreferredApiDocumentDB() || container.isPreferredApiGraph())) || false; }); + this.maybeSubQuery = ko.computed(function() { + const sql = this.sqlQueryEditorContent(); + return sql && /.*\(.*SELECT.*\)/i.test(sql); + }, this); + this.saveQueryButton = { enabled: this._isSaveQueriesEnabled, visible: this._isSaveQueriesEnabled