Yurik has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/384202 )
Change subject: Add original query str to the queryApi object ...................................................................... Add original query str to the queryApi object In order to gain access to the original query string inside the resultBrowsers, we need to preserve the query string inside the queryApi object. This is not ideal, because the api object is both the API wrapper, with the information HOW to get the data, as well as the storage for the RESULT data itself. I think the API object should return an object with the request, server's response, and any additional metrics, thus allowing everyone to share in on it. But such change should probably happen after we migrate to Babel, and start using proper Promises. Change-Id: I4da3dd36ccec5ae5d91e210d8f344b8228008f9b --- M wikibase/queryService/api/Sparql.js 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui refs/changes/02/384202/1 diff --git a/wikibase/queryService/api/Sparql.js b/wikibase/queryService/api/Sparql.js index bd55824..2446876 100644 --- a/wikibase/queryService/api/Sparql.js +++ b/wikibase/queryService/api/Sparql.js @@ -156,12 +156,14 @@ self._resultLength = data.results.bindings.length || 0; } self._rawData = data; + self._originalQuery = query; deferred.resolve( data ); } function fail( request, options, exception ) { self._executionTime = null; self._rawData = null; + self._originalQuery = null; self._resultLength = null; self._generateErrorMessage( request, options, exception ); -- To view, visit https://gerrit.wikimedia.org/r/384202 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4da3dd36ccec5ae5d91e210d8f344b8228008f9b Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/gui Gerrit-Branch: master Gerrit-Owner: Yurik <yuriastrak...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits