Demo for query storing

Change-Id: I947bcac841992c3f6cfd01ab337c265b0d01cb70
diff --git a/node_modules/v8flags/LICENSE b/node_modules/v8flags/LICENSE
new file mode 100644
index 0000000..ca63f90
--- /dev/null
+++ b/node_modules/v8flags/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-2018 Tyler Kellen <tyler@sleekcode.net>, Blaine Bublitz <blaine.bublitz@gmail.com>, and Eric Schoffstall <yo@contra.io>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/v8flags/README.md b/node_modules/v8flags/README.md
new file mode 100644
index 0000000..2760f8e
--- /dev/null
+++ b/node_modules/v8flags/README.md
@@ -0,0 +1,64 @@
+<p align="center">
+  <a href="http://gulpjs.com">
+    <img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
+  </a>
+</p>
+
+# v8flags
+
+[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
+
+Get available v8 flags.
+
+## Usage
+```js
+const v8flags = require('v8flags');
+
+v8flags(function(err, results) {
+  console.log(results);
+  // [ '--use_strict',
+  //   '--es5_readonly',
+  //   '--es52_globals',
+  //   '--harmony_typeof',
+  //   '--harmony_scoping',
+  //   '--harmony_modules',
+  //   '--harmony_proxies',
+  //   '--harmony_collections',
+  //   '--harmony',
+  // ...
+});
+```
+
+## API
+
+### `v8flags(cb)`
+
+Finds the available flags and calls the passed callback with any errors and an array of flag results.
+
+### `v8flags.configfile`
+
+The name of the cache file for flags.
+
+### `v8flags.configPath`
+
+The filepath location of the `configfile` above.
+
+## License
+
+MIT
+
+[downloads-image]: http://img.shields.io/npm/dm/v8flags.svg
+[npm-url]: https://www.npmjs.com/package/v8flags
+[npm-image]: http://img.shields.io/npm/v/v8flags.svg
+
+[travis-url]: https://travis-ci.org/gulpjs/v8flags
+[travis-image]: http://img.shields.io/travis/gulpjs/v8flags.svg?label=travis-ci
+
+[appveyor-url]: https://ci.appveyor.com/project/gulpjs/v8flags
+[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/v8flags.svg?label=appveyor
+
+[coveralls-url]: https://coveralls.io/r/gulpjs/v8flags
+[coveralls-image]: http://img.shields.io/coveralls/gulpjs/v8flags/master.svg
+
+[gitter-url]: https://gitter.im/gulpjs/gulp
+[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
diff --git a/node_modules/v8flags/config-path.js b/node_modules/v8flags/config-path.js
new file mode 100644
index 0000000..1acbe45
--- /dev/null
+++ b/node_modules/v8flags/config-path.js
@@ -0,0 +1,38 @@
+var os = require('os');
+var path = require('path');
+var userHome = require('homedir-polyfill')();
+
+var env = process.env;
+var name = 'js-v8flags';
+
+function macos() {
+  var library = path.join(userHome, 'Library');
+  return path.join(library, 'Caches', name);
+}
+
+function windows() {
+  var appData = env.LOCALAPPDATA || path.join(userHome, 'AppData', 'Local');
+  return path.join(appData, name);
+}
+
+// https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
+function linux() {
+  var username = path.basename(userHome);
+  return path.join(env.XDG_CACHE_HOME || path.join(userHome, '.cache'), name);
+}
+
+module.exports = function(platform) {
+  if (!userHome) {
+    return os.tmpdir();
+  }
+
+  if (platform === 'darwin') {
+    return macos();
+  }
+
+  if (platform === 'win32') {
+    return windows();
+  }
+
+  return linux();
+};
diff --git a/node_modules/v8flags/index.js b/node_modules/v8flags/index.js
new file mode 100644
index 0000000..f8ebcc1
--- /dev/null
+++ b/node_modules/v8flags/index.js
@@ -0,0 +1,162 @@
+// this entire module is depressing. i should have spent my time learning
+// how to patch v8 so that these options would just be available on the
+// process object.
+
+var os = require('os');
+var fs = require('fs');
+var path = require('path');
+var crypto = require('crypto');
+var execFile = require('child_process').execFile;
+var configPath = require('./config-path.js')(process.platform);
+var version = require('./package.json').version;
+var env = process.env;
+var user = env.LOGNAME || env.USER || env.LNAME || env.USERNAME || '';
+var exclusions = ['--help'];
+
+// This number must be incremented whenever the generated cache file changes.
+var CACHE_VERSION = 1;
+
+var configfile = '.v8flags-' + CACHE_VERSION + '-' + process.versions.v8 + '.' + crypto.createHash('md5').update(user).digest('hex') + '.json';
+
+var failureMessage = [
+  'Unable to cache a config file for v8flags to your home directory',
+  'or a temporary folder. To fix this problem, please correct your',
+  'environment by setting HOME=/path/to/home or TEMP=/path/to/temp.',
+  'NOTE: the user running this must be able to access provided path.',
+  'If all else fails, please open an issue here:',
+  'http://github.com/tkellen/js-v8flags',
+].join('\n');
+
+function fail(err) {
+  err.message += '\n\n' + failureMessage;
+  return err;
+}
+
+function openConfig(cb) {
+  fs.mkdir(configPath, function() {
+    tryOpenConfig(path.join(configPath, configfile), function(err, fd) {
+      if (err) {
+        return tryOpenConfig(path.join(os.tmpdir(), configfile), cb);
+      }
+      return cb(null, fd);
+    });
+  });
+}
+
+function tryOpenConfig(configpath, cb) {
+  try {
+    // if the config file is valid, it should be json and therefore
+    // node should be able to require it directly. if this doesn't
+    // throw, we're done!
+    var content = require(configpath);
+    process.nextTick(function() {
+      cb(null, content);
+    });
+  } catch (e) {
+    // if requiring the config file failed, maybe it doesn't exist, or
+    // perhaps it has become corrupted. instead of calling back with the
+    // content of the file, call back with a file descriptor that we can
+    // write the cached data to
+    fs.open(configpath, 'w+', function(err, fd) {
+      if (err) {
+        return cb(err);
+      }
+      return cb(null, fd);
+    });
+  }
+}
+
+// Node <= 9 outputs _ in flags with multiple words, while node 10
+// uses -. Both ways are accepted anyway, so always use `_` for better
+// compatibility.
+// We must not replace the first two --.
+function normalizeFlagName(flag) {
+  return '--' + flag.slice(4).replace(/-/g, '_');
+}
+
+// i can't wait for the day this whole module is obsolete because these
+// options are available on the process object. this executes node with
+// `--v8-options` and parses the result, returning an array of command
+// line flags.
+function getFlags(cb) {
+  execFile(process.execPath, ['--v8-options'], function(execErr, result) {
+    if (execErr) {
+      return cb(execErr);
+    }
+    // If the binary doesn't return flags in the way we expect, default to an empty array
+    // Reference https://github.com/gulpjs/v8flags/issues/53
+    var matchedFlags = result.match(/\s\s--[\w-]+/gm) || [];
+    var flags = matchedFlags
+      .map(normalizeFlagName)
+      .filter(function(name) {
+        return exclusions.indexOf(name) === -1;
+      });
+    return cb(null, flags);
+  });
+}
+
+// write some json to a file descriptor. if this fails, call back
+// with both the error and the data that was meant to be written.
+function writeConfig(fd, flags, cb) {
+  var json = JSON.stringify(flags);
+  var buf;
+  if (Buffer.from && Buffer.from !== Uint8Array.from) {
+    // Node.js 4.5.0 or newer
+    buf = Buffer.from(json);
+  } else {
+    // Old Node.js versions
+    // The typeof safeguard below is mostly against accidental copy-pasting
+    // and code rewrite, it never happens as json is always a string here.
+    if (typeof json === 'number') {
+      throw new Error('Unexpected type number');
+    }
+    buf = new Buffer(json);
+  }
+  return fs.write(fd, buf, 0, buf.length, 0 , function(writeErr) {
+    fs.close(fd, function(closeErr) {
+      var err = writeErr || closeErr;
+      if (err) {
+        return cb(fail(err), flags);
+      }
+      return cb(null, flags);
+    });
+  });
+}
+
+module.exports = function(cb) {
+  // bail early if this is not node
+  var isElectron = process.versions && process.versions.electron;
+  if (isElectron) {
+    return process.nextTick(function() {
+      cb(null, []);
+    });
+  }
+
+  // attempt to open/read cache file
+  openConfig(function(openErr, result) {
+    if (!openErr && typeof result !== 'number') {
+      return cb(null, result);
+    }
+    // if the result is not an array, we need to go fetch
+    // the flags by invoking node with `--v8-options`
+    getFlags(function(flagsErr, flags) {
+      // if there was an error fetching the flags, bail immediately
+      if (flagsErr) {
+        return cb(flagsErr);
+      }
+      // if there was a problem opening the config file for writing
+      // throw an error but include the flags anyway so that users
+      // can continue to execute (at the expense of having to fetch
+      // flags on every run until they fix the underyling problem).
+      if (openErr) {
+        return cb(fail(openErr), flags);
+      }
+      // write the config file to disk so subsequent runs can read
+      // flags out of a cache file.
+      return writeConfig(result, flags, cb);
+    });
+  });
+};
+
+module.exports.configfile = configfile;
+module.exports.configPath = configPath;
diff --git a/node_modules/v8flags/package.json b/node_modules/v8flags/package.json
new file mode 100644
index 0000000..50765dc
--- /dev/null
+++ b/node_modules/v8flags/package.json
@@ -0,0 +1,99 @@
+{
+  "_from": "v8flags@~3.1.1",
+  "_id": "v8flags@3.1.3",
+  "_inBundle": false,
+  "_integrity": "sha512-amh9CCg3ZxkzQ48Mhcb8iX7xpAfYJgePHxWMQCBWECpOSqJUXgY26ncA61UTV0BkPqfhcy6mzwCIoP4ygxpW8w==",
+  "_location": "/v8flags",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "v8flags@~3.1.1",
+    "name": "v8flags",
+    "escapedName": "v8flags",
+    "rawSpec": "~3.1.1",
+    "saveSpec": null,
+    "fetchSpec": "~3.1.1"
+  },
+  "_requiredBy": [
+    "/grunt/grunt-cli"
+  ],
+  "_resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.3.tgz",
+  "_shasum": "fc9dc23521ca20c5433f81cc4eb9b3033bb105d8",
+  "_spec": "v8flags@~3.1.1",
+  "_where": "C:\\Users\\marcr\\Desktop\\KorAp\\Git\\Kalamar\\node_modules\\grunt\\node_modules\\grunt-cli",
+  "author": {
+    "name": "Gulp Team",
+    "email": "team@gulpjs.com",
+    "url": "http://gulpjs.com/"
+  },
+  "bugs": {
+    "url": "https://github.com/gulpjs/v8flags/issues"
+  },
+  "bundleDependencies": false,
+  "contributors": [
+    {
+      "name": "Tyler Kellen",
+      "email": "tyler@sleekcode.net"
+    },
+    {
+      "name": "Blaine Bublitz",
+      "email": "blaine.bublitz@gmail.com"
+    },
+    {
+      "name": "Nicolò Ribaudo",
+      "email": "nicolo.ribaudo@gmail.com"
+    },
+    {
+      "name": "Selwyn",
+      "email": "talk@selwyn.cc"
+    },
+    {
+      "name": "Leo Zhang",
+      "email": "leo@leozhang.me"
+    }
+  ],
+  "dependencies": {
+    "homedir-polyfill": "^1.0.1"
+  },
+  "deprecated": false,
+  "description": "Get available v8 flags.",
+  "devDependencies": {
+    "async": "^2.5.0",
+    "eslint": "^2.13.0",
+    "eslint-config-gulp": "^3.0.1",
+    "expect": "^1.20.2",
+    "istanbul": "^0.4.3",
+    "istanbul-coveralls": "^1.0.3",
+    "mocha": "^3.5.3",
+    "proxyquire": "^1.8.0"
+  },
+  "engines": {
+    "node": ">= 0.10"
+  },
+  "files": [
+    "index.js",
+    "config-path.js",
+    "LICENSE"
+  ],
+  "homepage": "https://github.com/gulpjs/v8flags#readme",
+  "keywords": [
+    "v8 flags",
+    "harmony flags"
+  ],
+  "license": "MIT",
+  "main": "index.js",
+  "name": "v8flags",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/gulpjs/v8flags.git"
+  },
+  "scripts": {
+    "cover": "istanbul cover _mocha --report lcovonly",
+    "coveralls": "npm run cover && istanbul-coveralls",
+    "lint": "eslint .",
+    "pretest": "npm run lint",
+    "test": "mocha --async-only"
+  },
+  "version": "3.1.3"
+}