UNPKG

orchestrate

Version:

Orchestrate is a database service. It is a simple REST API that is optimized for queries. Orchestrate combines full-text search, graph, time-series, and key/value.

28 lines (20 loc) 503 B
// Copyright 2015 Orchestrate function BucketBuilder () { this.buckets = []; } BucketBuilder.prototype.before = function (a) { this.buckets.push('*~' + a); return this; }; BucketBuilder.prototype.between = function (a, b) { this.buckets.push([a, b].join('~')); return this; }; BucketBuilder.prototype.after = function (a) { this.buckets.push(a + '~*'); return this; }; BucketBuilder.prototype.build = function () { return this.buckets.join(':'); } module.exports = BucketBuilder;