UNPKG

27 kBJavaScriptView Raw
1// Generated by CoffeeScript 1.8.0
2(function() {
3 var AbstractChainedBatch, AbstractError, AbstractIterator, AbstractNoSQL, AbstractObject, CloseError, Codec, Errors, InvalidArgumentError, NoSqlStream, NotImplementedError, OpenError, ReadStream, WriteStream, inherits, isString, setImmediate, utf8ByteLength, util, xtend;
4
5 xtend = require("xtend");
6
7 try {
8 NoSqlStream = require("nosql-stream");
9 } catch (_error) {}
10
11 if (NoSqlStream) {
12 ReadStream = NoSqlStream.ReadStream;
13 }
14
15 if (NoSqlStream) {
16 WriteStream = NoSqlStream.WriteStream;
17 }
18
19 AbstractObject = require("abstract-object");
20
21 util = require("abstract-object/lib/util");
22
23 Codec = require("buffer-codec");
24
25 utf8ByteLength = Codec.getByteLen;
26
27 Errors = require("./abstract-error");
28
29 AbstractIterator = require("./abstract-iterator");
30
31 AbstractChainedBatch = require("./abstract-chained-batch");
32
33 setImmediate = global.setImmediate || process.nextTick;
34
35 AbstractError = Errors.AbstractError;
36
37 NotImplementedError = Errors.NotImplementedError;
38
39 InvalidArgumentError = Errors.InvalidArgumentError;
40
41 OpenError = Errors.OpenError;
42
43 CloseError = Errors.CloseError;
44
45 inherits = util.inherits;
46
47 isString = util.isString;
48
49 module.exports.AbstractNoSQL = AbstractNoSQL = (function() {
50 inherits(AbstractNoSQL, AbstractObject);
51
52 function AbstractNoSQL() {
53 AbstractNoSQL.__super__.constructor.apply(this, arguments);
54 }
55
56 AbstractNoSQL.prototype.init = function(location) {
57 if (location && typeof location !== "string") {
58 throw new InvalidArgumentError("constructor requires a location string argument");
59 }
60 return this.location = location;
61 };
62
63 AbstractNoSQL.prototype.__defineGetter__("opened", function() {
64 return !!this._opened;
65 });
66
67 AbstractNoSQL.prototype.setOpened = function(aValue, options) {
68 if (aValue) {
69 this._opened = true;
70 if (options) {
71 this._options = options;
72 }
73 this.emit("ready");
74 return this.emit("open");
75 } else {
76 this._opened = false;
77 return this.emit("closed");
78 }
79 };
80
81 AbstractNoSQL.prototype.isExistsSync = function(key, options) {
82 var err, result;
83 if (options == null) {
84 options = {};
85 }
86 if (this._isExistsSync) {
87 result = this._isExistsSync(key, options);
88 return result;
89 } else if (this._getSync) {
90 try {
91 this._getSync(key, options);
92 return true;
93 } catch (_error) {
94 err = _error;
95 if (AbstractError.isNotFound(err)) {
96 return false;
97 } else {
98 throw err;
99 }
100 }
101 }
102 throw new NotImplementedError();
103 };
104
105 AbstractNoSQL.prototype.getSync = function(key, options) {
106 var result;
107 if (this._getSync) {
108 if (options == null) {
109 options = {};
110 }
111 result = this._getSync(key, options);
112 return result;
113 }
114 throw new NotImplementedError();
115 };
116
117 AbstractNoSQL.prototype.getBufferSync = function(key, destBuffer, options) {
118 var result;
119 if (this._getBufferSync) {
120 if (options == null) {
121 options = {};
122 }
123 if (options.offset == null) {
124 options.offset = 0;
125 }
126 result = this._getBufferSync(key, destBuffer, options);
127 return result;
128 }
129 throw new NotImplementedError();
130 };
131
132 AbstractNoSQL.prototype.mGetSync = function(keys, options) {
133 var arr, i, needKeyName, result;
134 if (this._mGetSync) {
135 if (options == null) {
136 options = {};
137 }
138 options.raiseError = options.raiseError !== false;
139 needKeyName = options.keys;
140 arr = this._mGetSync(keys, options);
141 i = 0;
142 result = [];
143 while (i < arr.length) {
144 if (needKeyName !== false) {
145 result.push({
146 key: arr[i],
147 value: arr[++i]
148 });
149 } else {
150 result.push(arr[i]);
151 }
152 i++;
153 }
154 return result;
155 }
156 throw new NotImplementedError();
157 };
158
159 AbstractNoSQL.prototype.putSync = function(key, value, options) {
160 var result;
161 if (this._putSync) {
162 if (options == null) {
163 options = {};
164 }
165 result = this._putSync(key, value, options);
166 return result;
167 }
168 throw new NotImplementedError();
169 };
170
171 AbstractNoSQL.prototype.delSync = function(key, options) {
172 var result;
173 if (this._delSync) {
174 if (options == null) {
175 options = {};
176 }
177 result = this._delSync(key, options);
178 return result;
179 }
180 throw new NotImplementedError();
181 };
182
183 AbstractNoSQL.prototype.batchSync = function(operations, options) {
184 var result;
185 if (this._batchSync) {
186 if (options == null) {
187 options = {};
188 }
189 result = this._batchSync(operations, options);
190 return result;
191 }
192 throw new NotImplementedError();
193 };
194
195 AbstractNoSQL.prototype.approximateSizeSync = function(start, end) {
196 var result;
197 if (this._approximateSizeSync) {
198 result = this._approximateSizeSync(start, end);
199 return result;
200 }
201 throw new NotImplementedError();
202 };
203
204 AbstractNoSQL.prototype.openSync = function(options) {
205 var result;
206 if (this._openSync) {
207 if (options == null) {
208 options = this._options || {};
209 }
210 options.createIfMissing = options.createIfMissing !== false;
211 options.errorIfExists = !!options.errorIfExists;
212 result = this._openSync(options);
213 if (result) {
214 this.setOpened(true, options);
215 }
216 if (result) {
217 result = this;
218 }
219 return result;
220 }
221 throw new NotImplementedError();
222 };
223
224 AbstractNoSQL.prototype.closeSync = function() {
225 var result;
226 if (this._closeSync) {
227 result = this._closeSync();
228 if (result) {
229 this.setOpened(false);
230 }
231 return result;
232 }
233 throw new NotImplementedError();
234 };
235
236 AbstractNoSQL.prototype._open = function(options, callback) {
237 var that;
238 that = this;
239 if (this._openSync) {
240 return setImmediate(function() {
241 var err, result;
242 result = void 0;
243 try {
244 result = that._openSync(options);
245 } catch (_error) {
246 err = _error;
247 callback(err);
248 return;
249 }
250 if (result) {
251 return callback(null, result);
252 } else {
253 return callback(new OpenError("can not open database."));
254 }
255 });
256 } else {
257 return setImmediate(callback);
258 }
259 };
260
261 AbstractNoSQL.prototype._close = function(callback) {
262 var that;
263 that = this;
264 if (this._closeSync) {
265 return setImmediate(function() {
266 var err, result;
267 result = void 0;
268 try {
269 result = that._closeSync();
270 } catch (_error) {
271 err = _error;
272 callback(err);
273 return;
274 }
275 if (result) {
276 return callback(null, result);
277 } else {
278 return callback(new CloseError("can not close database."));
279 }
280 });
281 } else {
282 return setImmediate(callback);
283 }
284 };
285
286 AbstractNoSQL.prototype._isExists = function(key, options, callback) {
287 var that;
288 that = this;
289 if (this._isExistsSync) {
290 return setImmediate(function() {
291 var err, result;
292 result = void 0;
293 try {
294 result = that._isExistsSync(key, options);
295 } catch (_error) {
296 err = _error;
297 callback(err);
298 return;
299 }
300 return callback(null, result);
301 });
302 } else {
303 return this._get(key, options, function(err, value) {
304 if (err) {
305 if (AbstractError.isNotFound(err)) {
306 return callback(null, false);
307 } else {
308 return callback(err);
309 }
310 } else {
311 return callback(null, true);
312 }
313 });
314 }
315 };
316
317 AbstractNoSQL.prototype._getBuffer = function(key, destBuffer, options, callback) {
318 var that;
319 that = this;
320 if (this._getSync || this._getBufferSync !== AbstractNoSQL.prototype._getBufferSync) {
321 return setImmediate(function() {
322 var err, result;
323 result = void 0;
324 try {
325 result = that._getBufferSync(key, destBuffer, options);
326 } catch (_error) {
327 err = _error;
328 callback(err);
329 return;
330 }
331 return callback(null, result);
332 });
333 } else if (this._get) {
334 return this._get(key, options, function(err, value) {
335 var result;
336 if (err) {
337 return callback(err);
338 }
339 result = utf8ByteLength(value);
340 if (destBuffer) {
341 result = Math.min(result, destBuffer.length);
342 if (result) {
343 result = destBuffer.write(value, options.offset, result);
344 }
345 }
346 return callback(null, result);
347 });
348 } else {
349 return setImmediate(callback);
350 }
351 };
352
353 AbstractNoSQL.prototype._getBufferSync = function(key, destBuffer, options) {
354 var result, value;
355 if (this._getSync) {
356 value = this._getSync(key, options);
357 result = utf8ByteLength(value);
358 if (destBuffer) {
359 result = Math.min(result, destBuffer.length);
360 if (result) {
361 result = destBuffer.write(value, options.offset, result);
362 }
363 }
364 return result;
365 } else {
366 throw new NotImplementedError('_mGetSync: _getSync is not implemented.');
367 }
368 };
369
370 AbstractNoSQL.prototype._mGetSync = function(keys, options) {
371 var err, key, needKeyName, raiseError, result, value, _i, _len;
372 if (this._getSync) {
373 result = [];
374 needKeyName = options.keys;
375 raiseError = options.raiseError;
376 options.asBuffer = options.asBuffer === true;
377 for (_i = 0, _len = keys.length; _i < _len; _i++) {
378 key = keys[_i];
379 try {
380 value = this._getSync(key, options);
381 } catch (_error) {
382 err = _error;
383 if (raiseError) {
384 throw err;
385 }
386 value = void 0;
387 }
388 if (needKeyName !== false) {
389 result.push(key, value);
390 } else {
391 result.push(value);
392 }
393 }
394 return result;
395 } else {
396 throw new NotImplementedError('_mGetSync: _getSync is not implemented.');
397 }
398 };
399
400 AbstractNoSQL.prototype._mGet = function(keys, options, callback) {
401 var i, needKeyName, raiseError, readNext, result, that;
402 that = this;
403 if (this._getSync || this._mGetSync !== AbstractNoSQL.prototype._mGetSync) {
404 return setImmediate(function() {
405 var err, result;
406 result = void 0;
407 try {
408 result = that._mGetSync(keys, options);
409 } catch (_error) {
410 err = _error;
411 callback(err);
412 return;
413 }
414 return callback(null, result);
415 });
416 } else if (keys.length > 0 && this._get) {
417 result = [];
418 i = 0;
419 needKeyName = options.keys;
420 raiseError = options.raiseError;
421 readNext = function(err, value) {
422 if (err && raiseError) {
423 return callback(err);
424 }
425 if (needKeyName !== false) {
426 result.push(keys[i], value);
427 } else {
428 result.push(value);
429 }
430 i++;
431 if (i >= keys.length) {
432 return callback(null, result);
433 }
434 return that._get(keys[i], options, readNext);
435 };
436 return this._get(keys[i], options, readNext);
437 } else {
438 return setImmediate(callback);
439 }
440 };
441
442 AbstractNoSQL.prototype._get = function(key, options, callback) {
443 var that;
444 that = this;
445 if (this._getSync) {
446 return setImmediate(function() {
447 var err, result;
448 result = void 0;
449 try {
450 result = that._getSync(key, options);
451 } catch (_error) {
452 err = _error;
453 callback(err);
454 return;
455 }
456 return callback(null, result);
457 });
458 } else {
459 return setImmediate(callback);
460 }
461 };
462
463 AbstractNoSQL.prototype._put = function(key, value, options, callback) {
464 var that;
465 that = this;
466 if (this._putSync) {
467 return setImmediate(function() {
468 var err, result;
469 result = void 0;
470 try {
471 result = that._putSync(key, value, options);
472 } catch (_error) {
473 err = _error;
474 callback(err);
475 return;
476 }
477 return callback(null, result);
478 });
479 } else {
480 return setImmediate(callback);
481 }
482 };
483
484 AbstractNoSQL.prototype._del = function(key, options, callback) {
485 var that;
486 that = this;
487 if (this._delSync) {
488 return setImmediate(function() {
489 var err, result;
490 result = void 0;
491 try {
492 result = that._delSync(key, options);
493 } catch (_error) {
494 err = _error;
495 callback(err);
496 return;
497 }
498 return callback(null, result);
499 });
500 } else {
501 return setImmediate(callback);
502 }
503 };
504
505 AbstractNoSQL.prototype._batch = function(array, options, callback) {
506 var that;
507 that = this;
508 if (this._batchSync) {
509 return setImmediate(function() {
510 var err, result;
511 result = void 0;
512 try {
513 result = that._batchSync(array, options);
514 } catch (_error) {
515 err = _error;
516 callback(err);
517 return;
518 }
519 return callback(null, result);
520 });
521 } else {
522 return setImmediate(callback);
523 }
524 };
525
526 AbstractNoSQL.prototype._approximateSize = function(start, end, callback) {
527 var that;
528 that = this;
529 if (this._approximateSizeSync) {
530 return setImmediate(function() {
531 var err, result;
532 result = void 0;
533 try {
534 result = that._approximateSizeSync(start, end);
535 } catch (_error) {
536 err = _error;
537 callback(err);
538 return;
539 }
540 return callback(null, result);
541 });
542 } else {
543 return setImmediate(callback);
544 }
545 };
546
547 AbstractNoSQL.prototype.open = function(options, callback) {
548 var that;
549 if (typeof options === "function") {
550 callback = options;
551 }
552 if (typeof options !== "object") {
553 options = this._options || {};
554 }
555 options.createIfMissing = options.createIfMissing !== false;
556 options.errorIfExists = !!options.errorIfExists;
557 if (callback) {
558 that = this;
559 return this._open(options, function(err, result) {
560 if (err == null) {
561 that.setOpened(true, options);
562 }
563 return callback(err, result);
564 });
565 } else {
566 return this.openSync(options);
567 }
568 };
569
570 AbstractNoSQL.prototype.close = function(callback) {
571 var that;
572 if (callback) {
573 if (typeof callback === "function") {
574 that = this;
575 return this._close(function(err, result) {
576 if (err == null) {
577 that.setOpened(false);
578 }
579 return callback(err, result);
580 });
581 } else {
582 throw new Error("close() requires callback function argument");
583 }
584 } else {
585 return this.closeSync();
586 }
587 };
588
589 AbstractNoSQL.prototype.isExists = function(key, options, callback) {
590 if (typeof options === "function") {
591 callback = options;
592 options = {};
593 } else {
594 if (options == null) {
595 options = {};
596 }
597 }
598 if (!this._isBuffer(key)) {
599 key = String(key);
600 }
601 if (callback) {
602 return this._isExists(key, options, callback);
603 } else {
604 return this.isExistsSync(key, options);
605 }
606 };
607
608 AbstractNoSQL.prototype.isExist = AbstractNoSQL.prototype.isExists;
609
610 AbstractNoSQL.prototype.getBuffer = function(key, destBuffer, options, callback) {
611 var err;
612 err = void 0;
613 if (typeof options === "function") {
614 callback = options;
615 options = {};
616 } else {
617 if (options == null) {
618 options = {};
619 }
620 }
621 if (options.offset == null) {
622 options.offset = 0;
623 }
624 if (callback) {
625 return this._getBuffer(key, destBuffer, options, callback);
626 } else {
627 return this.getBufferSync(key, destBuffer, options);
628 }
629 };
630
631 AbstractNoSQL.prototype.mGet = function(keys, options, callback) {
632 var err, needKeyName;
633 err = void 0;
634 if (typeof options === "function") {
635 callback = options;
636 options = {};
637 } else {
638 if (options == null) {
639 options = {};
640 }
641 }
642 options.asBuffer = options.asBuffer === true;
643 options.raiseError = options.raiseError !== false;
644 needKeyName = options.keys !== false;
645 if (callback) {
646 return this._mGet(keys, options, function(err, arr) {
647 var i, result;
648 if (err) {
649 return callback(err);
650 }
651 if (needKeyName) {
652 i = 0;
653 result = [];
654 while (i < arr.length) {
655 result.push({
656 key: arr[i],
657 value: arr[++i]
658 });
659 i++;
660 }
661 } else {
662 result = arr;
663 }
664 return callback(null, result);
665 });
666 } else {
667 return this.mGetSync(keys, options);
668 }
669 };
670
671 AbstractNoSQL.prototype.get = function(key, options, callback) {
672 var err;
673 err = void 0;
674 if (typeof options === "function") {
675 callback = options;
676 options = {};
677 } else {
678 if (options == null) {
679 options = {};
680 }
681 }
682 if (err = this._checkKey(key, "key", this._isBuffer)) {
683 if (callback) {
684 return callback(err);
685 } else {
686 throw err;
687 }
688 }
689 if (!this._isBuffer(key)) {
690 key = String(key);
691 }
692 options.asBuffer = options.asBuffer !== false;
693 if (callback) {
694 return this._get(key, options, callback);
695 } else {
696 return this.getSync(key, options);
697 }
698 };
699
700 AbstractNoSQL.prototype.put = function(key, value, options, callback) {
701 var err;
702 err = void 0;
703 if (typeof options === "function") {
704 callback = options;
705 options = {};
706 } else {
707 if (options == null) {
708 options = {};
709 }
710 }
711 if (err = this._checkKey(key, "key", this._isBuffer)) {
712 if (callback) {
713 return callback(err);
714 } else {
715 throw err;
716 }
717 }
718 if (!this._isBuffer(key)) {
719 key = String(key);
720 }
721 if ((value != null) && !this._isBuffer(value) && !process.browser) {
722 value = String(value);
723 }
724 if (callback) {
725 return this._put(key, value, options, callback);
726 } else {
727 return this.putSync(key, value, options);
728 }
729 };
730
731 AbstractNoSQL.prototype.del = function(key, options, callback) {
732 var err;
733 err = void 0;
734 if (typeof options === "function") {
735 callback = options;
736 options = {};
737 } else {
738 if (options == null) {
739 options = {};
740 }
741 }
742 if (err = this._checkKey(key, "key", this._isBuffer)) {
743 if (callback) {
744 return callback(err);
745 } else {
746 throw err;
747 }
748 }
749 if (!this._isBuffer(key)) {
750 key = String(key);
751 }
752 if (callback) {
753 return this._del(key, options, callback);
754 } else {
755 return this.delSync(key, options);
756 }
757 };
758
759 AbstractNoSQL.prototype.batch = function(array, options, callback) {
760 var e, err, vError, _i, _len;
761 if (!arguments.length) {
762 return this._chainedBatch();
763 }
764 if (typeof options === "function") {
765 callback = options;
766 options = {};
767 } else {
768 if (options == null) {
769 options = {};
770 }
771 }
772 if (typeof array === "function") {
773 callback = array;
774 }
775 if (!Array.isArray(array)) {
776 vError = new Error("batch(array) requires an array argument");
777 if (callback) {
778 return callback(vError);
779 } else {
780 throw vError;
781 }
782 }
783 for (_i = 0, _len = array.length; _i < _len; _i++) {
784 e = array[_i];
785 if (typeof e !== "object") {
786 continue;
787 }
788 if (err = this._checkKey(e.type, "type", this._isBuffer)) {
789 if (callback) {
790 return callback(err);
791 } else {
792 throw err;
793 }
794 }
795 if (err = this._checkKey(e.key, "key", this._isBuffer)) {
796 if (callback) {
797 return callback(err);
798 } else {
799 throw err;
800 }
801 }
802 }
803 if (callback) {
804 return this._batch(array, options, callback);
805 } else {
806 return this.batchSync(array, options);
807 }
808 };
809
810 AbstractNoSQL.prototype.approximateSize = function(start, end, callback) {
811 if ((start == null) || (end == null) || typeof start === "function" || typeof end === "function") {
812 throw new Error("approximateSize() requires valid `start`, `end` and `callback`(for async) arguments");
813 }
814 if (!this._isBuffer(start)) {
815 start = String(start);
816 }
817 if (!this._isBuffer(end)) {
818 end = String(end);
819 }
820 if (callback) {
821 return this._approximateSize(start, end, callback);
822 } else {
823 return this.approximateSizeSync(start, end);
824 }
825 };
826
827 AbstractNoSQL.prototype._setupIteratorOptions = function(options) {
828 var end, endOp, range, self, skipEnd, skipStart, start, startOp;
829 self = this;
830 options = xtend(options);
831 ["start", "end", "gt", "gte", "lt", "lte"].forEach(function(o) {
832 if (options[o] && self._isBuffer(options[o]) && options[o].length === 0) {
833 return delete options[o];
834 }
835 });
836 options.reverse = !!options.reverse;
837 range = options.range;
838 if (isString(range)) {
839 range = range.trim();
840 if (range.length >= 2) {
841 skipStart = !options.reverse ? range[0] === "(" : range[range.length - 1] === ")";
842 skipEnd = !options.reverse ? range[range.length - 1] === ")" : range[0] === "(";
843 range = range.substring(1, range.length - 1);
844 range = range.split(",").map(function(item) {
845 item = item.trim();
846 if (item === "") {
847 item = null;
848 }
849 return item;
850 });
851 if (!options.reverse) {
852 start = range[0], end = range[1];
853 startOp = 'gt';
854 endOp = 'lt';
855 } else {
856 end = range[0], start = range[1];
857 startOp = 'lt';
858 endOp = 'gt';
859 }
860 if (!skipStart) {
861 startOp = startOp + 'e';
862 }
863 if (!skipEnd) {
864 endOp = endOp + 'e';
865 }
866 options[startOp] = start;
867 options[endOp] = end;
868 }
869 }
870 options.keys = options.keys !== false;
871 options.values = options.values !== false;
872 options.limit = ("limit" in options ? options.limit : -1);
873 options.keyAsBuffer = options.keyAsBuffer === true;
874 options.valueAsBuffer = options.valueAsBuffer === true;
875 return options;
876 };
877
878 AbstractNoSQL.prototype.IteratorClass = AbstractIterator;
879
880 AbstractNoSQL.prototype.iterator = function(options) {
881 if (typeof options !== "object") {
882 options = {};
883 }
884 options = this._setupIteratorOptions(options);
885 if (typeof this._iterator === "function") {
886 return this._iterator(options);
887 }
888 return new this.IteratorClass(this, options);
889 };
890
891 AbstractNoSQL.prototype._chainedBatch = function() {
892 return new AbstractChainedBatch(this);
893 };
894
895 AbstractNoSQL.prototype._isBuffer = function(obj) {
896 return Buffer.isBuffer(obj);
897 };
898
899 AbstractNoSQL.prototype._checkKey = function(obj, type) {
900 if (obj == null) {
901 return new InvalidArgumentError(type + " cannot be `null` or `undefined`");
902 }
903 if (this._isBuffer(obj)) {
904 if (obj.length === 0) {
905 return new InvalidArgumentError(type + " cannot be an empty Buffer");
906 }
907 } else {
908 if (String(obj) === "") {
909 return new InvalidArgumentError(type + " cannot be an empty String");
910 }
911 }
912 };
913
914 AbstractNoSQL.prototype.isOpen = function() {
915 return !!this._opened;
916 };
917
918 AbstractNoSQL.prototype.readStream = function(options, makeData) {
919 var opt;
920 if (ReadStream) {
921 opt = xtend(this._options, options);
922 return ReadStream(this, opt, makeData);
923 } else {
924 return console.error("please `npm install nosql-stream` first");
925 }
926 };
927
928 AbstractNoSQL.prototype.createReadStream = AbstractNoSQL.prototype.readStream;
929
930 AbstractNoSQL.prototype.valueStream = function(options, makeData) {
931 var opt;
932 opt = xtend(options);
933 opt.keys = false;
934 return this.readStream(opt, makeData);
935 };
936
937 AbstractNoSQL.prototype.createValueStream = AbstractNoSQL.prototype.valueStream;
938
939 AbstractNoSQL.prototype.keyStream = function(options, makeData) {
940 var opt;
941 opt = xtend(options);
942 opt.values = false;
943 return this.readStream(opt, makeData);
944 };
945
946 AbstractNoSQL.prototype.createKeyStream = AbstractNoSQL.prototype.keyStream;
947
948 AbstractNoSQL.prototype.writeStream = function(options) {
949 var opt;
950 if (WriteStream) {
951 opt = xtend(this._options, options);
952 return WriteStream(this, opt);
953 } else {
954 return console.error("please `npm install nosql-stream` first");
955 }
956 };
957
958 AbstractNoSQL.prototype.createWriteStream = AbstractNoSQL.prototype.writeStream;
959
960 return AbstractNoSQL;
961
962 })();
963
964 module.exports.AbstractLevelDOWN = AbstractNoSQL;
965
966 module.exports.AbstractIterator = AbstractIterator;
967
968 module.exports.AbstractChainedBatch = AbstractChainedBatch;
969
970}).call(this);