How to use the couchbase.ViewQuery function in couchbase

To help you get started, we’ve selected a few couchbase examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ingenthr / changedetector / change_app.js View on Github external
'use strict';
var fs = require('fs');
var express = require('express');
var jade = require('jade');
var couchbase = require('couchbase');
var _ = require('underscore');
var Q = require('q');
var AWS = require('aws-sdk');
AWS.config.region = 'us-east-1';
var ViewQuery = couchbase.ViewQuery;

var ENTRIES_PER_PAGE = 30;

function is_server_download(filepath) {
var re = /\.deb$|\.rpm$|\.zip$|\.exe$|\.tar\.gz$/;
  if (filepath.indexOf("couchbase-server") !== -1) {
    if (re.exec(filepath))
      return true;
  //  if (filepath.indexOf(".md5") !==-1 || filepath.indexOf(".staging") !== -1 || filepath.indexOf(".xml") !== -1 || filepath.indexOf(".html") !== -1)
  //    return false;
    else
      return false;
  }

};
exports.is_server_download = is_server_download;
github dsfields / couchbase-promises / tests / unit / couchbase.js View on Github external
it('should reference native couchbase.ViewQuery', (done) => {
      assert.strictEqual(couchbase.ViewQuery, nativeCouch.ViewQuery);
      done();
    });
  });
github telepat-io / telepat-worker / lib / writer.js View on Github external
function deleteItems(result, callback1) {
			var query = cb.ViewQuery.from('dev_models', 'by_author').custom({inclusive_end: true, key: user.id});

			async.waterfall([
				function(callback2) {
					Models.Application.bucket.query(query, callback2);
				},
				function(results, callback2) {
					async.each(Object.keys(results), function(objectKey, c) {
						Models.Application.bucket.remove(objectKey, c);
					}, callback2);
				}
			], callback1);
		},
		function deleteLookupKeys(result, callback1) {
github dsfields / couchbase-promises / lib / couchbase.js View on Github external
  static get ViewQuery() { return couchbase.ViewQuery; }
  static get N1qlQuery() { return couchbase.N1qlQuery; }