Socket
Socket
Sign inDemoInstall

@mongosh/service-provider-core

Package Overview
Dependencies
Maintainers
7
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mongosh/service-provider-core - npm Package Compare versions

Comparing version 0.0.1-alpha.13 to 0.0.1-alpha.14

29

lib/cursor.d.ts
import Document from './document';
interface Cursor {
addOption(option: number): Cursor;
allowPartialResults(): Cursor;
batchSize(size: number): Cursor;
close(options: Document): Promise<void>;
isClosed(): boolean;
collation(spec: Document): Cursor;
comment(cmt: string): Cursor;
count(): Promise<number>;
forEach(f: any): Promise<void>;
hasNext(): Promise<boolean>;
hint(index: string): Cursor;
isExhausted(): Promise<boolean>;
itcount(): Promise<number>;
limit(value: number): Cursor;
map(f: any): Cursor;
max(indexBounds: Document): Cursor;
maxTimeMS(value: number): Cursor;
min(indexBounds: Document): Cursor;
next(): Promise<any>;
noCursorTimeout(): Cursor;
oplogReplay(): Cursor;
projection(spec: Document): Cursor;
readPref(preference: string): Cursor;
returnKey(enabled: boolean): Cursor;
size(): Promise<number>;
skip(value: number): Cursor;
sort(spec: Document): Cursor;
tailable(): Cursor;
toArray(): Promise<Document[]>;
explain(verbosity: string): Promise<any>;
}
export default Cursor;

4

package.json
{
"name": "@mongosh/service-provider-core",
"version": "0.0.1-alpha.13",
"version": "0.0.1-alpha.14",
"description": "MongoDB Shell Core Service Provider Package",

@@ -37,3 +37,3 @@ "main": "lib/index.js",

},
"gitHead": "cbd3d640a1a089fd677f7136e3d80f70bce7633f"
"gitHead": "d505622df7589da25592a1abfe62cb76de702b3b"
}
import Document from './document';
/**
* Common fluid interface for cursors in the transport module.
*/
interface Cursor {
/**
* Add a cursor flag as an option to the cursor.
*
* @param {number} option - The flag number.
*
* @returns {Cursor} The cursor.
*/
addOption(option: number): Cursor
/**
* Set cursor to allow partial results.
*
* @returns {Cursor} The cursor.
*/
allowPartialResults(): Cursor;
/**
* Set the cursor batch size.
*
* @param {number} size - The batch size.
*
* @returns {Cursor} The cursor.
*/
batchSize(size: number): Cursor;
/**
* Close the cursor.
*
* @returns {Cursor} The cursor.
*/
close(options: Document): Promise<void>;
/**
* Determine if the cursor has been closed.
*
* @returns {boolean} If the cursor is closed.
*/
isClosed(): boolean;
/**
* Set the collation on the cursor.
*
* @param {Document} spec - The collation.
*
* @returns {Cursor} The cursor.
*/
collation(spec: Document): Cursor;
/**
* Add a comment to the cursor.
*
* @param {string} cmt - The comment.
*
* @returns {Cursor} The cursor.
*/
comment(cmt: string): Cursor;
/**
* Get the count from the cursor.
*
* @returns {Promise<number>} The count.
*/
count(): Promise<number>;
forEach(f): Promise<void>;
/**
* Does the cursor have a next document?
*
* @returns {Promise<boolean>} If there is a next document.
*/
hasNext(): Promise<boolean>;
/**
* Set a hint for indexes on the cursor.
*
* @param {string} index - The index hint.
*
* @returns {Cursor} The cursor.
*/
hint(index: string): Cursor;
/**
* cursor.isExhausted() returns true if the cursor is closed and there are no
* remaining objects in the batch.
*
* @returns Promise<boolean> - whether the cursor is exhausted
*/
isExhausted(): Promise<boolean>;
itcount(): Promise<number>;
/**
* Set the limit of documents to return.
*
* @param {number} value - The limit value.
*
* @returns {Cursor} The cursor.
*/
limit(value: number): Cursor;
map(f): Cursor;
/**
* Set the max index bounds.
*
* @param {Document} indexBounds - The max bounds.
*
* @returns {Cursor} The cursor.
*/
max(indexBounds: Document): Cursor;
/**
* Set the maxTimeMS value.
*
* @param {number} The maxTimeMS value.
*
* @returns {Cursor} The cursor.
*/
maxTimeMS(value: number): Cursor;
/**
* Set the min index bounds.
*
* @param {Document} indexBounds - The min bounds.
*
* @returns {Cursor} The cursor.
*/
min(indexBounds: Document): Cursor;
next(): Promise<any>;
/**
* Tell the cursor not to timeout.
*
* @returns {Cursor} The cursor.
*/
noCursorTimeout(): Cursor;
/**
* Flag the cursor as an oplog replay.
*
* @returns {Cursor} The cursor.
*/
oplogReplay(): Cursor;
/**
* Set the projection on the cursor.
*
* @param {Document} spec - The projection.
*
* @returns {Cursor} The cursor.
*/
projection(spec: Document): Cursor;
/**
* Set the read preference.
*
* @param {string} preference - The read preference.
*
* @returns {Cursor} The cursor.
*/
readPref(preference: string): Cursor;
/**
* Set the cursor to return the index field.
*
* @param {boolean} enabled - Whether to enable return key.
*
* @returns {Cursor} The cursor.
*/
returnKey(enabled: boolean): Cursor;
size(): Promise<number>;
/**
* Set the skip value.
*
* @param {number} value - The number of docs to skip.
*
* @returns {Cursor} The cursor.
*/
skip(value: number): Cursor;
/**
* Set the sort on the cursor.
*
* @param {Document} spec - The sort.
*
* @returns {Cursor} The cursor.
*/
sort(spec: Document): Cursor;
/**
* Flag the cursor as tailable.
*
* @returns {Cursor} The cursor.
*/
tailable(): Cursor;
/**
* Get the documents from the cursor as an array of objects.
*/
toArray(): Promise<Document[]>;
/**
* Get the explain of the cursor.
*
* @param {string} verbosity - the explain verbosity.
* @returns {Promise<any>}
*/
explain(verbosity: string): Promise<any>;
}
export default Cursor;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc