Add CursorStream

This commit is contained in:
nikeee13
2013-08-29 00:29:03 +02:00
parent 4bbd0c202a
commit b668ec8e07

17
mongodb/mongodb.d.ts vendored
View File

@@ -311,11 +311,11 @@ declare module "mongodb" {
}
// Class documentation : http://mongodb.github.io/node-mongodb-native/api-generated/cursor.html
// Last update: doc. version 1.3.13 (28.08.2013)
// Last update: doc. version 1.3.13 (29.08.2013)
export class Cursor {
// INTERNAL TYPE
// constructor (db: Db, collection: Collection, selector, fields, skip, limit, sort, hint, explain, snapshot, timeout, tailable, batchSize, slaveOk, raw, read, returnKey, maxScan, min, max, showDiskLoc, comment, awaitdata, numberOfRetries, dbName, tailableRetryInterval, exhaust, partial);
// constructor(db: Db, collection: Collection, selector, fields, options)
// constructor(db: Db, collection: Collection, selector, fields, options);
rewind() : Cursor;
toArray(callback: (err: any, results: any[]) => any) : void;
@@ -334,8 +334,7 @@ declare module "mongodb" {
nextObject(callback: (err: any, doc: any) => void) : void;
explain(callback: (err, result) => void) : void;
// TODO:
//stream(): CursorStream;
stream(): CursorStream;
close(callback: (err, result) => void) : void;
isClosed(): boolean;
@@ -346,6 +345,16 @@ declare module "mongodb" {
public static GET_MORE: number;
}
// Class documentation : http://mongodb.github.io/node-mongodb-native/api-generated/cursorstream.html
// Last update: doc. version 1.3.13 (29.08.2013)
export class CursorStream {
constructor(cursor: Cursor);
public pause();
public resume();
public destroy();
}
export interface CollectionFindOptions {
limit?;
sort?;