Demo for query storing
Change-Id: I947bcac841992c3f6cfd01ab337c265b0d01cb70
diff --git a/node_modules/continuable-cache/.jshintrc b/node_modules/continuable-cache/.jshintrc
new file mode 100644
index 0000000..30a2d72
--- /dev/null
+++ b/node_modules/continuable-cache/.jshintrc
@@ -0,0 +1,42 @@
+{
+ "asi": true,
+
+ "bitwise": false,
+ "camelcase": true,
+ "curly": false,
+ "eqeqeq": true,
+ "forin": true,
+ "immed": true,
+ "indent": 4,
+ "latedef": false,
+ "newcap": true,
+ "noarg": true,
+ "nonew": true,
+ "plusplus": false,
+ "quotmark": false,
+ "regexp": false,
+ "undef": true,
+ "unused": true,
+ "strict": false,
+ "trailing": true,
+ "noempty": true,
+ "maxdepth": 4,
+ "maxparams": 4,
+
+ "globals": {
+ "console": true,
+ "Buffer": true,
+ "setTimeout": true,
+ "clearTimeout": true,
+ "setInterval": true,
+ "clearInterval": true,
+ "require": false,
+ "module": false,
+ "exports": true,
+ "global": false,
+ "process": true,
+ "__dirname": false,
+ "__filename": false
+ },
+ "node": false
+}
diff --git a/node_modules/continuable-cache/.npmignore b/node_modules/continuable-cache/.npmignore
new file mode 100644
index 0000000..fd31f5e
--- /dev/null
+++ b/node_modules/continuable-cache/.npmignore
@@ -0,0 +1,15 @@
+.DS_Store
+.monitor
+.*.swp
+.nodemonignore
+releases
+*.log
+*.err
+fleet.json
+public/browserify
+bin/*.json
+.bin
+build
+compile
+.lock-wscript
+node_modules
diff --git a/node_modules/continuable-cache/.testem.json b/node_modules/continuable-cache/.testem.json
new file mode 100644
index 0000000..41ab90e
--- /dev/null
+++ b/node_modules/continuable-cache/.testem.json
@@ -0,0 +1,14 @@
+{
+ "launchers": {
+ "node": {
+ "command": "node ./test"
+ }
+ },
+ "src_files": [
+ "./**/*.js"
+ ],
+ "before_tests": "npm run build-test",
+ "on_exit": "rm test/static/bundle.js",
+ "test_page": "test/static/index.html",
+ "launch_in_dev": ["node", "phantomjs"]
+}
diff --git a/node_modules/continuable-cache/.travis.yml b/node_modules/continuable-cache/.travis.yml
new file mode 100644
index 0000000..52424f8
--- /dev/null
+++ b/node_modules/continuable-cache/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - 0.8
+ - 0.9
+ - 0.10
+script: node ./test/index.js
diff --git a/node_modules/continuable-cache/LICENCE b/node_modules/continuable-cache/LICENCE
new file mode 100644
index 0000000..72d356c
--- /dev/null
+++ b/node_modules/continuable-cache/LICENCE
@@ -0,0 +1,19 @@
+Copyright (c) 2013 Colingo.
+
+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/continuable-cache/README.md b/node_modules/continuable-cache/README.md
new file mode 100644
index 0000000..2702722
--- /dev/null
+++ b/node_modules/continuable-cache/README.md
@@ -0,0 +1,48 @@
+# continuable-cache
+
+<!-- [![build status][1]][2] [![dependency status][3]][4]
+
+[![browser support][5]][6] -->
+
+Cache a continuable
+
+## Example
+
+```js
+var cache = require("continuable-cache")
+var fs = require("fs")
+
+var readFile = function (uri) { return function (cb) {
+ fs.readFile(uri, cb)
+} }
+
+var continuableFile = readFile("./package.json")
+
+var cached = cache(continuableFile)
+
+// will only do one file read operation
+cached(function (err, file) {
+ /* calls out to fs.readFile */
+})
+
+cached(function (err, file) {
+ /* get's either err or file from cache in cached */
+})
+```
+
+## Installation
+
+`npm install continuable-cache`
+
+## Contributors
+
+ - Raynos
+
+## MIT Licenced
+
+ [1]: https://secure.travis-ci.org/Raynos/continuable-cache.png
+ [2]: http://travis-ci.org/Raynos/continuable-cache
+ [3]: https://david-dm.org/Raynos/continuable-cache/status.png
+ [4]: https://david-dm.org/Raynos/continuable-cache
+ [5]: https://ci.testling.com/Raynos/continuable-cache.png
+ [6]: https://ci.testling.com/Raynos/continuable-cache
diff --git a/node_modules/continuable-cache/index.js b/node_modules/continuable-cache/index.js
new file mode 100644
index 0000000..59802bb
--- /dev/null
+++ b/node_modules/continuable-cache/index.js
@@ -0,0 +1,29 @@
+var Nil = {}
+
+module.exports = cache
+
+// cache := (Continuable<T>) => Continuable<T>
+function cache(source) {
+ var _err = Nil
+ var _value = Nil
+ var _result = null
+ var listeners = null
+
+ return function continuable(callback) {
+ if (_err !== Nil || _value !== Nil) {
+ callback(_err, _value)
+ } else if (listeners) {
+ listeners.push(callback)
+ } else {
+ listeners = [callback]
+ _result = source(function (err, value) {
+ _err = err
+ _value = value
+
+ listeners.forEach(function (l) { l(err, value) })
+ })
+ }
+
+ return _result
+ }
+}
diff --git a/node_modules/continuable-cache/package.json b/node_modules/continuable-cache/package.json
new file mode 100644
index 0000000..d90760b
--- /dev/null
+++ b/node_modules/continuable-cache/package.json
@@ -0,0 +1,81 @@
+{
+ "_from": "continuable-cache@^0.3.1",
+ "_id": "continuable-cache@0.3.1",
+ "_inBundle": false,
+ "_integrity": "sha1-vXJ6f67XfnH/OYWskzUakSczrQ8=",
+ "_location": "/continuable-cache",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "continuable-cache@^0.3.1",
+ "name": "continuable-cache",
+ "escapedName": "continuable-cache",
+ "rawSpec": "^0.3.1",
+ "saveSpec": null,
+ "fetchSpec": "^0.3.1"
+ },
+ "_requiredBy": [
+ "/body"
+ ],
+ "_resolved": "https://registry.npmjs.org/continuable-cache/-/continuable-cache-0.3.1.tgz",
+ "_shasum": "bd727a7faed77e71ff3985ac93351a912733ad0f",
+ "_spec": "continuable-cache@^0.3.1",
+ "_where": "C:\\Users\\marcr\\Desktop\\KorAp\\Git\\Kalamar\\node_modules\\body",
+ "author": {
+ "name": "Raynos",
+ "email": "raynos2@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/Raynos/continuable-cache/issues",
+ "email": "raynos2@gmail.com"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Raynos"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Cache a continuable",
+ "devDependencies": {
+ "tape": "~0.2.2"
+ },
+ "homepage": "https://github.com/Raynos/continuable-cache",
+ "keywords": [],
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "http://github.com/Raynos/continuable-cache/raw/master/LICENSE"
+ }
+ ],
+ "main": "index",
+ "name": "continuable-cache",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/Raynos/continuable-cache.git"
+ },
+ "scripts": {
+ "build-test": "browserify-server --bundle=test/index.js -o test/static/bundle.js --debug",
+ "example": "browservefy ./examples/simple.js --browserify='browserify-server' --live --indexed=./examples -- --debug --bundle",
+ "test": "node ./test/index.js",
+ "tryme": "tryme ./examples --live"
+ },
+ "testling": {
+ "files": "test/index.js",
+ "browsers": [
+ "ie/8..latest",
+ "firefox/16..latest",
+ "firefox/nightly",
+ "chrome/22..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest"
+ ]
+ },
+ "version": "0.3.1"
+}
diff --git a/node_modules/continuable-cache/test/index.js b/node_modules/continuable-cache/test/index.js
new file mode 100644
index 0000000..ba8cfc5
--- /dev/null
+++ b/node_modules/continuable-cache/test/index.js
@@ -0,0 +1,8 @@
+var test = require("tape")
+
+var cache = require("../index")
+
+test("continuable-cache is a function", function (assert) {
+ assert.equal(typeof cache, "function")
+ assert.end()
+})