mirror of
https://github.com/expo/rethinkdbdash.git
synced 2026-11-15 17:40:35 -10:00
33 lines
814 B
JavaScript
33 lines
814 B
JavaScript
// Metadata we keep per query
|
|
function Metadata(resolve, reject, query, options) {
|
|
this.resolve = resolve;
|
|
this.reject = reject;
|
|
this.query = query; // The query in case we have to build a backtrace
|
|
this.options = options;
|
|
this.cursor = false;
|
|
}
|
|
|
|
Metadata.prototype.setCursor = function() {
|
|
this.cursor = true;
|
|
}
|
|
|
|
Metadata.prototype.setEnd = function(resolve, reject) {
|
|
this.endResolve = resolve;
|
|
this.endReject = reject;
|
|
}
|
|
|
|
Metadata.prototype.setCallbacks = function(resolve, reject) {
|
|
this.resolve = resolve;
|
|
this.reject = reject;
|
|
}
|
|
Metadata.prototype.removeCallbacks = function() {
|
|
this.resolve = null;
|
|
this.reject = null;
|
|
}
|
|
Metadata.prototype.removeEndCallbacks = function() {
|
|
this.endResolve = null;
|
|
this.endReject = null;
|
|
}
|
|
|
|
module.exports = Metadata;
|