@mongosh/shell-api 2.1.0 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/abstract-cursor.js +176 -132
- package/lib/abstract-cursor.js.map +1 -1
- package/lib/aggregate-or-find-cursor.js +102 -51
- package/lib/aggregate-or-find-cursor.js.map +1 -1
- package/lib/aggregation-cursor.js +59 -13
- package/lib/aggregation-cursor.js.map +1 -1
- package/lib/bulk.js +248 -197
- package/lib/bulk.js.map +1 -1
- package/lib/change-stream-cursor.js +145 -101
- package/lib/change-stream-cursor.js.map +1 -1
- package/lib/collection.d.ts +2 -1
- package/lib/collection.js +1185 -1245
- package/lib/collection.js.map +1 -1
- package/lib/cursor.js +238 -203
- package/lib/cursor.js.map +1 -1
- package/lib/database.js +1180 -1206
- package/lib/database.js.map +1 -1
- package/lib/dbquery.js +68 -22
- package/lib/dbquery.js.map +1 -1
- package/lib/decorators.d.ts +39 -13
- package/lib/decorators.js +34 -34
- package/lib/decorators.js.map +1 -1
- package/lib/explainable-cursor.js +66 -20
- package/lib/explainable-cursor.js.map +1 -1
- package/lib/explainable.js +214 -179
- package/lib/explainable.js.map +1 -1
- package/lib/field-level-encryption.js +286 -235
- package/lib/field-level-encryption.js.map +1 -1
- package/lib/helpers.js.map +1 -1
- package/lib/interruptor.js.map +1 -1
- package/lib/log-entry.js.map +1 -1
- package/lib/mongo-errors.js.map +1 -1
- package/lib/mongo.d.ts +1 -1
- package/lib/mongo.js +582 -547
- package/lib/mongo.js.map +1 -1
- package/lib/plan-cache.js +108 -64
- package/lib/plan-cache.js.map +1 -1
- package/lib/replica-set.js +290 -277
- package/lib/replica-set.js.map +1 -1
- package/lib/result.js +228 -91
- package/lib/result.js.map +1 -1
- package/lib/run-command-cursor.js +59 -13
- package/lib/run-command-cursor.js.map +1 -1
- package/lib/session.js +123 -76
- package/lib/session.js.map +1 -1
- package/lib/shard.js +507 -514
- package/lib/shard.js.map +1 -1
- package/lib/shell-api.d.ts +1 -0
- package/lib/shell-api.js +313 -260
- package/lib/shell-api.js.map +1 -1
- package/lib/shell-bson.js.map +1 -1
- package/lib/shell-instance-state.js.map +1 -1
- package/lib/stream-processor.js +139 -92
- package/lib/stream-processor.js.map +1 -1
- package/lib/streams.js +158 -110
- package/lib/streams.js.map +1 -1
- package/package.json +8 -8
package/lib/cursor.js
CHANGED
|
@@ -1,217 +1,252 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
3
|
+
var useValue = arguments.length > 2;
|
|
4
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
5
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
6
|
+
}
|
|
7
|
+
return useValue ? value : void 0;
|
|
8
|
+
};
|
|
9
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
10
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
11
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
12
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
13
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
14
|
+
var _, done = false;
|
|
15
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
16
|
+
var context = {};
|
|
17
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
18
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
19
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
20
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
21
|
+
if (kind === "accessor") {
|
|
22
|
+
if (result === void 0) continue;
|
|
23
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
24
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
25
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
26
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
27
|
+
}
|
|
28
|
+
else if (_ = accept(result)) {
|
|
29
|
+
if (kind === "field") initializers.unshift(_);
|
|
30
|
+
else descriptor[key] = _;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
34
|
+
done = true;
|
|
35
|
+
};
|
|
36
|
+
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
37
|
+
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
38
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
7
39
|
};
|
|
8
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
41
|
const errors_1 = require("@mongosh/errors");
|
|
10
42
|
const decorators_1 = require("./decorators");
|
|
11
43
|
const enums_1 = require("./enums");
|
|
12
44
|
const aggregate_or_find_cursor_1 = require("./aggregate-or-find-cursor");
|
|
13
|
-
let Cursor =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
45
|
+
let Cursor = (() => {
|
|
46
|
+
let _classDecorators = [decorators_1.shellApiClassDefault];
|
|
47
|
+
let _classDescriptor;
|
|
48
|
+
let _classExtraInitializers = [];
|
|
49
|
+
let _classThis;
|
|
50
|
+
let _classSuper = aggregate_or_find_cursor_1.AggregateOrFindCursor;
|
|
51
|
+
let _instanceExtraInitializers = [];
|
|
52
|
+
let _addOption_decorators;
|
|
53
|
+
let _allowDiskUse_decorators;
|
|
54
|
+
let _allowPartialResults_decorators;
|
|
55
|
+
let _collation_decorators;
|
|
56
|
+
let _comment_decorators;
|
|
57
|
+
let _count_decorators;
|
|
58
|
+
let _hasNext_decorators;
|
|
59
|
+
let _hint_decorators;
|
|
60
|
+
let _limit_decorators;
|
|
61
|
+
let _max_decorators;
|
|
62
|
+
let _maxAwaitTimeMS_decorators;
|
|
63
|
+
let _min_decorators;
|
|
64
|
+
let _next_decorators;
|
|
65
|
+
let _noCursorTimeout_decorators;
|
|
66
|
+
let _oplogReplay_decorators;
|
|
67
|
+
let _readPref_decorators;
|
|
68
|
+
let _returnKey_decorators;
|
|
69
|
+
let _size_decorators;
|
|
70
|
+
let _tailable_decorators;
|
|
71
|
+
let _maxScan_decorators;
|
|
72
|
+
let _showRecordId_decorators;
|
|
73
|
+
let _readConcern_decorators;
|
|
74
|
+
var Cursor = _classThis = class extends _classSuper {
|
|
75
|
+
constructor(mongo, cursor) {
|
|
76
|
+
super(mongo, cursor);
|
|
77
|
+
this._tailable = (__runInitializers(this, _instanceExtraInitializers), false);
|
|
24
78
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
throw new errors_1.MongoshInvalidInputError(`Unknown option flag number: ${optionFlagNumber}.`, errors_1.CommonErrors.InvalidArgument);
|
|
79
|
+
_addFlag(flag) {
|
|
80
|
+
this._cursor.addCursorFlag(flag, true);
|
|
28
81
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
collation(spec) {
|
|
41
|
-
this._cursor.collation(spec);
|
|
42
|
-
return this;
|
|
43
|
-
}
|
|
44
|
-
comment(cmt) {
|
|
45
|
-
this._cursor.comment(cmt);
|
|
46
|
-
return this;
|
|
47
|
-
}
|
|
48
|
-
async count() {
|
|
49
|
-
return this._cursor.count();
|
|
50
|
-
}
|
|
51
|
-
async hasNext() {
|
|
52
|
-
if (this._tailable) {
|
|
53
|
-
await this._instanceState.printWarning('If this is a tailable cursor with awaitData, and there are no documents in the batch, this method ' +
|
|
54
|
-
'will will block. Use tryNext if you want to check if there are any documents without waiting.');
|
|
82
|
+
addOption(optionFlagNumber) {
|
|
83
|
+
if (optionFlagNumber === 4) {
|
|
84
|
+
throw new errors_1.MongoshUnimplementedError('the slaveOk option is not supported.', errors_1.CommonErrors.NotImplemented);
|
|
85
|
+
}
|
|
86
|
+
const optionFlag = enums_1.CURSOR_FLAGS[optionFlagNumber];
|
|
87
|
+
if (!optionFlag) {
|
|
88
|
+
throw new errors_1.MongoshInvalidInputError(`Unknown option flag number: ${optionFlagNumber}.`, errors_1.CommonErrors.InvalidArgument);
|
|
89
|
+
}
|
|
90
|
+
this._cursor.addCursorFlag(optionFlag, true);
|
|
91
|
+
return this;
|
|
55
92
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
this._cursor.hint(index);
|
|
60
|
-
return this;
|
|
61
|
-
}
|
|
62
|
-
limit(value) {
|
|
63
|
-
this._cursor.limit(value);
|
|
64
|
-
return this;
|
|
65
|
-
}
|
|
66
|
-
max(indexBounds) {
|
|
67
|
-
this._cursor.max(indexBounds);
|
|
68
|
-
return this;
|
|
69
|
-
}
|
|
70
|
-
maxAwaitTimeMS(value) {
|
|
71
|
-
this._cursor.maxAwaitTimeMS(value);
|
|
72
|
-
return this;
|
|
73
|
-
}
|
|
74
|
-
min(indexBounds) {
|
|
75
|
-
this._cursor.min(indexBounds);
|
|
76
|
-
return this;
|
|
77
|
-
}
|
|
78
|
-
async next() {
|
|
79
|
-
if (this._tailable) {
|
|
80
|
-
await this._instanceState.printWarning('If this is a tailable cursor with awaitData, and there are no documents in the batch, this' +
|
|
81
|
-
' method will will block. Use tryNext if you want to check if there are any documents without waiting.');
|
|
93
|
+
allowDiskUse(allow) {
|
|
94
|
+
this._cursor.allowDiskUse(allow);
|
|
95
|
+
return this;
|
|
82
96
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
this._addFlag('noCursorTimeout');
|
|
87
|
-
return this;
|
|
88
|
-
}
|
|
89
|
-
oplogReplay() {
|
|
90
|
-
this._addFlag('oplogReplay');
|
|
91
|
-
return this;
|
|
92
|
-
}
|
|
93
|
-
readPref(mode, tagSet, hedgeOptions) {
|
|
94
|
-
let pref;
|
|
95
|
-
if (tagSet || hedgeOptions) {
|
|
96
|
-
pref = this._mongo._serviceProvider.readPreferenceFromOptions({
|
|
97
|
-
readPreference: mode,
|
|
98
|
-
readPreferenceTags: tagSet,
|
|
99
|
-
hedge: hedgeOptions,
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
pref = mode;
|
|
104
|
-
}
|
|
105
|
-
this._cursor = this._cursor.withReadPreference(pref);
|
|
106
|
-
return this;
|
|
107
|
-
}
|
|
108
|
-
returnKey(enabled) {
|
|
109
|
-
this._cursor.returnKey(enabled);
|
|
110
|
-
return this;
|
|
111
|
-
}
|
|
112
|
-
async size() {
|
|
113
|
-
return this._cursor.count();
|
|
114
|
-
}
|
|
115
|
-
tailable(opts = { awaitData: false }) {
|
|
116
|
-
this._tailable = true;
|
|
117
|
-
this._addFlag('tailable');
|
|
118
|
-
if (opts.awaitData) {
|
|
119
|
-
this._addFlag('awaitData');
|
|
97
|
+
allowPartialResults() {
|
|
98
|
+
this._addFlag('partial');
|
|
99
|
+
return this;
|
|
120
100
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
101
|
+
collation(spec) {
|
|
102
|
+
this._cursor.collation(spec);
|
|
103
|
+
return this;
|
|
104
|
+
}
|
|
105
|
+
comment(cmt) {
|
|
106
|
+
this._cursor.comment(cmt);
|
|
107
|
+
return this;
|
|
108
|
+
}
|
|
109
|
+
async count() {
|
|
110
|
+
return this._cursor.count();
|
|
111
|
+
}
|
|
112
|
+
async hasNext() {
|
|
113
|
+
if (this._tailable) {
|
|
114
|
+
await this._instanceState.printWarning('If this is a tailable cursor with awaitData, and there are no documents in the batch, this method ' +
|
|
115
|
+
'will will block. Use tryNext if you want to check if there are any documents without waiting.');
|
|
116
|
+
}
|
|
117
|
+
return super.hasNext();
|
|
118
|
+
}
|
|
119
|
+
hint(index) {
|
|
120
|
+
this._cursor.hint(index);
|
|
121
|
+
return this;
|
|
122
|
+
}
|
|
123
|
+
limit(value) {
|
|
124
|
+
this._cursor.limit(value);
|
|
125
|
+
return this;
|
|
126
|
+
}
|
|
127
|
+
max(indexBounds) {
|
|
128
|
+
this._cursor.max(indexBounds);
|
|
129
|
+
return this;
|
|
130
|
+
}
|
|
131
|
+
maxAwaitTimeMS(value) {
|
|
132
|
+
this._cursor.maxAwaitTimeMS(value);
|
|
133
|
+
return this;
|
|
134
|
+
}
|
|
135
|
+
min(indexBounds) {
|
|
136
|
+
this._cursor.min(indexBounds);
|
|
137
|
+
return this;
|
|
138
|
+
}
|
|
139
|
+
async next() {
|
|
140
|
+
if (this._tailable) {
|
|
141
|
+
await this._instanceState.printWarning('If this is a tailable cursor with awaitData, and there are no documents in the batch, this' +
|
|
142
|
+
' method will will block. Use tryNext if you want to check if there are any documents without waiting.');
|
|
143
|
+
}
|
|
144
|
+
return super.next();
|
|
145
|
+
}
|
|
146
|
+
noCursorTimeout() {
|
|
147
|
+
this._addFlag('noCursorTimeout');
|
|
148
|
+
return this;
|
|
149
|
+
}
|
|
150
|
+
oplogReplay() {
|
|
151
|
+
this._addFlag('oplogReplay');
|
|
152
|
+
return this;
|
|
153
|
+
}
|
|
154
|
+
readPref(mode, tagSet, hedgeOptions) {
|
|
155
|
+
let pref;
|
|
156
|
+
if (tagSet || hedgeOptions) {
|
|
157
|
+
pref = this._mongo._serviceProvider.readPreferenceFromOptions({
|
|
158
|
+
readPreference: mode,
|
|
159
|
+
readPreferenceTags: tagSet,
|
|
160
|
+
hedge: hedgeOptions,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
pref = mode;
|
|
165
|
+
}
|
|
166
|
+
this._cursor = this._cursor.withReadPreference(pref);
|
|
167
|
+
return this;
|
|
168
|
+
}
|
|
169
|
+
returnKey(enabled) {
|
|
170
|
+
this._cursor.returnKey(enabled);
|
|
171
|
+
return this;
|
|
172
|
+
}
|
|
173
|
+
async size() {
|
|
174
|
+
return this._cursor.count();
|
|
175
|
+
}
|
|
176
|
+
tailable(opts = { awaitData: false }) {
|
|
177
|
+
this._tailable = true;
|
|
178
|
+
this._addFlag('tailable');
|
|
179
|
+
if (opts.awaitData) {
|
|
180
|
+
this._addFlag('awaitData');
|
|
181
|
+
}
|
|
182
|
+
return this;
|
|
183
|
+
}
|
|
184
|
+
maxScan() {
|
|
185
|
+
throw new errors_1.MongoshDeprecatedError('`maxScan()` was removed because it was deprecated in MongoDB 4.0');
|
|
186
|
+
}
|
|
187
|
+
showRecordId() {
|
|
188
|
+
this._cursor.showRecordId(true);
|
|
189
|
+
return this;
|
|
190
|
+
}
|
|
191
|
+
readConcern(level) {
|
|
192
|
+
this._cursor = this._cursor.withReadConcern({ level });
|
|
193
|
+
return this;
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
__setFunctionName(_classThis, "Cursor");
|
|
197
|
+
(() => {
|
|
198
|
+
var _a;
|
|
199
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_a = _classSuper[Symbol.metadata]) !== null && _a !== void 0 ? _a : null) : void 0;
|
|
200
|
+
_addOption_decorators = [(0, decorators_1.returnType)('Cursor'), (0, decorators_1.serverVersions)([enums_1.ServerVersions.earliest, '3.2.0'])];
|
|
201
|
+
_allowDiskUse_decorators = [(0, decorators_1.returnType)('Cursor'), (0, decorators_1.serverVersions)(['4.4.0', enums_1.ServerVersions.latest])];
|
|
202
|
+
_allowPartialResults_decorators = [(0, decorators_1.returnType)('Cursor')];
|
|
203
|
+
_collation_decorators = [(0, decorators_1.returnType)('Cursor'), (0, decorators_1.serverVersions)(['3.4.0', enums_1.ServerVersions.latest])];
|
|
204
|
+
_comment_decorators = [(0, decorators_1.returnType)('Cursor'), (0, decorators_1.serverVersions)(['3.2.0', enums_1.ServerVersions.latest])];
|
|
205
|
+
_count_decorators = [(0, decorators_1.serverVersions)([enums_1.ServerVersions.earliest, '4.0.0']), decorators_1.returnsPromise, decorators_1.deprecated];
|
|
206
|
+
_hasNext_decorators = [decorators_1.returnsPromise];
|
|
207
|
+
_hint_decorators = [(0, decorators_1.returnType)('Cursor')];
|
|
208
|
+
_limit_decorators = [(0, decorators_1.returnType)('Cursor')];
|
|
209
|
+
_max_decorators = [(0, decorators_1.returnType)('Cursor')];
|
|
210
|
+
_maxAwaitTimeMS_decorators = [(0, decorators_1.returnType)('Cursor'), (0, decorators_1.serverVersions)(['3.2.0', enums_1.ServerVersions.latest])];
|
|
211
|
+
_min_decorators = [(0, decorators_1.returnType)('Cursor')];
|
|
212
|
+
_next_decorators = [decorators_1.returnsPromise];
|
|
213
|
+
_noCursorTimeout_decorators = [(0, decorators_1.returnType)('Cursor')];
|
|
214
|
+
_oplogReplay_decorators = [(0, decorators_1.returnType)('Cursor')];
|
|
215
|
+
_readPref_decorators = [(0, decorators_1.returnType)('Cursor')];
|
|
216
|
+
_returnKey_decorators = [(0, decorators_1.returnType)('Cursor'), (0, decorators_1.serverVersions)(['3.2.0', enums_1.ServerVersions.latest])];
|
|
217
|
+
_size_decorators = [decorators_1.returnsPromise];
|
|
218
|
+
_tailable_decorators = [(0, decorators_1.returnType)('Cursor'), (0, decorators_1.serverVersions)(['3.2.0', enums_1.ServerVersions.latest]), (0, decorators_1.apiVersions)([])];
|
|
219
|
+
_maxScan_decorators = [decorators_1.deprecated, (0, decorators_1.serverVersions)([enums_1.ServerVersions.earliest, '4.0.0'])];
|
|
220
|
+
_showRecordId_decorators = [(0, decorators_1.returnType)('Cursor'), (0, decorators_1.serverVersions)(['3.2.0', enums_1.ServerVersions.latest])];
|
|
221
|
+
_readConcern_decorators = [(0, decorators_1.returnType)('Cursor')];
|
|
222
|
+
__esDecorate(_classThis, null, _addOption_decorators, { kind: "method", name: "addOption", static: false, private: false, access: { has: obj => "addOption" in obj, get: obj => obj.addOption }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
223
|
+
__esDecorate(_classThis, null, _allowDiskUse_decorators, { kind: "method", name: "allowDiskUse", static: false, private: false, access: { has: obj => "allowDiskUse" in obj, get: obj => obj.allowDiskUse }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
224
|
+
__esDecorate(_classThis, null, _allowPartialResults_decorators, { kind: "method", name: "allowPartialResults", static: false, private: false, access: { has: obj => "allowPartialResults" in obj, get: obj => obj.allowPartialResults }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
225
|
+
__esDecorate(_classThis, null, _collation_decorators, { kind: "method", name: "collation", static: false, private: false, access: { has: obj => "collation" in obj, get: obj => obj.collation }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
226
|
+
__esDecorate(_classThis, null, _comment_decorators, { kind: "method", name: "comment", static: false, private: false, access: { has: obj => "comment" in obj, get: obj => obj.comment }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
227
|
+
__esDecorate(_classThis, null, _count_decorators, { kind: "method", name: "count", static: false, private: false, access: { has: obj => "count" in obj, get: obj => obj.count }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
228
|
+
__esDecorate(_classThis, null, _hasNext_decorators, { kind: "method", name: "hasNext", static: false, private: false, access: { has: obj => "hasNext" in obj, get: obj => obj.hasNext }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
229
|
+
__esDecorate(_classThis, null, _hint_decorators, { kind: "method", name: "hint", static: false, private: false, access: { has: obj => "hint" in obj, get: obj => obj.hint }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
230
|
+
__esDecorate(_classThis, null, _limit_decorators, { kind: "method", name: "limit", static: false, private: false, access: { has: obj => "limit" in obj, get: obj => obj.limit }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
231
|
+
__esDecorate(_classThis, null, _max_decorators, { kind: "method", name: "max", static: false, private: false, access: { has: obj => "max" in obj, get: obj => obj.max }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
232
|
+
__esDecorate(_classThis, null, _maxAwaitTimeMS_decorators, { kind: "method", name: "maxAwaitTimeMS", static: false, private: false, access: { has: obj => "maxAwaitTimeMS" in obj, get: obj => obj.maxAwaitTimeMS }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
233
|
+
__esDecorate(_classThis, null, _min_decorators, { kind: "method", name: "min", static: false, private: false, access: { has: obj => "min" in obj, get: obj => obj.min }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
234
|
+
__esDecorate(_classThis, null, _next_decorators, { kind: "method", name: "next", static: false, private: false, access: { has: obj => "next" in obj, get: obj => obj.next }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
235
|
+
__esDecorate(_classThis, null, _noCursorTimeout_decorators, { kind: "method", name: "noCursorTimeout", static: false, private: false, access: { has: obj => "noCursorTimeout" in obj, get: obj => obj.noCursorTimeout }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
236
|
+
__esDecorate(_classThis, null, _oplogReplay_decorators, { kind: "method", name: "oplogReplay", static: false, private: false, access: { has: obj => "oplogReplay" in obj, get: obj => obj.oplogReplay }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
237
|
+
__esDecorate(_classThis, null, _readPref_decorators, { kind: "method", name: "readPref", static: false, private: false, access: { has: obj => "readPref" in obj, get: obj => obj.readPref }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
238
|
+
__esDecorate(_classThis, null, _returnKey_decorators, { kind: "method", name: "returnKey", static: false, private: false, access: { has: obj => "returnKey" in obj, get: obj => obj.returnKey }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
239
|
+
__esDecorate(_classThis, null, _size_decorators, { kind: "method", name: "size", static: false, private: false, access: { has: obj => "size" in obj, get: obj => obj.size }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
240
|
+
__esDecorate(_classThis, null, _tailable_decorators, { kind: "method", name: "tailable", static: false, private: false, access: { has: obj => "tailable" in obj, get: obj => obj.tailable }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
241
|
+
__esDecorate(_classThis, null, _maxScan_decorators, { kind: "method", name: "maxScan", static: false, private: false, access: { has: obj => "maxScan" in obj, get: obj => obj.maxScan }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
242
|
+
__esDecorate(_classThis, null, _showRecordId_decorators, { kind: "method", name: "showRecordId", static: false, private: false, access: { has: obj => "showRecordId" in obj, get: obj => obj.showRecordId }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
243
|
+
__esDecorate(_classThis, null, _readConcern_decorators, { kind: "method", name: "readConcern", static: false, private: false, access: { has: obj => "readConcern" in obj, get: obj => obj.readConcern }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
244
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
245
|
+
Cursor = _classThis = _classDescriptor.value;
|
|
246
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
247
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
248
|
+
})();
|
|
249
|
+
return Cursor = _classThis;
|
|
250
|
+
})();
|
|
216
251
|
exports.default = Cursor;
|
|
217
252
|
//# sourceMappingURL=cursor.js.map
|
package/lib/cursor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cursor.js","sourceRoot":"","sources":["../src/cursor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cursor.js","sourceRoot":"","sources":["../src/cursor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAKyB;AACzB,6CAOsB;AACtB,mCAAuD;AAYvD,yEAAmE;;4BAElE,iCAAoB;;;;sBACe,gDAAqB;;;;;;;;;;;;;;;;;;;;;;;;mCAA7B,SAAQ,WAA4C;QAG9E,YAAY,KAAY,EAAE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