Demo for query storing

Change-Id: I947bcac841992c3f6cfd01ab337c265b0d01cb70
diff --git a/node_modules/fs-mkdirp-stream/LICENSE b/node_modules/fs-mkdirp-stream/LICENSE
new file mode 100644
index 0000000..73593ac
--- /dev/null
+++ b/node_modules/fs-mkdirp-stream/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2017 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> and other contributors (Originally based on code from node-mkdirp - MIT/X11 license - Copyright 2010 James Halliday)
+
+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/fs-mkdirp-stream/README.md b/node_modules/fs-mkdirp-stream/README.md
new file mode 100644
index 0000000..819f8a3
--- /dev/null
+++ b/node_modules/fs-mkdirp-stream/README.md
@@ -0,0 +1,65 @@
+<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>
+
+# fs-mkdirp-stream
+
+[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![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]
+
+Ensure directories exist before writing to them.
+
+## Usage
+
+```js
+var to = require('to2');
+var from = require('from2');
+var mkdirpStream = require('fs-mkdirp-stream');
+
+from.obj([{ dirname: '/path/to/my/', path: '/path/to/my/file.js' }])
+  .pipe(mkdirpStream.obj(function(obj, callback) {
+    // callback can take 3 arguments (err, dirname, mode)
+    callback(null, obj.dirname);
+  }))
+  .pipe(to.obj(function(obj) {
+    // This will be called once the directory exists
+    // obj === { dirname: '/path/to/my/', path: '/path/to/my/file.js' }
+  }));
+```
+
+## API
+
+### `mkdirpStream(resolver)`
+
+Takes a `resolver` function or string and returns a `through2` stream.
+
+If the `resolver` is a function, it will be called once per chunk with the signature `(chunk, callback)`. The `callback(error, dirpath, mode)` must be called with the `dirpath` to be created as the 2nd parameter or an `error` as the 1st parameter; optionally with a `mode` as the 3rd parameter.
+
+If the `resolver` is a string, it will be created/ensured for each chunk (e.g. if it were deleted between chunks, it would be recreated). When using a string, a custom `mode` can't be used.
+
+### `mkdirpStream.obj(resolver)`
+
+The same as the top-level API but for object streams. See the example to see the benefit of object streams with this module.
+
+## License
+
+MIT
+
+Contains a custom implementation of `mkdirp` originally based on https://github.com/substack/node-mkdirp (Licensed MIT/X11 - Copyright 2010 James Halliday) with heavy modification to better support custom modes.
+
+[downloads-image]: http://img.shields.io/npm/dm/fs-mkdirp-stream.svg
+[npm-url]: https://npmjs.com/package/fs-mkdirp-stream
+[npm-image]: http://img.shields.io/npm/v/fs-mkdirp-stream.svg
+
+[travis-url]: https://travis-ci.org/gulpjs/fs-mkdirp-stream
+[travis-image]: http://img.shields.io/travis/gulpjs/fs-mkdirp-stream.svg?label=travis-ci
+
+[appveyor-url]: https://ci.appveyor.com/project/gulpjs/fs-mkdirp-stream
+[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/fs-mkdirp-stream.svg?label=appveyor
+
+[coveralls-url]: https://coveralls.io/r/gulpjs/fs-mkdirp-stream
+[coveralls-image]: http://img.shields.io/coveralls/gulpjs/fs-mkdirp-stream/master.svg
+
+[gitter-url]: https://gitter.im/gulpjs/gulp
+[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png
diff --git a/node_modules/fs-mkdirp-stream/index.js b/node_modules/fs-mkdirp-stream/index.js
new file mode 100644
index 0000000..cde5e19
--- /dev/null
+++ b/node_modules/fs-mkdirp-stream/index.js
@@ -0,0 +1,50 @@
+'use strict';
+
+var through = require('through2');
+
+var mkdirp = require('./mkdirp');
+
+function toFunction(dirpath) {
+  function stringResolver(chunk, callback) {
+    callback(null, dirpath);
+  }
+
+  return stringResolver;
+}
+
+function define(options) {
+
+  function mkdirpStream(resolver) {
+    // Handle resolver that's just a dirpath
+    if (typeof resolver === 'string') {
+      resolver = toFunction(resolver);
+    }
+
+    function makeFileDirs(chunk, enc, callback) {
+      resolver(chunk, onDirpath);
+
+      function onDirpath(dirpathErr, dirpath, mode) {
+        if (dirpathErr) {
+          return callback(dirpathErr);
+        }
+
+        mkdirp(dirpath, mode, onMkdirp);
+      }
+
+      function onMkdirp(mkdirpErr) {
+        if (mkdirpErr) {
+          return callback(mkdirpErr);
+        }
+
+        callback(null, chunk);
+      }
+    }
+
+    return through(options, makeFileDirs);
+  }
+
+  return mkdirpStream;
+}
+
+module.exports = define();
+module.exports.obj = define({ objectMode: true, highWaterMark: 16 });
diff --git a/node_modules/fs-mkdirp-stream/mkdirp.js b/node_modules/fs-mkdirp-stream/mkdirp.js
new file mode 100644
index 0000000..e70031b
--- /dev/null
+++ b/node_modules/fs-mkdirp-stream/mkdirp.js
@@ -0,0 +1,71 @@
+'use strict';
+
+var path = require('path');
+
+var fs = require('graceful-fs');
+
+var MASK_MODE = parseInt('7777', 8);
+var DEFAULT_DIR_MODE = parseInt('0777', 8);
+
+function mkdirp(dirpath, customMode, callback) {
+  if (typeof customMode === 'function') {
+    callback = customMode;
+    customMode = undefined;
+  }
+
+  var mode = customMode || (DEFAULT_DIR_MODE & ~process.umask());
+  dirpath = path.resolve(dirpath);
+
+  fs.mkdir(dirpath, mode, onMkdir);
+
+  function onMkdir(mkdirErr) {
+    if (!mkdirErr) {
+      return fs.stat(dirpath, onStat);
+    }
+
+    switch (mkdirErr.code) {
+      case 'ENOENT': {
+        return mkdirp(path.dirname(dirpath), onRecurse);
+      }
+
+      case 'EEXIST': {
+        return fs.stat(dirpath, onStat);
+      }
+
+      default: {
+        return callback(mkdirErr);
+      }
+    }
+
+    function onStat(statErr, stats) {
+      if (statErr) {
+        return callback(statErr);
+      }
+
+      if (!stats.isDirectory()) {
+        return callback(mkdirErr);
+      }
+
+      // TODO: Is it proper to mask like this?
+      if ((stats.mode & MASK_MODE) === mode) {
+        return callback();
+      }
+
+      if (!customMode) {
+        return callback();
+      }
+
+      fs.chmod(dirpath, mode, callback);
+    }
+  }
+
+  function onRecurse(recurseErr) {
+    if (recurseErr) {
+      return callback(recurseErr);
+    }
+
+    mkdirp(dirpath, mode, callback);
+  }
+}
+
+module.exports = mkdirp;
diff --git a/node_modules/fs-mkdirp-stream/package.json b/node_modules/fs-mkdirp-stream/package.json
new file mode 100644
index 0000000..1e278b3
--- /dev/null
+++ b/node_modules/fs-mkdirp-stream/package.json
@@ -0,0 +1,91 @@
+{
+  "_from": "fs-mkdirp-stream@^1.0.0",
+  "_id": "fs-mkdirp-stream@1.0.0",
+  "_inBundle": false,
+  "_integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=",
+  "_location": "/fs-mkdirp-stream",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "fs-mkdirp-stream@^1.0.0",
+    "name": "fs-mkdirp-stream",
+    "escapedName": "fs-mkdirp-stream",
+    "rawSpec": "^1.0.0",
+    "saveSpec": null,
+    "fetchSpec": "^1.0.0"
+  },
+  "_requiredBy": [
+    "/vinyl-fs"
+  ],
+  "_resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz",
+  "_shasum": "0b7815fc3201c6a69e14db98ce098c16935259eb",
+  "_spec": "fs-mkdirp-stream@^1.0.0",
+  "_where": "C:\\Users\\marcr\\Desktop\\KorAp\\Git\\Kalamar\\node_modules\\vinyl-fs",
+  "author": {
+    "name": "Gulp Team",
+    "email": "team@gulpjs.com",
+    "url": "http://gulpjs.com/"
+  },
+  "bugs": {
+    "url": "https://github.com/gulpjs/fs-mkdirp-stream/issues"
+  },
+  "bundleDependencies": false,
+  "contributors": [
+    {
+      "name": "Blaine Bublitz",
+      "email": "blaine.bublitz@gmail.com"
+    }
+  ],
+  "dependencies": {
+    "graceful-fs": "^4.1.11",
+    "through2": "^2.0.3"
+  },
+  "deprecated": false,
+  "description": "Ensure directories exist before writing to them.",
+  "devDependencies": {
+    "eslint": "^1.10.3",
+    "eslint-config-gulp": "^2.0.0",
+    "expect": "^1.20.2",
+    "istanbul": "^0.4.3",
+    "istanbul-coveralls": "^1.0.3",
+    "jscs": "^2.4.0",
+    "jscs-preset-gulp": "^1.0.0",
+    "mississippi": "^1.3.0",
+    "mocha": "^3.2.0",
+    "rimraf": "^2.6.1"
+  },
+  "engines": {
+    "node": ">= 0.10"
+  },
+  "files": [
+    "LICENSE",
+    "index.js",
+    "mkdirp.js"
+  ],
+  "homepage": "https://github.com/gulpjs/fs-mkdirp-stream#readme",
+  "keywords": [
+    "fs",
+    "mkdirp",
+    "stream",
+    "mkdir",
+    "directory",
+    "directories",
+    "ensure"
+  ],
+  "license": "MIT",
+  "main": "index.js",
+  "name": "fs-mkdirp-stream",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/gulpjs/fs-mkdirp-stream.git"
+  },
+  "scripts": {
+    "cover": "istanbul cover _mocha --report lcovonly",
+    "coveralls": "npm run cover && istanbul-coveralls",
+    "lint": "eslint index.js mkdirp.js test/ && jscs index.js mkdirp.js test/",
+    "pretest": "npm run lint",
+    "test": "mocha --async-only"
+  },
+  "version": "1.0.0"
+}