diff --git a/docs/6.9/.nojekyll b/docs/6.9/.nojekyll new file mode 100644 index 0000000000..e2ac6616ad --- /dev/null +++ b/docs/6.9/.nojekyll @@ -0,0 +1 @@ +TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. \ No newline at end of file diff --git a/docs/6.9/assets/highlight.css b/docs/6.9/assets/highlight.css new file mode 100644 index 0000000000..7dd8a69345 --- /dev/null +++ b/docs/6.9/assets/highlight.css @@ -0,0 +1,120 @@ +:root { + --light-hl-0: #795E26; + --dark-hl-0: #DCDCAA; + --light-hl-1: #000000; + --dark-hl-1: #D4D4D4; + --light-hl-2: #0000FF; + --dark-hl-2: #569CD6; + --light-hl-3: #A31515; + --dark-hl-3: #CE9178; + --light-hl-4: #008000; + --dark-hl-4: #6A9955; + --light-hl-5: #0070C1; + --dark-hl-5: #4FC1FF; + --light-hl-6: #001080; + --dark-hl-6: #9CDCFE; + --light-hl-7: #AF00DB; + --dark-hl-7: #C586C0; + --light-hl-8: #098658; + --dark-hl-8: #B5CEA8; + --light-hl-9: #267F99; + --dark-hl-9: #4EC9B0; + --light-hl-10: #000000; + --dark-hl-10: #C8C8C8; + --light-hl-11: #811F3F; + --dark-hl-11: #D16969; + --light-hl-12: #000000FF; + --dark-hl-12: #D4D4D4; + --light-hl-13: #EE0000; + --dark-hl-13: #D7BA7D; + --light-code-background: #FFFFFF; + --dark-code-background: #1E1E1E; +} + +@media (prefers-color-scheme: light) { :root { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); + --hl-10: var(--light-hl-10); + --hl-11: var(--light-hl-11); + --hl-12: var(--light-hl-12); + --hl-13: var(--light-hl-13); + --code-background: var(--light-code-background); +} } + +@media (prefers-color-scheme: dark) { :root { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); + --hl-10: var(--dark-hl-10); + --hl-11: var(--dark-hl-11); + --hl-12: var(--dark-hl-12); + --hl-13: var(--dark-hl-13); + --code-background: var(--dark-code-background); +} } + +:root[data-theme='light'] { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); + --hl-10: var(--light-hl-10); + --hl-11: var(--light-hl-11); + --hl-12: var(--light-hl-12); + --hl-13: var(--light-hl-13); + --code-background: var(--light-code-background); +} + +:root[data-theme='dark'] { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); + --hl-10: var(--dark-hl-10); + --hl-11: var(--dark-hl-11); + --hl-12: var(--dark-hl-12); + --hl-13: var(--dark-hl-13); + --code-background: var(--dark-code-background); +} + +.hl-0 { color: var(--hl-0); } +.hl-1 { color: var(--hl-1); } +.hl-2 { color: var(--hl-2); } +.hl-3 { color: var(--hl-3); } +.hl-4 { color: var(--hl-4); } +.hl-5 { color: var(--hl-5); } +.hl-6 { color: var(--hl-6); } +.hl-7 { color: var(--hl-7); } +.hl-8 { color: var(--hl-8); } +.hl-9 { color: var(--hl-9); } +.hl-10 { color: var(--hl-10); } +.hl-11 { color: var(--hl-11); } +.hl-12 { color: var(--hl-12); } +.hl-13 { color: var(--hl-13); } +pre, code { background: var(--code-background); } diff --git a/docs/6.9/assets/icons.js b/docs/6.9/assets/icons.js new file mode 100644 index 0000000000..e88e8ca770 --- /dev/null +++ b/docs/6.9/assets/icons.js @@ -0,0 +1,18 @@ +(function() { + addIcons(); + function addIcons() { + if (document.readyState === "loading") return document.addEventListener("DOMContentLoaded", addIcons); + const svg = document.body.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "svg")); + svg.innerHTML = `""`; + svg.style.display = "none"; + if (location.protocol === "file:") updateUseElements(); + } + + function updateUseElements() { + document.querySelectorAll("use").forEach(el => { + if (el.getAttribute("href").includes("#icon-")) { + el.setAttribute("href", el.getAttribute("href").replace(/.*#/, "#")); + } + }); + } +})() \ No newline at end of file diff --git a/docs/6.9/assets/icons.svg b/docs/6.9/assets/icons.svg new file mode 100644 index 0000000000..e371b8b5d8 --- /dev/null +++ b/docs/6.9/assets/icons.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/6.9/assets/main.js b/docs/6.9/assets/main.js new file mode 100644 index 0000000000..21a5d74d22 --- /dev/null +++ b/docs/6.9/assets/main.js @@ -0,0 +1,60 @@ +"use strict"; +window.translations={"copy":"Copy","copied":"Copied!","normally_hidden":"This member is normally hidden due to your filter settings."}; +"use strict";(()=>{var Pe=Object.create;var ie=Object.defineProperty;var Oe=Object.getOwnPropertyDescriptor;var _e=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty;var Fe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var De=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of _e(e))!Me.call(t,i)&&i!==n&&ie(t,i,{get:()=>e[i],enumerable:!(r=Oe(e,i))||r.enumerable});return t};var Ae=(t,e,n)=>(n=t!=null?Pe(Re(t)):{},De(e||!t||!t.__esModule?ie(n,"default",{value:t,enumerable:!0}):n,t));var ue=Fe((ae,le)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. +`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),m=s.str.charAt(1),p;m in s.node.edges?p=s.node.edges[m]:(p=new t.TokenSet,s.node.edges[m]=p),s.str.length==1&&(p.final=!0),i.push({node:p,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof ae=="object"?le.exports=n():e.lunr=n()}(this,function(){return t})})()});var se=[];function G(t,e){se.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible()),document.body.style.display||(this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}createComponents(e){se.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}showPage(){document.body.style.display&&(document.body.style.removeProperty("display"),this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}scrollToHash(){if(location.hash){let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e&&!Ve(e)){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r,document.querySelector(".col-sidebar").scrollTop=r}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(!n)return;let r=n.offsetParent==null,i=n;for(;i!==document.body;)i instanceof HTMLDetailsElement&&(i.open=!0),i=i.parentElement;if(n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let s=document.createElement("p");s.classList.add("warning"),s.textContent=window.translations.normally_hidden,n.prepend(s)}r&&e.scrollIntoView()}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent=window.translations.copied,e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent=window.translations.copy},100)},1e3)})})}};function Ve(t){let e=t.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(e.bottom<0||e.top-n>=0)}var oe=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var pe=Ae(ue());async function ce(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=pe.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function fe(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{ce(e,t)}),ce(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");i.addEventListener("mouseup",()=>{te(t)}),r.addEventListener("focus",()=>t.classList.add("has-focus")),He(t,i,r,e)}function He(t,e,n,r){n.addEventListener("input",oe(()=>{Ne(t,e,n,r)},200)),n.addEventListener("keydown",i=>{i.key=="Enter"?Be(e,t):i.key=="ArrowUp"?(de(e,n,-1),i.preventDefault()):i.key==="ArrowDown"&&(de(e,n,1),i.preventDefault())}),document.body.addEventListener("keypress",i=>{i.altKey||i.ctrlKey||i.metaKey||!n.matches(":focus")&&i.key==="/"&&(i.preventDefault(),n.focus())}),document.body.addEventListener("keyup",i=>{t.classList.contains("has-focus")&&(i.key==="Escape"||!e.matches(":focus-within")&&!n.matches(":focus"))&&(n.blur(),te(t))})}function te(t){t.classList.remove("has-focus")}function Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=he(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` + ${he(l.parent,i)}.${d}`);let m=document.createElement("li");m.classList.value=l.classes??"";let p=document.createElement("a");p.href=r.base+l.url,p.innerHTML=u+d,m.append(p),p.addEventListener("focus",()=>{e.querySelector(".current")?.classList.remove("current"),m.classList.add("current")}),e.appendChild(m)}}function de(t,e,n){let r=t.querySelector(".current");if(!r)r=t.querySelector(n==1?"li:first-child":"li:last-child"),r&&r.classList.add("current");else{let i=r;if(n===1)do i=i.nextElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);else do i=i.previousElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);i?(r.classList.remove("current"),i.classList.add("current")):n===-1&&(r.classList.remove("current"),e.focus())}}function Be(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),te(e)}}function he(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(ee(t.substring(s,o)),`${ee(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(ee(t.substring(s))),i.join("")}var je={"&":"&","<":"<",">":">","'":"'",'"':"""};function ee(t){return t.replace(/[&<>"'"]/g,e=>je[e])}var I=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",ye="mousemove",N="mouseup",J={x:0,y:0},me=!1,ne=!1,qe=!1,D=!1,ve=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(ve?"is-mobile":"not-mobile");ve&&"ontouchstart"in document.documentElement&&(qe=!0,F="touchstart",ye="touchmove",N="touchend");document.addEventListener(F,t=>{ne=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(ye,t=>{if(ne&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(N,()=>{ne=!1});document.addEventListener("click",t=>{me&&(t.preventDefault(),t.stopImmediatePropagation(),me=!1)});var X=class extends I{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(N,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(N,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var re;try{re=localStorage}catch{re={getItem(){return null},setItem(){}}}var Q=re;var ge=document.head.appendChild(document.createElement("style"));ge.dataset.for="filters";var Y=class extends I{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ge.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } +`,this.app.updateIndexVisibility()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.app.updateIndexVisibility()}};var Z=class extends I{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function Ee(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,xe(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),xe(t.value)})}function xe(t){document.documentElement.dataset.theme=t}var K;function we(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",Le),Le())}async function Le(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();K=t.dataset.base,K.endsWith("/")||(K+="/"),t.innerHTML="";for(let s of i)Se(s,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function Se(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-accordion`:"tsd-accordion";let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.dataset.key=i.join("$"),o.innerHTML='',be(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)Se(u,l,i)}else be(t,r,t.class)}function be(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=K+t.path,n&&(r.className=n),location.pathname===r.pathname&&!r.href.includes("#")&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Te=document.getElementById("tsd-theme");Te&&Ee(Te);var $e=new U;Object.defineProperty(window,"app",{value:$e});fe();we();})(); +/*! Bundled license information: + +lunr/lunr.js: + (** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 + * Copyright (C) 2020 Oliver Nightingale + * @license MIT + *) + (*! + * lunr.utils + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Set + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.tokenizer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Pipeline + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Vector + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.stemmer + * Copyright (C) 2020 Oliver Nightingale + * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt + *) + (*! + * lunr.stopWordFilter + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.trimmer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.TokenSet + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Index + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Builder + * Copyright (C) 2020 Oliver Nightingale + *) +*/ diff --git a/docs/6.9/assets/navigation.js b/docs/6.9/assets/navigation.js new file mode 100644 index 0000000000..299ed46ed5 --- /dev/null +++ b/docs/6.9/assets/navigation.js @@ -0,0 +1 @@ +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAE62dXXPjuLGG/4vP7e45mdnNJpk7jyzPKrYsl2XvXKRSUzAJSzimQAWEvFZS+e8pUBSJj0Z3k5M7l/vF84IQCYBAk/zbvy6sfLcXny4+Ky3M8eKHi72w24tPF7u6PFSy+d+t3VX/0wdflS4vPv384S8///SHn//9w1B6vbp7kJv5+z5H8AUYZX3cPdcVQukFGOXxuJcIowvnCLO6zJXuQrmSV58f5Eum6DmWLSsLtRPVh49/zgF8QY5SykYaJSr1z9whhIpsberisJPa5uoyhPOEw3OVq0QfzJVeaPvTx0zhcyxX9rbWm0zRLpQruRTvNzJ3FfTBbGmlkdLnYK706vn/ZWEXZaa8F84RqF+e87s/qp1srNjlLmQ/nmM8PS2uMsW7EHbtJiX/z/23LT6U/OGiqETTXHy6sE35o2p+lO9WGi2cpNiqqjRSX3z6W7Z7a0uf0adg6PDh45/zHlGN58bUJsc+x6fjVy8vjbSUiaeabhX34YnLSfAdBgdt1U5SB+PLppvFY0licxJMN/hNVAeJ8Nv4d+ClaVStqcbyZdPMwgEvMHChadBoLAyobWwiFhgmQ3YvmGgQjVshvA1OA0dDWsBtY9Ow4WgXUF1oGjQeCAPsKTgRHI2RIbgNTgOnw2eAPoenwYFRMaD38Wn4cMAMyC40sQdp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omcUC01/+fnff/8P45m6WhqaAAA=" \ No newline at end of file diff --git a/docs/6.9/assets/search.js b/docs/6.9/assets/search.js new file mode 100644 index 0000000000..492ba83587 --- /dev/null +++ b/docs/6.9/assets/search.js @@ -0,0 +1 @@ +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAE8S9W3ccuZHv+1265nEsu9tu75l5oyiqzWlR1LCk9tkzay+tZBVIppWVWc7MEknvdb77WVnXTCAi8I8Ayuep1SwA8cMlIwKB2//9oW2eux/+43/+7w/fynr5w3/86cd//9Mf//Cnf/2hLlbuh//44W1ZF+3rD//6w6atfviPH1bNclO57s1Tv6pmx98WVdF1rvvhP3744f/9V7ak+e3HO/d49bJmShv/Dpc4f13dNxVf4vF3uMTPr2vHl7f/FSrtslkyJe1/gUp59/bOPdDFHH7CynGLclVUP/70b0xh49+xEpvNfcXU8PgbVNJ13f/xJ7qgw09QOR+a+pEuZv8LVMpN8fKrY8b88TespLLmSzr8BpV0e/83t+ivl3RZo1+h0j6XK9f1xYr5FMc/Q+V9+XL9ji5q/wtZyk9/+Pf/9ePPPx1Luahf326qb39ty97drl1b9GVTH4vtX9eu+z2ZZiuKlfLzn0/f9ynrkK87Fl7WvWsfioXrfu+nEQv/8Q8/nVrh/nVddN27ZrFZubr/rajK5bQKMSkzoYSR+H/9YV20ru6pCjFoTbt0rVviJKcMaYIfmnbh5q797tpgCEch6MxpQJXrcYBd4jSBrSuWl029cK1iIEwznQD6bvm7svtdWT+5Ic/SArRoqko5LsdZ8sKsipdB29zMcZhxltwtsxq+O027HDLkBWld375uE+IqajbNlBdoef9x+AfMckyfF6PY9E/LexzjmD4vRt3cuW7d1J2iRSZ58uJ0rutUn/MpQ16Q57Kq7o6jEOcJ8uX+morlp9Y9uNbVCwVWkC8vVrMq+zsjGpk3c6sVz4qm2ibOC+Dq4r5yX/qHf7O4UkzuzAN+SKM27l6uzK32sq6KUtNQxwzpID/922nq09SPzTHtVds27ZFpL+j3RBrR2/75x59Gtrru+naz6B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wRxhAlawjy54KRdxmx6MUlTOsBUcZdY1jiNf3OmwvwpKbaQx7+CatUNcwJB6QY8l52WIzJOfLPxuMPCPEu5TDiUqS1T+bSarxgmmByUmd5CSMJseq/nU5fz3NH8n5+FA2OSGukCUdkBtozWBq//jf7On7f///j3//+z/McGmSCG0LAA=="; \ No newline at end of file diff --git a/docs/6.9/assets/style.css b/docs/6.9/assets/style.css new file mode 100644 index 0000000000..9d619a6418 --- /dev/null +++ b/docs/6.9/assets/style.css @@ -0,0 +1,1448 @@ +:root { + /* Light */ + --light-color-background: #f2f4f8; + --light-color-background-secondary: #eff0f1; + --light-color-warning-text: #222; + --light-color-background-warning: #e6e600; + --light-color-icon-background: var(--light-color-background); + --light-color-accent: #c5c7c9; + --light-color-active-menu-item: var(--light-color-accent); + --light-color-text: #222; + --light-color-text-aside: #6e6e6e; + --light-color-link: #1f70c2; + --light-color-focus-outline: #3584e4; + + --light-color-ts-keyword: #056bd6; + --light-color-ts-project: #b111c9; + --light-color-ts-module: var(--light-color-ts-project); + --light-color-ts-namespace: var(--light-color-ts-project); + --light-color-ts-enum: #7e6f15; + --light-color-ts-enum-member: var(--light-color-ts-enum); + --light-color-ts-variable: #4760ec; + --light-color-ts-function: #572be7; + --light-color-ts-class: #1f70c2; + --light-color-ts-interface: #108024; + --light-color-ts-constructor: var(--light-color-ts-class); + --light-color-ts-property: var(--light-color-ts-variable); + --light-color-ts-method: var(--light-color-ts-function); + --light-color-ts-call-signature: var(--light-color-ts-method); + --light-color-ts-index-signature: var(--light-color-ts-property); + --light-color-ts-constructor-signature: var(--light-color-ts-constructor); + --light-color-ts-parameter: var(--light-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --light-color-ts-type-parameter: #a55c0e; + --light-color-ts-accessor: var(--light-color-ts-property); + --light-color-ts-get-signature: var(--light-color-ts-accessor); + --light-color-ts-set-signature: var(--light-color-ts-accessor); + --light-color-ts-type-alias: #d51270; + /* reference not included as links will be colored with the kind that it points to */ + --light-color-document: #000000; + + --light-external-icon: url("data:image/svg+xml;utf8,"); + --light-color-scheme: light; + + /* Dark */ + --dark-color-background: #2b2e33; + --dark-color-background-secondary: #1e2024; + --dark-color-background-warning: #bebe00; + --dark-color-warning-text: #222; + --dark-color-icon-background: var(--dark-color-background-secondary); + --dark-color-accent: #9096a2; + --dark-color-active-menu-item: #5d5d6a; + --dark-color-text: #f5f5f5; + --dark-color-text-aside: #dddddd; + --dark-color-link: #00aff4; + --dark-color-focus-outline: #4c97f2; + + --dark-color-ts-keyword: #3399ff; + --dark-color-ts-project: #e358ff; + --dark-color-ts-module: var(--dark-color-ts-project); + --dark-color-ts-namespace: var(--dark-color-ts-project); + --dark-color-ts-enum: #f4d93e; + --dark-color-ts-enum-member: var(--dark-color-ts-enum); + --dark-color-ts-variable: #798dff; + --dark-color-ts-function: #a280ff; + --dark-color-ts-class: #8ac4ff; + --dark-color-ts-interface: #6cff87; + --dark-color-ts-constructor: var(--dark-color-ts-class); + --dark-color-ts-property: var(--dark-color-ts-variable); + --dark-color-ts-method: var(--dark-color-ts-function); + --dark-color-ts-call-signature: var(--dark-color-ts-method); + --dark-color-ts-index-signature: var(--dark-color-ts-property); + --dark-color-ts-constructor-signature: var(--dark-color-ts-constructor); + --dark-color-ts-parameter: var(--dark-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --dark-color-ts-type-parameter: #e07d13; + --dark-color-ts-accessor: var(--dark-color-ts-property); + --dark-color-ts-get-signature: var(--dark-color-ts-accessor); + --dark-color-ts-set-signature: var(--dark-color-ts-accessor); + --dark-color-ts-type-alias: #ff6492; + /* reference not included as links will be colored with the kind that it points to */ + --dark-color-document: #ffffff; + + --dark-external-icon: url("data:image/svg+xml;utf8,"); + --dark-color-scheme: dark; +} + +@media (prefers-color-scheme: light) { + :root { + --color-background: var(--light-color-background); + --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); + --color-icon-background: var(--light-color-icon-background); + --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); + --color-text: var(--light-color-text); + --color-text-aside: var(--light-color-text-aside); + --color-link: var(--light-color-link); + --color-focus-outline: var(--light-color-focus-outline); + + --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); + --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + --color-document: var(--light-color-document); + + --external-icon: var(--light-external-icon); + --color-scheme: var(--light-color-scheme); + } +} + +@media (prefers-color-scheme: dark) { + :root { + --color-background: var(--dark-color-background); + --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); + --color-icon-background: var(--dark-color-icon-background); + --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); + --color-text: var(--dark-color-text); + --color-text-aside: var(--dark-color-text-aside); + --color-link: var(--dark-color-link); + --color-focus-outline: var(--dark-color-focus-outline); + + --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); + --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + --color-document: var(--dark-color-document); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); + } +} + +html { + color-scheme: var(--color-scheme); +} + +body { + margin: 0; +} + +:root[data-theme="light"] { + --color-background: var(--light-color-background); + --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); + --color-icon-background: var(--light-color-icon-background); + --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); + --color-text: var(--light-color-text); + --color-text-aside: var(--light-color-text-aside); + --color-link: var(--light-color-link); + --color-focus-outline: var(--light-color-focus-outline); + + --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); + --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + --color-document: var(--light-color-document); + + --external-icon: var(--light-external-icon); + --color-scheme: var(--light-color-scheme); +} + +:root[data-theme="dark"] { + --color-background: var(--dark-color-background); + --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); + --color-icon-background: var(--dark-color-icon-background); + --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); + --color-text: var(--dark-color-text); + --color-text-aside: var(--dark-color-text-aside); + --color-link: var(--dark-color-link); + --color-focus-outline: var(--dark-color-focus-outline); + + --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); + --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + --color-document: var(--dark-color-document); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); +} + +*:focus-visible, +.tsd-accordion-summary:focus-visible svg { + outline: 2px solid var(--color-focus-outline); +} + +.always-visible, +.always-visible .tsd-signatures { + display: inherit !important; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + line-height: 1.2; +} + +h1 { + font-size: 1.875rem; + margin: 0.67rem 0; +} + +h2 { + font-size: 1.5rem; + margin: 0.83rem 0; +} + +h3 { + font-size: 1.25rem; + margin: 1rem 0; +} + +h4 { + font-size: 1.05rem; + margin: 1.33rem 0; +} + +h5 { + font-size: 1rem; + margin: 1.5rem 0; +} + +h6 { + font-size: 0.875rem; + margin: 2.33rem 0; +} + +dl, +menu, +ol, +ul { + margin: 1em 0; +} + +dd { + margin: 0 0 0 40px; +} + +.container { + max-width: 1700px; + padding: 0 2rem; +} + +/* Footer */ +footer { + border-top: 1px solid var(--color-accent); + padding-top: 1rem; + padding-bottom: 1rem; + max-height: 3.5rem; +} +footer > p { + margin: 0 1em; +} + +.container-main { + margin: 0 auto; + /* toolbar, footer, margin */ + min-height: calc(100vh - 41px - 56px - 4rem); +} + +@keyframes fade-in { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes fade-out { + from { + opacity: 1; + visibility: visible; + } + to { + opacity: 0; + } +} +@keyframes fade-in-delayed { + 0% { + opacity: 0; + } + 33% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@keyframes fade-out-delayed { + 0% { + opacity: 1; + visibility: visible; + } + 66% { + opacity: 0; + } + 100% { + opacity: 0; + } +} +@keyframes pop-in-from-right { + from { + transform: translate(100%, 0); + } + to { + transform: translate(0, 0); + } +} +@keyframes pop-out-to-right { + from { + transform: translate(0, 0); + visibility: visible; + } + to { + transform: translate(100%, 0); + } +} +body { + background: var(--color-background); + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", + Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; + font-size: 16px; + color: var(--color-text); +} + +a { + color: var(--color-link); + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +a.external[target="_blank"] { + background-image: var(--external-icon); + background-position: top 3px right; + background-repeat: no-repeat; + padding-right: 13px; +} +a.tsd-anchor-link { + color: var(--color-text); +} + +code, +pre { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + padding: 0.2em; + margin: 0; + font-size: 0.875rem; + border-radius: 0.8em; +} + +pre { + position: relative; + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; + padding: 10px; + border: 1px solid var(--color-accent); +} +pre code { + padding: 0; + font-size: 100%; +} +pre > button { + position: absolute; + top: 10px; + right: 10px; + opacity: 0; + transition: opacity 0.1s; + box-sizing: border-box; +} +pre:hover > button, +pre > button.visible { + opacity: 1; +} + +blockquote { + margin: 1em 0; + padding-left: 1em; + border-left: 4px solid gray; +} + +.tsd-typography { + line-height: 1.333em; +} +.tsd-typography ul { + list-style: square; + padding: 0 0 0 20px; + margin: 0; +} +.tsd-typography .tsd-index-panel h3, +.tsd-index-panel .tsd-typography h3, +.tsd-typography h4, +.tsd-typography h5, +.tsd-typography h6 { + font-size: 1em; +} +.tsd-typography h5, +.tsd-typography h6 { + font-weight: normal; +} +.tsd-typography p, +.tsd-typography ul, +.tsd-typography ol { + margin: 1em 0; +} +.tsd-typography table { + border-collapse: collapse; + border: none; +} +.tsd-typography td, +.tsd-typography th { + padding: 6px 13px; + border: 1px solid var(--color-accent); +} +.tsd-typography thead, +.tsd-typography tr:nth-child(even) { + background-color: var(--color-background-secondary); +} + +.tsd-breadcrumb { + margin: 0; + padding: 0; + color: var(--color-text-aside); +} +.tsd-breadcrumb a { + color: var(--color-text-aside); + text-decoration: none; +} +.tsd-breadcrumb a:hover { + text-decoration: underline; +} +.tsd-breadcrumb li { + display: inline; +} +.tsd-breadcrumb li:after { + content: " / "; +} + +.tsd-comment-tags { + display: flex; + flex-direction: column; +} +dl.tsd-comment-tag-group { + display: flex; + align-items: center; + overflow: hidden; + margin: 0.5em 0; +} +dl.tsd-comment-tag-group dt { + display: flex; + margin-right: 0.5em; + font-size: 0.875em; + font-weight: normal; +} +dl.tsd-comment-tag-group dd { + margin: 0; +} +code.tsd-tag { + padding: 0.25em 0.4em; + border: 0.1em solid var(--color-accent); + margin-right: 0.25em; + font-size: 70%; +} +h1 code.tsd-tag:first-of-type { + margin-left: 0.25em; +} + +dl.tsd-comment-tag-group dd:before, +dl.tsd-comment-tag-group dd:after { + content: " "; +} +dl.tsd-comment-tag-group dd pre, +dl.tsd-comment-tag-group dd:after { + clear: both; +} +dl.tsd-comment-tag-group p { + margin: 0; +} + +.tsd-panel.tsd-comment .lead { + font-size: 1.1em; + line-height: 1.333em; + margin-bottom: 2em; +} +.tsd-panel.tsd-comment .lead:last-child { + margin-bottom: 0; +} + +.tsd-filter-visibility h4 { + font-size: 1rem; + padding-top: 0.75rem; + padding-bottom: 0.5rem; + margin: 0; +} +.tsd-filter-item:not(:last-child) { + margin-bottom: 0.5rem; +} +.tsd-filter-input { + display: flex; + width: -moz-fit-content; + width: fit-content; + align-items: center; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; +} +.tsd-filter-input input[type="checkbox"] { + cursor: pointer; + position: absolute; + width: 1.5em; + height: 1.5em; + opacity: 0; +} +.tsd-filter-input input[type="checkbox"]:disabled { + pointer-events: none; +} +.tsd-filter-input svg { + cursor: pointer; + width: 1.5em; + height: 1.5em; + margin-right: 0.5em; + border-radius: 0.33em; + /* Leaving this at full opacity breaks event listeners on Firefox. + Don't remove unless you know what you're doing. */ + opacity: 0.99; +} +.tsd-filter-input input[type="checkbox"]:focus-visible + svg { + outline: 2px solid var(--color-focus-outline); +} +.tsd-checkbox-background { + fill: var(--color-accent); +} +input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { + stroke: var(--color-text); +} +.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-background { + fill: var(--color-background); + stroke: var(--color-accent); + stroke-width: 0.25rem; +} +.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-checkmark { + stroke: var(--color-accent); +} + +.settings-label { + font-weight: bold; + text-transform: uppercase; + display: inline-block; +} + +.tsd-filter-visibility .settings-label { + margin: 0.75rem 0 0.5rem 0; +} + +.tsd-theme-toggle .settings-label { + margin: 0.75rem 0.75rem 0 0; +} + +.tsd-hierarchy { + list-style: square; + margin: 0; +} +.tsd-hierarchy .target { + font-weight: bold; +} + +.tsd-full-hierarchy:not(:last-child) { + margin-bottom: 1em; + padding-bottom: 1em; + border-bottom: 1px solid var(--color-accent); +} +.tsd-full-hierarchy, +.tsd-full-hierarchy ul { + list-style: none; + margin: 0; + padding: 0; +} +.tsd-full-hierarchy ul { + padding-left: 1.5rem; +} +.tsd-full-hierarchy a { + padding: 0.25rem 0 !important; + font-size: 1rem; + display: inline-flex; + align-items: center; + color: var(--color-text); +} + +.tsd-panel-group.tsd-index-group { + margin-bottom: 0; +} +.tsd-index-panel .tsd-index-list { + list-style: none; + line-height: 1.333em; + margin: 0; + padding: 0.25rem 0 0 0; + overflow: hidden; + display: grid; + grid-template-columns: repeat(3, 1fr); + column-gap: 1rem; + grid-template-rows: auto; +} +@media (max-width: 1024px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(2, 1fr); + } +} +@media (max-width: 768px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(1, 1fr); + } +} +.tsd-index-panel .tsd-index-list li { + -webkit-page-break-inside: avoid; + -moz-page-break-inside: avoid; + -ms-page-break-inside: avoid; + -o-page-break-inside: avoid; + page-break-inside: avoid; +} + +.tsd-flag { + display: inline-block; + padding: 0.25em 0.4em; + border-radius: 4px; + color: var(--color-comment-tag-text); + background-color: var(--color-comment-tag); + text-indent: 0; + font-size: 75%; + line-height: 1; + font-weight: normal; +} + +.tsd-anchor { + position: relative; + top: -100px; +} + +.tsd-member { + position: relative; +} +.tsd-member .tsd-anchor + h3 { + display: flex; + align-items: center; + margin-top: 0; + margin-bottom: 0; + border-bottom: none; +} + +.tsd-navigation.settings { + margin: 1rem 0; +} +.tsd-navigation > a, +.tsd-navigation .tsd-accordion-summary { + width: calc(100% - 0.25rem); + display: flex; + align-items: center; +} +.tsd-navigation a, +.tsd-navigation summary > span, +.tsd-page-navigation a { + display: flex; + width: calc(100% - 0.25rem); + align-items: center; + padding: 0.25rem; + color: var(--color-text); + text-decoration: none; + box-sizing: border-box; +} +.tsd-navigation a.current, +.tsd-page-navigation a.current { + background: var(--color-active-menu-item); +} +.tsd-navigation a:hover, +.tsd-page-navigation a:hover { + text-decoration: underline; +} +.tsd-navigation ul, +.tsd-page-navigation ul { + margin-top: 0; + margin-bottom: 0; + padding: 0; + list-style: none; +} +.tsd-navigation li, +.tsd-page-navigation li { + padding: 0; + max-width: 100%; +} +.tsd-navigation .tsd-nav-link { + display: none; +} +.tsd-nested-navigation { + margin-left: 3rem; +} +.tsd-nested-navigation > li > details { + margin-left: -1.5rem; +} +.tsd-small-nested-navigation { + margin-left: 1.5rem; +} +.tsd-small-nested-navigation > li > details { + margin-left: -1.5rem; +} + +.tsd-page-navigation-section { + margin-left: 10px; +} +.tsd-page-navigation-section > summary { + padding: 0.25rem; +} +.tsd-page-navigation-section > div { + margin-left: 20px; +} +.tsd-page-navigation ul { + padding-left: 1.75rem; +} + +#tsd-sidebar-links a { + margin-top: 0; + margin-bottom: 0.5rem; + line-height: 1.25rem; +} +#tsd-sidebar-links a:last-of-type { + margin-bottom: 0; +} + +a.tsd-index-link { + padding: 0.25rem 0 !important; + font-size: 1rem; + line-height: 1.25rem; + display: inline-flex; + align-items: center; + color: var(--color-text); +} +.tsd-accordion-summary { + list-style-type: none; /* hide marker on non-safari */ + outline: none; /* broken on safari, so just hide it */ +} +.tsd-accordion-summary::-webkit-details-marker { + display: none; /* hide marker on safari */ +} +.tsd-accordion-summary, +.tsd-accordion-summary a { + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; + + cursor: pointer; +} +.tsd-accordion-summary a { + width: calc(100% - 1.5rem); +} +.tsd-accordion-summary > * { + margin-top: 0; + margin-bottom: 0; + padding-top: 0; + padding-bottom: 0; +} +.tsd-accordion .tsd-accordion-summary > svg { + margin-left: 0.25rem; + vertical-align: text-top; +} +.tsd-index-content > :not(:first-child) { + margin-top: 0.75rem; +} +.tsd-index-heading { + margin-top: 1.5rem; + margin-bottom: 0.75rem; +} + +.tsd-kind-icon { + margin-right: 0.5rem; + width: 1.25rem; + height: 1.25rem; + min-width: 1.25rem; + min-height: 1.25rem; +} +.tsd-kind-icon path { + transform-origin: center; + transform: scale(1.1); +} +.tsd-signature > .tsd-kind-icon { + margin-right: 0.8rem; +} + +.tsd-panel { + margin-bottom: 2.5rem; +} +.tsd-panel.tsd-member { + margin-bottom: 4rem; +} +.tsd-panel:empty { + display: none; +} +.tsd-panel > h1, +.tsd-panel > h2, +.tsd-panel > h3 { + margin: 1.5rem -1.5rem 0.75rem -1.5rem; + padding: 0 1.5rem 0.75rem 1.5rem; +} +.tsd-panel > h1.tsd-before-signature, +.tsd-panel > h2.tsd-before-signature, +.tsd-panel > h3.tsd-before-signature { + margin-bottom: 0; + border-bottom: none; +} + +.tsd-panel-group { + margin: 2rem 0; +} +.tsd-panel-group.tsd-index-group { + margin: 2rem 0; +} +.tsd-panel-group.tsd-index-group details { + margin: 2rem 0; +} +.tsd-panel-group > .tsd-accordion-summary { + margin-bottom: 1rem; +} + +#tsd-search { + transition: background-color 0.2s; +} +#tsd-search .title { + position: relative; + z-index: 2; +} +#tsd-search .field { + position: absolute; + left: 0; + top: 0; + right: 2.5rem; + height: 100%; +} +#tsd-search .field input { + box-sizing: border-box; + position: relative; + top: -50px; + z-index: 1; + width: 100%; + padding: 0 10px; + opacity: 0; + outline: 0; + border: 0; + background: transparent; + color: var(--color-text); +} +#tsd-search .field label { + position: absolute; + overflow: hidden; + right: -40px; +} +#tsd-search .field input, +#tsd-search .title, +#tsd-toolbar-links a { + transition: opacity 0.2s; +} +#tsd-search .results { + position: absolute; + visibility: hidden; + top: 40px; + width: 100%; + margin: 0; + padding: 0; + list-style: none; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); +} +#tsd-search .results li { + background-color: var(--color-background); + line-height: initial; + padding: 4px; +} +#tsd-search .results li:nth-child(even) { + background-color: var(--color-background-secondary); +} +#tsd-search .results li.state { + display: none; +} +#tsd-search .results li.current:not(.no-results), +#tsd-search .results li:hover:not(.no-results) { + background-color: var(--color-accent); +} +#tsd-search .results a { + display: flex; + align-items: center; + padding: 0.25rem; + box-sizing: border-box; +} +#tsd-search .results a:before { + top: 10px; +} +#tsd-search .results span.parent { + color: var(--color-text-aside); + font-weight: normal; +} +#tsd-search.has-focus { + background-color: var(--color-accent); +} +#tsd-search.has-focus .field input { + top: 0; + opacity: 1; +} +#tsd-search.has-focus .title, +#tsd-search.has-focus #tsd-toolbar-links a { + z-index: 0; + opacity: 0; +} +#tsd-search.has-focus .results { + visibility: visible; +} +#tsd-search.loading .results li.state.loading { + display: block; +} +#tsd-search.failure .results li.state.failure { + display: block; +} + +#tsd-toolbar-links { + position: absolute; + top: 0; + right: 2rem; + height: 100%; + display: flex; + align-items: center; + justify-content: flex-end; +} +#tsd-toolbar-links a { + margin-left: 1.5rem; +} +#tsd-toolbar-links a:hover { + text-decoration: underline; +} + +.tsd-signature { + margin: 0 0 1rem 0; + padding: 1rem 0.5rem; + border: 1px solid var(--color-accent); + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + font-size: 14px; + overflow-x: auto; +} + +.tsd-signature-keyword { + color: var(--color-ts-keyword); + font-weight: normal; +} + +.tsd-signature-symbol { + color: var(--color-text-aside); + font-weight: normal; +} + +.tsd-signature-type { + font-style: italic; + font-weight: normal; +} + +.tsd-signatures { + padding: 0; + margin: 0 0 1em 0; + list-style-type: none; +} +.tsd-signatures .tsd-signature { + margin: 0; + border-color: var(--color-accent); + border-width: 1px 0; + transition: background-color 0.1s; +} +.tsd-signatures .tsd-index-signature:not(:last-child) { + margin-bottom: 1em; +} +.tsd-signatures .tsd-index-signature .tsd-signature { + border-width: 1px; +} +.tsd-description .tsd-signatures .tsd-signature { + border-width: 1px; +} + +ul.tsd-parameter-list, +ul.tsd-type-parameter-list { + list-style: square; + margin: 0; + padding-left: 20px; +} +ul.tsd-parameter-list > li.tsd-parameter-signature, +ul.tsd-type-parameter-list > li.tsd-parameter-signature { + list-style: none; + margin-left: -20px; +} +ul.tsd-parameter-list h5, +ul.tsd-type-parameter-list h5 { + font-size: 16px; + margin: 1em 0 0.5em 0; +} +.tsd-sources { + margin-top: 1rem; + font-size: 0.875em; +} +.tsd-sources a { + color: var(--color-text-aside); + text-decoration: underline; +} +.tsd-sources ul { + list-style: none; + padding: 0; +} + +.tsd-page-toolbar { + position: sticky; + z-index: 1; + top: 0; + left: 0; + width: 100%; + color: var(--color-text); + background: var(--color-background-secondary); + border-bottom: 1px var(--color-accent) solid; + transition: transform 0.3s ease-in-out; +} +.tsd-page-toolbar a { + color: var(--color-text); + text-decoration: none; +} +.tsd-page-toolbar a.title { + font-weight: bold; +} +.tsd-page-toolbar a.title:hover { + text-decoration: underline; +} +.tsd-page-toolbar .tsd-toolbar-contents { + display: flex; + justify-content: space-between; + height: 2.5rem; + margin: 0 auto; +} +.tsd-page-toolbar .table-cell { + position: relative; + white-space: nowrap; + line-height: 40px; +} +.tsd-page-toolbar .table-cell:first-child { + width: 100%; +} +.tsd-page-toolbar .tsd-toolbar-icon { + box-sizing: border-box; + line-height: 0; + padding: 12px 0; +} + +.tsd-widget { + display: inline-block; + overflow: hidden; + opacity: 0.8; + height: 40px; + transition: + opacity 0.1s, + background-color 0.2s; + vertical-align: bottom; + cursor: pointer; +} +.tsd-widget:hover { + opacity: 0.9; +} +.tsd-widget.active { + opacity: 1; + background-color: var(--color-accent); +} +.tsd-widget.no-caption { + width: 40px; +} +.tsd-widget.no-caption:before { + margin: 0; +} + +.tsd-widget.options, +.tsd-widget.menu { + display: none; +} +input[type="checkbox"] + .tsd-widget:before { + background-position: -120px 0; +} +input[type="checkbox"]:checked + .tsd-widget:before { + background-position: -160px 0; +} + +img { + max-width: 100%; +} + +.tsd-anchor-icon { + display: inline-flex; + align-items: center; + margin-left: 0.5rem; + vertical-align: middle; + color: var(--color-text); +} + +.tsd-anchor-icon svg { + width: 1em; + height: 1em; + visibility: hidden; +} + +.tsd-anchor-link:hover > .tsd-anchor-icon svg { + visibility: visible; +} + +.deprecated { + text-decoration: line-through !important; +} + +.warning { + padding: 1rem; + color: var(--color-warning-text); + background: var(--color-background-warning); +} + +.tsd-kind-project { + color: var(--color-ts-project); +} +.tsd-kind-module { + color: var(--color-ts-module); +} +.tsd-kind-namespace { + color: var(--color-ts-namespace); +} +.tsd-kind-enum { + color: var(--color-ts-enum); +} +.tsd-kind-enum-member { + color: var(--color-ts-enum-member); +} +.tsd-kind-variable { + color: var(--color-ts-variable); +} +.tsd-kind-function { + color: var(--color-ts-function); +} +.tsd-kind-class { + color: var(--color-ts-class); +} +.tsd-kind-interface { + color: var(--color-ts-interface); +} +.tsd-kind-constructor { + color: var(--color-ts-constructor); +} +.tsd-kind-property { + color: var(--color-ts-property); +} +.tsd-kind-method { + color: var(--color-ts-method); +} +.tsd-kind-call-signature { + color: var(--color-ts-call-signature); +} +.tsd-kind-index-signature { + color: var(--color-ts-index-signature); +} +.tsd-kind-constructor-signature { + color: var(--color-ts-constructor-signature); +} +.tsd-kind-parameter { + color: var(--color-ts-parameter); +} +.tsd-kind-type-literal { + color: var(--color-ts-type-literal); +} +.tsd-kind-type-parameter { + color: var(--color-ts-type-parameter); +} +.tsd-kind-accessor { + color: var(--color-ts-accessor); +} +.tsd-kind-get-signature { + color: var(--color-ts-get-signature); +} +.tsd-kind-set-signature { + color: var(--color-ts-set-signature); +} +.tsd-kind-type-alias { + color: var(--color-ts-type-alias); +} + +/* if we have a kind icon, don't color the text by kind */ +.tsd-kind-icon ~ span { + color: var(--color-text); +} + +* { + scrollbar-width: thin; + scrollbar-color: var(--color-accent) var(--color-icon-background); +} + +*::-webkit-scrollbar { + width: 0.75rem; +} + +*::-webkit-scrollbar-track { + background: var(--color-icon-background); +} + +*::-webkit-scrollbar-thumb { + background-color: var(--color-accent); + border-radius: 999rem; + border: 0.25rem solid var(--color-icon-background); +} + +/* mobile */ +@media (max-width: 769px) { + .tsd-widget.options, + .tsd-widget.menu { + display: inline-block; + } + + .container-main { + display: flex; + } + html .col-content { + float: none; + max-width: 100%; + width: 100%; + } + html .col-sidebar { + position: fixed !important; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 1024; + top: 0 !important; + bottom: 0 !important; + left: auto !important; + right: 0 !important; + padding: 1.5rem 1.5rem 0 0; + width: 75vw; + visibility: hidden; + background-color: var(--color-background); + transform: translate(100%, 0); + } + html .col-sidebar > *:last-child { + padding-bottom: 20px; + } + html .overlay { + content: ""; + display: block; + position: fixed; + z-index: 1023; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.75); + visibility: hidden; + } + + .to-has-menu .overlay { + animation: fade-in 0.4s; + } + + .to-has-menu .col-sidebar { + animation: pop-in-from-right 0.4s; + } + + .from-has-menu .overlay { + animation: fade-out 0.4s; + } + + .from-has-menu .col-sidebar { + animation: pop-out-to-right 0.4s; + } + + .has-menu body { + overflow: hidden; + } + .has-menu .overlay { + visibility: visible; + } + .has-menu .col-sidebar { + visibility: visible; + transform: translate(0, 0); + display: flex; + flex-direction: column; + gap: 1.5rem; + max-height: 100vh; + padding: 1rem 2rem; + } + .has-menu .tsd-navigation { + max-height: 100%; + } + #tsd-toolbar-links { + display: none; + } + .tsd-navigation .tsd-nav-link { + display: flex; + } +} + +/* one sidebar */ +@media (min-width: 770px) { + .container-main { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); + grid-template-areas: "sidebar content"; + margin: 2rem auto; + } + + .col-sidebar { + grid-area: sidebar; + } + .col-content { + grid-area: content; + padding: 0 1rem; + } +} +@media (min-width: 770px) and (max-width: 1399px) { + .col-sidebar { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + padding-top: 1rem; + } + .site-menu { + margin-top: 1rem; + } +} + +/* two sidebars */ +@media (min-width: 1200px) { + .container-main { + grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr) minmax(0, 20rem); + grid-template-areas: "sidebar content toc"; + } + + .col-sidebar { + display: contents; + } + + .page-menu { + grid-area: toc; + padding-left: 1rem; + } + .site-menu { + grid-area: sidebar; + } + + .site-menu { + margin-top: 1rem 0; + } + + .page-menu, + .site-menu { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + } +} diff --git a/docs/6.9/classes/AbstractCursor.html b/docs/6.9/classes/AbstractCursor.html new file mode 100644 index 0000000000..b5e2fb78f8 --- /dev/null +++ b/docs/6.9/classes/AbstractCursor.html @@ -0,0 +1,506 @@ +AbstractCursor | mongodb

Class AbstractCursor<TSchema, CursorEvents>Abstract

Type Parameters

Hierarchy (view full)

Implements

Properties

[asyncDispose]: (() => Promise<void>)

An alias for AbstractCursor.close|AbstractCursor.close().

+
captureRejections: boolean

Value: boolean

+

Change the default captureRejections option on all new EventEmitter objects.

+

v13.4.0, v12.16.0

+
captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

+

See how to write a custom rejection handler.

+

v13.4.0, v12.16.0

+
CLOSE: "close" = ...
defaultMaxListeners: number

By default, a maximum of 10 listeners can be registered for any single +event. This limit can be changed for individual EventEmitter instances +using the emitter.setMaxListeners(n) method. To change the default +for allEventEmitter instances, the events.defaultMaxListeners property +can be used. If this value is not a positive number, a RangeError is thrown.

+

Take caution when setting the events.defaultMaxListeners because the +change affects all EventEmitter instances, including those created before +the change is made. However, calling emitter.setMaxListeners(n) still has +precedence over events.defaultMaxListeners.

+

This is not a hard limit. The EventEmitter instance will allow +more listeners to be added but will output a trace warning to stderr indicating +that a "possible EventEmitter memory leak" has been detected. For any single +EventEmitter, the emitter.getMaxListeners() and emitter.setMaxListeners() methods can be used to +temporarily avoid this warning:

+
import { EventEmitter } from 'node:events';
const emitter = new EventEmitter();
emitter.setMaxListeners(emitter.getMaxListeners() + 1);
emitter.once('event', () => {
// do stuff
emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
}); +
+ +

The --trace-warnings command-line flag can be used to display the +stack trace for such warnings.

+

The emitted warning can be inspected with process.on('warning') and will +have the additional emitter, type, and count properties, referring to +the event emitter instance, the event's name and the number of attached +listeners, respectively. +Its name property is set to 'MaxListenersExceededWarning'.

+

v0.11.2

+
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

+

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted. Therefore, the process will still crash if no +regular 'error' listener is installed.

+

v13.6.0, v12.17.0

+

Accessors

  • get closed(): boolean
  • The cursor is closed and all remaining locally buffered documents have been iterated.

    +

    Returns boolean

  • get id(): undefined | Long
  • The cursor has no id until it receives a response from the initial cursor creating command.

    +

    It is non-zero for as long as the database has an open cursor.

    +

    The initiating command may receive a zero id if the entire result is in the firstBatch.

    +

    Returns undefined | Long

  • get killed(): boolean
  • A killCursors command was attempted on this cursor. +This is performed if the cursor id is non zero.

    +

    Returns boolean

Methods

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest...args: AnyRest

    Returns void

  • Add a cursor flag to the cursor

    +

    Parameters

    • flag:
          | "tailable"
          | "oplogReplay"
          | "noCursorTimeout"
          | "awaitData"
          | "partial"
          | "exhaust"

      The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial' -.

      +
    • value: boolean

      The flag boolean value.

      +

    Returns this

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Type Parameters

    • EventKey extends string | number | symbol

    Parameters

    Returns boolean

    v0.1.26

    +
  • Returns an array listing the events for which the emitter has registered +listeners. The values in the array are strings or Symbols.

    +
    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ] +
    + +

    Returns string[]

    v6.0.0

    +
  • Iterates over all the documents for this cursor using the iterator, callback pattern.

    +

    If the iterator returns false, iteration will stop.

    +

    Parameters

    • iterator: ((doc: TSchema) => boolean | void)

      The iteration callback.

      +
        • (doc): boolean | void
        • Parameters

          Returns boolean | void

    Returns Promise<void>

      +
    • Will be removed in a future release. Use for await...of instead.
    • +
    +
  • Returns the number of listeners listening for the event named eventName. +If listener is provided, it will return how many times the listener is found +in the list of the listeners of the event.

    +

    Type Parameters

    • EventKey extends string | number | symbol

    Parameters

    Returns number

    v3.2.0

    +
  • Map all documents using the provided function +If there is a transform set on the cursor, that will be called first and the result passed to +this function's transform.

    +

    Type Parameters

    • T = any

    Parameters

    • transform: ((doc: TSchema) => T)

      The mapping transformation method.

      +

    Returns AbstractCursor<T, AbstractCursorEvents>

    Note Cursors use null internally to indicate that there are no more documents in the cursor. Providing a mapping +function that maps values to null will result in the cursor closing itself before it has finished iterating +all documents. This will not result in a memory leak, just surprising behavior. For example:

    +
    const cursor = collection.find({});
    cursor.map(() => null);

    const documents = await cursor.toArray();
    // documents is always [], regardless of how many documents are in the collection. +
    + +

    Other falsey values are allowed:

    +
    const cursor = collection.find({});
    cursor.map(() => '');

    const documents = await cursor.toArray();
    // documents is now an array of empty strings +
    + +

    Note for Typescript Users: adding a transform changes the return type of the iteration of this cursor, +it does not return a new instance of a cursor. This means when calling map, +you should always assign the result to a new variable in order to get a correctly typed cursor variable. +Take note of the following example:

    +
    const cursor: FindCursor<Document> = coll.find();
    const mappedCursor: FindCursor<number> = cursor.map(doc => Object.keys(doc).length);
    const keyCounts: number[] = await mappedCursor.toArray(); // cursor.toArray() still returns Document[] +
    + +
  • Set a maxTimeMS on the cursor query, allowing for hard timeout limits on queries (Only supported on MongoDB 2.6 or higher)

    +

    Parameters

    • value: number

      Number of milliseconds to wait before aborting the query.

      +

    Returns this

  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends string | number | symbol

    Parameters

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.1.101

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends string | number | symbol

    Parameters

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.3.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends string | number | symbol

    Parameters

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends string | number | symbol

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Returns a copy of the array of listeners for the event named eventName, +including any wrappers (such as those created by .once()).

    +
    import { EventEmitter } from 'node:events';
    const emitter = new EventEmitter();
    emitter.once('log', () => console.log('log once'));

    // Returns a new Array with a function `onceWrapper` which has a property
    // `listener` which contains the original listener bound above
    const listeners = emitter.rawListeners('log');
    const logFnWrapper = listeners[0];

    // Logs "log once" to the console and does not unbind the `once` event
    logFnWrapper.listener();

    // Logs "log once" to the console and removes the listener
    logFnWrapper();

    emitter.on('log', () => console.log('log persistently'));
    // Will return a new Array with a single function bound by `.on()` above
    const newListeners = emitter.rawListeners('log');

    // Logs "log persistently" twice
    newListeners[0]();
    emitter.emit('log'); +
    + +

    Type Parameters

    • EventKey extends string | number | symbol

    Parameters

    Returns CursorEvents[EventKey][]

    v9.4.0

    +
  • Removes all listeners, or those of the specified eventName.

    +

    It is bad practice to remove listeners added elsewhere in the code, +particularly when the EventEmitter instance was created by some other +component or module (e.g. sockets or file streams).

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends string | number | symbol

    Parameters

    • Optionalevent: string | symbol | EventKey

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends string | number | symbol

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Rewind this cursor to its uninitialized state. Any options that are present on the cursor will +remain in effect. Iterating this cursor will cause new queries to be sent to the server, even +if the resultant data has already been retrieved by this cursor.

    +

    Returns void

  • By default EventEmitters will print a warning if more than 10 listeners are +added for a particular event. This is a useful default that helps finding +memory leaks. The emitter.setMaxListeners() method allows the limit to be +modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • n: number

    Returns this

    v0.3.5

    +
  • Returns an array of documents. The caller is responsible for making sure that there +is enough memory to store the results. Note that the array only contains partial +results when this cursor had been previously accessed. In that case, +cursor.rewind() can be used to reset the cursor.

    +

    Returns Promise<TSchema[]>

  • Experimental

    Listens once to the abort event on the provided signal.

    +

    Listening to the abort event on abort signals is unsafe and may +lead to resource leaks since another third party with the signal can +call e.stopImmediatePropagation(). Unfortunately Node.js cannot change +this since it would violate the web standard. Additionally, the original +API makes it easy to forget to remove listeners.

    +

    This API allows safely using AbortSignals in Node.js APIs by solving these +two issues by listening to the event such that stopImmediatePropagation does +not prevent the listener from running.

    +

    Returns a disposable so that it may be unsubscribed from more easily.

    +
    import { addAbortListener } from 'node:events';

    function example(signal) {
    let disposable;
    try {
    signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
    disposable = addAbortListener(signal, (e) => {
    // Do something when signal is aborted.
    });
    } finally {
    disposable?.[Symbol.dispose]();
    }
    } +
    + +

    Parameters

    • signal: AbortSignal
    • resource: ((event: Event) => void)
        • (event): void
        • Parameters

          • event: Event

          Returns void

    Returns Disposable

    Disposable that removes the abort listener.

    +

    v20.5.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +

    For EventEmitters this behaves exactly the same as calling .listeners on +the emitter.

    +

    For EventTargets this is the only way to get the event listeners for the +event target. This is useful for debugging and diagnostic purposes.

    +
    import { getEventListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    const listener = () => console.log('Events are fun');
    ee.on('foo', listener);
    console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
    }
    {
    const et = new EventTarget();
    const listener = () => console.log('Events are fun');
    et.addEventListener('foo', listener);
    console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget
    • name: string | symbol

    Returns Function[]

    v15.2.0, v14.17.0

    +
  • Returns the currently set max amount of listeners.

    +

    For EventEmitters this behaves exactly the same as calling .getMaxListeners on +the emitter.

    +

    For EventTargets this is the only way to get the max event listeners for the +event target. If the number of event handlers on a single EventTarget exceeds +the max set, the EventTarget will print a warning.

    +
    import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    console.log(getMaxListeners(ee)); // 10
    setMaxListeners(11, ee);
    console.log(getMaxListeners(ee)); // 11
    }
    {
    const et = new EventTarget();
    console.log(getMaxListeners(et)); // 10
    setMaxListeners(11, et);
    console.log(getMaxListeners(et)); // 11
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget

    Returns number

    v19.9.0

    +
  • A class method that returns the number of listeners for the given eventName registered on the given emitter.

    +
    import { EventEmitter, listenerCount } from 'node:events';

    const myEmitter = new EventEmitter();
    myEmitter.on('event', () => {});
    myEmitter.on('event', () => {});
    console.log(listenerCount(myEmitter, 'event'));
    // Prints: 2 +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>

      The emitter to query

      +
    • eventName: string | symbol

      The event name

      +

    Returns number

    v0.9.12

    +

    Since v3.2.0 - Use listenerCount instead.

    +
  • import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo')) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here +
    + +

    Returns an AsyncIterator that iterates eventName events. It will throw +if the EventEmitter emits 'error'. It removes all listeners when +exiting the loop. The value returned by each iteration is an array +composed of the emitted event arguments.

    +

    An AbortSignal can be used to cancel waiting on events:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ac = new AbortController();

    (async () => {
    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo', { signal: ac.signal })) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here
    })();

    process.nextTick(() => ac.abort()); +
    + +

    Use the close option to specify an array of event names that will end the iteration:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    ee.emit('close');
    });

    for await (const event of on(ee, 'foo', { close: ['close'] })) {
    console.log(event); // prints ['bar'] [42]
    }
    // the loop will exit after 'close' is emitted
    console.log('done'); // prints 'done' +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

    An AsyncIterator that iterates eventName events emitted by the emitter

    +

    v13.6.0, v12.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

  • Creates a Promise that is fulfilled when the EventEmitter emits the given +event or that is rejected if the EventEmitter emits 'error' while waiting. +The Promise will resolve with an array of all the arguments emitted to the +given event.

    +

    This method is intentionally generic and works with the web platform EventTarget interface, which has no special'error' event +semantics and does not listen to the 'error' event.

    +
    import { once, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    process.nextTick(() => {
    ee.emit('myevent', 42);
    });

    const [value] = await once(ee, 'myevent');
    console.log(value);

    const err = new Error('kaboom');
    process.nextTick(() => {
    ee.emit('error', err);
    });

    try {
    await once(ee, 'myevent');
    } catch (err) {
    console.error('error happened', err);
    } +
    + +

    The special handling of the 'error' event is only used when events.once() is used to wait for another event. If events.once() is used to wait for the +'error' event itself, then it is treated as any other kind of event without +special handling:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();

    once(ee, 'error')
    .then(([err]) => console.log('ok', err.message))
    .catch((err) => console.error('error', err.message));

    ee.emit('error', new Error('boom'));

    // Prints: ok boom +
    + +

    An AbortSignal can be used to cancel waiting for the event:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();
    const ac = new AbortController();

    async function foo(emitter, event, signal) {
    try {
    await once(emitter, event, { signal });
    console.log('event emitted!');
    } catch (error) {
    if (error.name === 'AbortError') {
    console.error('Waiting for the event was canceled!');
    } else {
    console.error('There was an error', error.message);
    }
    }
    }

    foo(ee, 'foo', ac.signal);
    ac.abort(); // Abort waiting for the event
    ee.emit('foo'); // Prints: Waiting for the event was canceled! +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

    v11.13.0, v10.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

  • import { setMaxListeners, EventEmitter } from 'node:events';

    const target = new EventTarget();
    const emitter = new EventEmitter();

    setMaxListeners(5, target, emitter); +
    + +

    Parameters

    • Optionaln: number

      A non-negative number. The maximum number of listeners per EventTarget event.

      +
    • Rest...eventTargets: (EventEmitter<DefaultEventMap> | EventTarget)[]

    Returns void

    v15.4.0

    +
diff --git a/docs/6.9/classes/Admin.html b/docs/6.9/classes/Admin.html new file mode 100644 index 0000000000..ee7ec07cb4 --- /dev/null +++ b/docs/6.9/classes/Admin.html @@ -0,0 +1,55 @@ +Admin | mongodb

Class Admin

The Admin class is an internal class that allows convenient access to +the admin functionality and commands for MongoDB.

+

ADMIN Cannot directly be instantiated

+
import { MongoClient } from 'mongodb';

const client = new MongoClient('mongodb://localhost:27017');
const admin = client.db().admin();
const dbInfo = await admin.listDatabases();
for (const db of dbInfo.databases) {
console.log(db.name);
} +
+ +

Methods

  • Execute a command

    +

    The driver will ensure the following fields are attached to the command sent to the server:

    +
      +
    • lsid - sourced from an implicit session or options.session
    • +
    • $readPreference - defaults to primary or can be configured by options.readPreference
    • +
    • $db - sourced from the name of this database
    • +
    +

    If the client has a serverApi setting:

    +
      +
    • apiVersion
    • +
    • apiStrict
    • +
    • apiDeprecationErrors
    • +
    +

    When in a transaction:

    +
      +
    • readConcern - sourced from readConcern set on the TransactionOptions
    • +
    • writeConcern - sourced from writeConcern set on the TransactionOptions
    • +
    +

    Attaching any of the above fields to the command will have no effect as the driver will overwrite the value.

    +

    Parameters

    Returns Promise<Document>

  • Remove a user from a database

    +

    Parameters

    • username: string

      The username to remove

      +
    • Optionaloptions: CommandOperationOptions

      Optional settings for the command

      +

    Returns Promise<boolean>

  • Validate an existing collection

    +

    Parameters

    • collectionName: string

      The name of the collection to validate.

      +
    • options: ValidateCollectionOptions = {}

      Optional settings for the command

      +

    Returns Promise<Document>

diff --git a/docs/6.9/classes/AggregationCursor.html b/docs/6.9/classes/AggregationCursor.html new file mode 100644 index 0000000000..41d906f9b9 --- /dev/null +++ b/docs/6.9/classes/AggregationCursor.html @@ -0,0 +1,553 @@ +AggregationCursor | mongodb

Class AggregationCursor<TSchema>

The AggregationCursor class is an internal class that embodies an aggregation cursor on MongoDB +allowing for iteration over the results returned from the underlying query. It supports +one by one document iteration, conversion to an array or can be iterated as a Node 4.X +or higher stream

+

Type Parameters

  • TSchema = any

Hierarchy (view full)

Properties

[asyncDispose]: (() => Promise<void>)

An alias for AbstractCursor.close|AbstractCursor.close().

+
pipeline: Document[]
captureRejections: boolean

Value: boolean

+

Change the default captureRejections option on all new EventEmitter objects.

+

v13.4.0, v12.16.0

+
captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

+

See how to write a custom rejection handler.

+

v13.4.0, v12.16.0

+
CLOSE: "close" = ...
defaultMaxListeners: number

By default, a maximum of 10 listeners can be registered for any single +event. This limit can be changed for individual EventEmitter instances +using the emitter.setMaxListeners(n) method. To change the default +for allEventEmitter instances, the events.defaultMaxListeners property +can be used. If this value is not a positive number, a RangeError is thrown.

+

Take caution when setting the events.defaultMaxListeners because the +change affects all EventEmitter instances, including those created before +the change is made. However, calling emitter.setMaxListeners(n) still has +precedence over events.defaultMaxListeners.

+

This is not a hard limit. The EventEmitter instance will allow +more listeners to be added but will output a trace warning to stderr indicating +that a "possible EventEmitter memory leak" has been detected. For any single +EventEmitter, the emitter.getMaxListeners() and emitter.setMaxListeners() methods can be used to +temporarily avoid this warning:

+
import { EventEmitter } from 'node:events';
const emitter = new EventEmitter();
emitter.setMaxListeners(emitter.getMaxListeners() + 1);
emitter.once('event', () => {
// do stuff
emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
}); +
+ +

The --trace-warnings command-line flag can be used to display the +stack trace for such warnings.

+

The emitted warning can be inspected with process.on('warning') and will +have the additional emitter, type, and count properties, referring to +the event emitter instance, the event's name and the number of attached +listeners, respectively. +Its name property is set to 'MaxListenersExceededWarning'.

+

v0.11.2

+
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

+

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted. Therefore, the process will still crash if no +regular 'error' listener is installed.

+

v13.6.0, v12.17.0

+

Accessors

  • get closed(): boolean
  • The cursor is closed and all remaining locally buffered documents have been iterated.

    +

    Returns boolean

  • get id(): undefined | Long
  • The cursor has no id until it receives a response from the initial cursor creating command.

    +

    It is non-zero for as long as the database has an open cursor.

    +

    The initiating command may receive a zero id if the entire result is in the firstBatch.

    +

    Returns undefined | Long

  • get killed(): boolean
  • A killCursors command was attempted on this cursor. +This is performed if the cursor id is non zero.

    +

    Returns boolean

Methods

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest...args: AnyRest

    Returns void

  • Add a cursor flag to the cursor

    +

    Parameters

    • flag:
          | "tailable"
          | "oplogReplay"
          | "noCursorTimeout"
          | "awaitData"
          | "partial"
          | "exhaust"

      The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial' -.

      +
    • value: boolean

      The flag boolean value.

      +

    Returns this

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns boolean

    v0.1.26

    +
  • Returns an array listing the events for which the emitter has registered +listeners. The values in the array are strings or Symbols.

    +
    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ] +
    + +

    Returns string[]

    v6.0.0

    +
  • Iterates over all the documents for this cursor using the iterator, callback pattern.

    +

    If the iterator returns false, iteration will stop.

    +

    Parameters

    • iterator: ((doc: TSchema) => boolean | void)

      The iteration callback.

      +
        • (doc): boolean | void
        • Parameters

          Returns boolean | void

    Returns Promise<void>

      +
    • Will be removed in a future release. Use for await...of instead.
    • +
    +
  • Returns the number of listeners listening for the event named eventName. +If listener is provided, it will return how many times the listener is found +in the list of the listeners of the event.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns number

    v3.2.0

    +
  • Map all documents using the provided function +If there is a transform set on the cursor, that will be called first and the result passed to +this function's transform.

    +

    Type Parameters

    • T

    Parameters

    • transform: ((doc: TSchema) => T)

      The mapping transformation method.

      +

    Returns AggregationCursor<T>

    Note Cursors use null internally to indicate that there are no more documents in the cursor. Providing a mapping +function that maps values to null will result in the cursor closing itself before it has finished iterating +all documents. This will not result in a memory leak, just surprising behavior. For example:

    +
    const cursor = collection.find({});
    cursor.map(() => null);

    const documents = await cursor.toArray();
    // documents is always [], regardless of how many documents are in the collection. +
    + +

    Other falsey values are allowed:

    +
    const cursor = collection.find({});
    cursor.map(() => '');

    const documents = await cursor.toArray();
    // documents is now an array of empty strings +
    + +

    Note for Typescript Users: adding a transform changes the return type of the iteration of this cursor, +it does not return a new instance of a cursor. This means when calling map, +you should always assign the result to a new variable in order to get a correctly typed cursor variable. +Take note of the following example:

    +
    const cursor: FindCursor<Document> = coll.find();
    const mappedCursor: FindCursor<number> = cursor.map(doc => Object.keys(doc).length);
    const keyCounts: number[] = await mappedCursor.toArray(); // cursor.toArray() still returns Document[] +
    + +
  • Set a maxTimeMS on the cursor query, allowing for hard timeout limits on queries (Only supported on MongoDB 2.6 or higher)

    +

    Parameters

    • value: number

      Number of milliseconds to wait before aborting the query.

      +

    Returns this

  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.1.101

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.3.0

    +
  • Add an out stage to the aggregation pipeline

    +

    Parameters

    • $out: string | {
          coll: string;
          db: string;
      }

    Returns this

  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Add a project stage to the aggregation pipeline

    +

    Type Parameters

    Parameters

    Returns AggregationCursor<T>

    In order to strictly type this function you must provide an interface +that represents the effect of your projection on the result documents.

    +

    By default chaining a projection to your cursor changes the returned type to the generic Document type. +You should specify a parameterized type to have assertions on your final results.

    +
    // Best way
    const docs: AggregationCursor<{ a: number }> = cursor.project<{ a: number }>({ _id: 0, a: true });
    // Flexible way
    const docs: AggregationCursor<Document> = cursor.project({ _id: 0, a: true }); +
    + +
    const cursor: AggregationCursor<{ a: number; b: string }> = coll.aggregate([]);
    const projectCursor = cursor.project<{ a: number }>({ _id: 0, a: true });
    const aPropOnlyArray: {a: number}[] = await projectCursor.toArray();

    // or always use chaining and save the final cursor

    const cursor = coll.aggregate().project<{ a: string }>({
    _id: 0,
    a: { $convert: { input: '$a', to: 'string' }
    }}); +
    + +
  • Returns a copy of the array of listeners for the event named eventName, +including any wrappers (such as those created by .once()).

    +
    import { EventEmitter } from 'node:events';
    const emitter = new EventEmitter();
    emitter.once('log', () => console.log('log once'));

    // Returns a new Array with a function `onceWrapper` which has a property
    // `listener` which contains the original listener bound above
    const listeners = emitter.rawListeners('log');
    const logFnWrapper = listeners[0];

    // Logs "log once" to the console and does not unbind the `once` event
    logFnWrapper.listener();

    // Logs "log once" to the console and removes the listener
    logFnWrapper();

    emitter.on('log', () => console.log('log persistently'));
    // Will return a new Array with a single function bound by `.on()` above
    const newListeners = emitter.rawListeners('log');

    // Logs "log persistently" twice
    newListeners[0]();
    emitter.emit('log'); +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns AbstractCursorEvents[EventKey][]

    v9.4.0

    +
  • Removes all listeners, or those of the specified eventName.

    +

    It is bad practice to remove listeners added elsewhere in the code, +particularly when the EventEmitter instance was created by some other +component or module (e.g. sockets or file streams).

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    • Optionalevent: string | symbol | EventKey

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Rewind this cursor to its uninitialized state. Any options that are present on the cursor will +remain in effect. Iterating this cursor will cause new queries to be sent to the server, even +if the resultant data has already been retrieved by this cursor.

    +

    Returns void

  • By default EventEmitters will print a warning if more than 10 listeners are +added for a particular event. This is a useful default that helps finding +memory leaks. The emitter.setMaxListeners() method allows the limit to be +modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • n: number

    Returns this

    v0.3.5

    +
  • Returns an array of documents. The caller is responsible for making sure that there +is enough memory to store the results. Note that the array only contains partial +results when this cursor had been previously accessed. In that case, +cursor.rewind() can be used to reset the cursor.

    +

    Returns Promise<TSchema[]>

  • Experimental

    Listens once to the abort event on the provided signal.

    +

    Listening to the abort event on abort signals is unsafe and may +lead to resource leaks since another third party with the signal can +call e.stopImmediatePropagation(). Unfortunately Node.js cannot change +this since it would violate the web standard. Additionally, the original +API makes it easy to forget to remove listeners.

    +

    This API allows safely using AbortSignals in Node.js APIs by solving these +two issues by listening to the event such that stopImmediatePropagation does +not prevent the listener from running.

    +

    Returns a disposable so that it may be unsubscribed from more easily.

    +
    import { addAbortListener } from 'node:events';

    function example(signal) {
    let disposable;
    try {
    signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
    disposable = addAbortListener(signal, (e) => {
    // Do something when signal is aborted.
    });
    } finally {
    disposable?.[Symbol.dispose]();
    }
    } +
    + +

    Parameters

    • signal: AbortSignal
    • resource: ((event: Event) => void)
        • (event): void
        • Parameters

          • event: Event

          Returns void

    Returns Disposable

    Disposable that removes the abort listener.

    +

    v20.5.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +

    For EventEmitters this behaves exactly the same as calling .listeners on +the emitter.

    +

    For EventTargets this is the only way to get the event listeners for the +event target. This is useful for debugging and diagnostic purposes.

    +
    import { getEventListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    const listener = () => console.log('Events are fun');
    ee.on('foo', listener);
    console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
    }
    {
    const et = new EventTarget();
    const listener = () => console.log('Events are fun');
    et.addEventListener('foo', listener);
    console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget
    • name: string | symbol

    Returns Function[]

    v15.2.0, v14.17.0

    +
  • Returns the currently set max amount of listeners.

    +

    For EventEmitters this behaves exactly the same as calling .getMaxListeners on +the emitter.

    +

    For EventTargets this is the only way to get the max event listeners for the +event target. If the number of event handlers on a single EventTarget exceeds +the max set, the EventTarget will print a warning.

    +
    import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    console.log(getMaxListeners(ee)); // 10
    setMaxListeners(11, ee);
    console.log(getMaxListeners(ee)); // 11
    }
    {
    const et = new EventTarget();
    console.log(getMaxListeners(et)); // 10
    setMaxListeners(11, et);
    console.log(getMaxListeners(et)); // 11
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget

    Returns number

    v19.9.0

    +
  • A class method that returns the number of listeners for the given eventName registered on the given emitter.

    +
    import { EventEmitter, listenerCount } from 'node:events';

    const myEmitter = new EventEmitter();
    myEmitter.on('event', () => {});
    myEmitter.on('event', () => {});
    console.log(listenerCount(myEmitter, 'event'));
    // Prints: 2 +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>

      The emitter to query

      +
    • eventName: string | symbol

      The event name

      +

    Returns number

    v0.9.12

    +

    Since v3.2.0 - Use listenerCount instead.

    +
  • import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo')) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here +
    + +

    Returns an AsyncIterator that iterates eventName events. It will throw +if the EventEmitter emits 'error'. It removes all listeners when +exiting the loop. The value returned by each iteration is an array +composed of the emitted event arguments.

    +

    An AbortSignal can be used to cancel waiting on events:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ac = new AbortController();

    (async () => {
    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo', { signal: ac.signal })) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here
    })();

    process.nextTick(() => ac.abort()); +
    + +

    Use the close option to specify an array of event names that will end the iteration:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    ee.emit('close');
    });

    for await (const event of on(ee, 'foo', { close: ['close'] })) {
    console.log(event); // prints ['bar'] [42]
    }
    // the loop will exit after 'close' is emitted
    console.log('done'); // prints 'done' +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

    An AsyncIterator that iterates eventName events emitted by the emitter

    +

    v13.6.0, v12.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

  • Creates a Promise that is fulfilled when the EventEmitter emits the given +event or that is rejected if the EventEmitter emits 'error' while waiting. +The Promise will resolve with an array of all the arguments emitted to the +given event.

    +

    This method is intentionally generic and works with the web platform EventTarget interface, which has no special'error' event +semantics and does not listen to the 'error' event.

    +
    import { once, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    process.nextTick(() => {
    ee.emit('myevent', 42);
    });

    const [value] = await once(ee, 'myevent');
    console.log(value);

    const err = new Error('kaboom');
    process.nextTick(() => {
    ee.emit('error', err);
    });

    try {
    await once(ee, 'myevent');
    } catch (err) {
    console.error('error happened', err);
    } +
    + +

    The special handling of the 'error' event is only used when events.once() is used to wait for another event. If events.once() is used to wait for the +'error' event itself, then it is treated as any other kind of event without +special handling:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();

    once(ee, 'error')
    .then(([err]) => console.log('ok', err.message))
    .catch((err) => console.error('error', err.message));

    ee.emit('error', new Error('boom'));

    // Prints: ok boom +
    + +

    An AbortSignal can be used to cancel waiting for the event:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();
    const ac = new AbortController();

    async function foo(emitter, event, signal) {
    try {
    await once(emitter, event, { signal });
    console.log('event emitted!');
    } catch (error) {
    if (error.name === 'AbortError') {
    console.error('Waiting for the event was canceled!');
    } else {
    console.error('There was an error', error.message);
    }
    }
    }

    foo(ee, 'foo', ac.signal);
    ac.abort(); // Abort waiting for the event
    ee.emit('foo'); // Prints: Waiting for the event was canceled! +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

    v11.13.0, v10.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

  • import { setMaxListeners, EventEmitter } from 'node:events';

    const target = new EventTarget();
    const emitter = new EventEmitter();

    setMaxListeners(5, target, emitter); +
    + +

    Parameters

    • Optionaln: number

      A non-negative number. The maximum number of listeners per EventTarget event.

      +
    • Rest...eventTargets: (EventEmitter<DefaultEventMap> | EventTarget)[]

    Returns void

    v15.4.0

    +
diff --git a/docs/6.9/classes/BSON.BSONError.html b/docs/6.9/classes/BSON.BSONError.html new file mode 100644 index 0000000000..a7fd8ce93f --- /dev/null +++ b/docs/6.9/classes/BSON.BSONError.html @@ -0,0 +1,17 @@ +BSONError | mongodb

Class BSONError

Hierarchy (view full)

Constructors

  • Parameters

    • message: string
    • Optionaloptions: {
          cause?: unknown;
      }
      • Optionalcause?: unknown

    Returns BSONError

Properties

cause?: unknown
message: string
stack?: string
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get name(): string
  • Returns string

Methods

  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

  • All errors thrown from the BSON library inherit from BSONError. +This method can assist with determining if an error originates from the BSON library +even if it does not pass an instanceof check against this class' constructor.

    +

    Parameters

    • value: unknown

      any javascript value that needs type checking

      +

    Returns value is BSONError

diff --git a/docs/6.9/classes/BSON.BSONOffsetError.html b/docs/6.9/classes/BSON.BSONOffsetError.html new file mode 100644 index 0000000000..a8cb266087 --- /dev/null +++ b/docs/6.9/classes/BSON.BSONOffsetError.html @@ -0,0 +1,18 @@ +BSONOffsetError | mongodb

Class BSONOffsetErrorExperimental

Hierarchy (view full)

Constructors

  • Experimental

    Parameters

    • message: string
    • offset: number
    • Optionaloptions: {
          cause?: unknown;
      }
      • Optionalcause?: unknown

    Returns BSONOffsetError

Properties

cause?: unknown
message: string
offset: number
stack?: string
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get name(): "BSONOffsetError"
  • Experimental

    Returns "BSONOffsetError"

Methods

  • Experimental

    Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

  • All errors thrown from the BSON library inherit from BSONError. +This method can assist with determining if an error originates from the BSON library +even if it does not pass an instanceof check against this class' constructor.

    +

    Parameters

    • value: unknown

      any javascript value that needs type checking

      +

    Returns value is BSONError

diff --git a/docs/6.9/classes/BSON.BSONRegExp.html b/docs/6.9/classes/BSON.BSONRegExp.html new file mode 100644 index 0000000000..36861009f4 --- /dev/null +++ b/docs/6.9/classes/BSON.BSONRegExp.html @@ -0,0 +1,12 @@ +BSONRegExp | mongodb

Class BSONRegExp

A class representation of the BSON RegExp type.

+

Hierarchy (view full)

Constructors

Properties

Accessors

Methods

Constructors

  • Parameters

    • pattern: string

      The regular expression pattern to match

      +
    • Optionaloptions: string

      The regular expression options

      +

    Returns BSONRegExp

Properties

options: string
pattern: string

Accessors

  • get _bsontype(): "BSONRegExp"
  • Returns "BSONRegExp"

Methods

  • Prints a human-readable string of BSON value information +If invoked manually without node.js.inspect function, this will default to a modified JSON.stringify

    +

    Parameters

    • Optionaldepth: number
    • Optionaloptions: unknown
    • Optionalinspect: InspectFn

    Returns string

  • Parameters

    • Optionaloptions: string

    Returns string

diff --git a/docs/6.9/classes/BSON.BSONRuntimeError.html b/docs/6.9/classes/BSON.BSONRuntimeError.html new file mode 100644 index 0000000000..e0bedf9016 --- /dev/null +++ b/docs/6.9/classes/BSON.BSONRuntimeError.html @@ -0,0 +1,17 @@ +BSONRuntimeError | mongodb

Class BSONRuntimeError

Hierarchy (view full)

Constructors

Properties

cause?: unknown
message: string
stack?: string
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get name(): "BSONRuntimeError"
  • Returns "BSONRuntimeError"

Methods

  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

  • All errors thrown from the BSON library inherit from BSONError. +This method can assist with determining if an error originates from the BSON library +even if it does not pass an instanceof check against this class' constructor.

    +

    Parameters

    • value: unknown

      any javascript value that needs type checking

      +

    Returns value is BSONError

diff --git a/docs/6.9/classes/BSON.BSONSymbol.html b/docs/6.9/classes/BSON.BSONSymbol.html new file mode 100644 index 0000000000..c5e6d3cfad --- /dev/null +++ b/docs/6.9/classes/BSON.BSONSymbol.html @@ -0,0 +1,14 @@ +BSONSymbol | mongodb

Class BSONSymbol

A class representation of the BSON Symbol type.

+

Hierarchy (view full)

Constructors

Properties

Accessors

Methods

Constructors

Properties

value: string

Accessors

  • get _bsontype(): "BSONSymbol"
  • Returns "BSONSymbol"

Methods

  • Prints a human-readable string of BSON value information +If invoked manually without node.js.inspect function, this will default to a modified JSON.stringify

    +

    Parameters

    • Optionaldepth: number
    • Optionaloptions: unknown
    • Optionalinspect: InspectFn

    Returns string

  • Returns string

  • Returns a string representation of an object.

    +

    Returns string

  • Access the wrapped string value.

    +

    Returns string

diff --git a/docs/6.9/classes/BSON.BSONValue.html b/docs/6.9/classes/BSON.BSONValue.html new file mode 100644 index 0000000000..f2603d0969 --- /dev/null +++ b/docs/6.9/classes/BSON.BSONValue.html @@ -0,0 +1,6 @@ +BSONValue | mongodb

Class BSONValueAbstract

Hierarchy (view full)

Constructors

Accessors

Methods

Constructors

Accessors

  • get _bsontype(): string
  • Returns string

Methods

  • Prints a human-readable string of BSON value information +If invoked manually without node.js.inspect function, this will default to a modified JSON.stringify

    +

    Parameters

    • Optionaldepth: number
    • Optionaloptions: unknown
    • Optionalinspect: InspectFn

    Returns string

diff --git a/docs/6.9/classes/BSON.BSONVersionError.html b/docs/6.9/classes/BSON.BSONVersionError.html new file mode 100644 index 0000000000..59a47ded6c --- /dev/null +++ b/docs/6.9/classes/BSON.BSONVersionError.html @@ -0,0 +1,17 @@ +BSONVersionError | mongodb

Class BSONVersionError

Hierarchy (view full)

Constructors

Properties

cause?: unknown
message: string
stack?: string
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get name(): "BSONVersionError"
  • Returns "BSONVersionError"

Methods

  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

  • All errors thrown from the BSON library inherit from BSONError. +This method can assist with determining if an error originates from the BSON library +even if it does not pass an instanceof check against this class' constructor.

    +

    Parameters

    • value: unknown

      any javascript value that needs type checking

      +

    Returns value is BSONError

diff --git a/docs/6.9/classes/BSON.Binary.html b/docs/6.9/classes/BSON.Binary.html new file mode 100644 index 0000000000..e07a1843d6 --- /dev/null +++ b/docs/6.9/classes/BSON.Binary.html @@ -0,0 +1,59 @@ +Binary | mongodb

Class Binary

A class representation of the BSON Binary type.

+

Hierarchy (view full)

Constructors

  • Create a new Binary instance.

    +

    Parameters

    • Optionalbuffer: BinarySequence

      a buffer object containing the binary data.

      +
    • OptionalsubType: number

      the option binary type.

      +

    Returns Binary

Properties

buffer: Uint8Array
position: number
sub_type: number
BUFFER_SIZE: 256 = 256

Initial buffer default size

+
SUBTYPE_BYTE_ARRAY: 2 = 2

Byte Array BSON type

+
SUBTYPE_COLUMN: 7 = 7

Column BSON type

+
SUBTYPE_DEFAULT: 0 = 0

Default BSON type

+
SUBTYPE_ENCRYPTED: 6 = 6

Encrypted BSON type

+
SUBTYPE_FUNCTION: 1 = 1

Function BSON type

+
SUBTYPE_MD5: 5 = 5

MD5 BSON type

+
SUBTYPE_SENSITIVE: 8 = 8

Sensitive BSON type

+
SUBTYPE_USER_DEFINED: 128 = 128

User BSON type

+
SUBTYPE_UUID: 4 = 4

UUID BSON type

+
SUBTYPE_UUID_OLD: 3 = 3

Deprecated UUID BSON type

+

Please use SUBTYPE_UUID

+

Accessors

  • get _bsontype(): "Binary"
  • Returns "Binary"

Methods

  • Prints a human-readable string of BSON value information +If invoked manually without node.js.inspect function, this will default to a modified JSON.stringify

    +

    Parameters

    • Optionaldepth: number
    • Optionaloptions: unknown
    • Optionalinspect: InspectFn

    Returns string

  • the length of the binary sequence

    +

    Returns number

  • Updates this binary with byte_value.

    +

    Parameters

    • byteValue:
          | string
          | number
          | Uint8Array
          | number[]

      a single byte we wish to write.

      +

    Returns void

  • Reads length bytes starting at position.

    +

    Parameters

    • position: number

      read from the given position in the Binary.

      +
    • length: number

      the number of bytes to read.

      +

    Returns BinarySequence

  • Returns string

  • Returns a string representation of an object.

    +

    Parameters

    • Optionalencoding:
          | "utf8"
          | "utf-8"
          | "base64"
          | "hex"

    Returns string

  • Returns UUID

  • returns a view of the binary value as a Uint8Array

    +

    Returns Uint8Array

  • Writes a buffer to the binary.

    +

    Parameters

    • sequence: BinarySequence

      a string or buffer to be written to the Binary BSON object.

      +
    • offset: number

      specify the binary of where to write the content.

      +

    Returns void

  • Creates an Binary instance from a base64 string

    +

    Parameters

    • base64: string
    • OptionalsubType: number

    Returns Binary

  • Creates an Binary instance from a hex digit string

    +

    Parameters

    • hex: string
    • OptionalsubType: number

    Returns Binary

diff --git a/docs/6.9/classes/BSON.Code.html b/docs/6.9/classes/BSON.Code.html new file mode 100644 index 0000000000..6eda7ce683 --- /dev/null +++ b/docs/6.9/classes/BSON.Code.html @@ -0,0 +1,12 @@ +Code | mongodb

Class Code

A class representation of the BSON Code type.

+

Hierarchy (view full)

Constructors

Properties

Accessors

Methods

Constructors

  • Parameters

    • code: string | Function

      a string or function.

      +
    • Optionalscope: null | Document

      an optional scope for the function.

      +

    Returns Code

Properties

code: string
scope: null | Document

Accessors

  • get _bsontype(): "Code"
  • Returns "Code"

Methods

  • Prints a human-readable string of BSON value information +If invoked manually without node.js.inspect function, this will default to a modified JSON.stringify

    +

    Parameters

    • Optionaldepth: number
    • Optionaloptions: unknown
    • Optionalinspect: InspectFn

    Returns string

  • Returns {
        code: string;
        scope?: Document;
    }

diff --git a/docs/6.9/classes/BSON.DBRef.html b/docs/6.9/classes/BSON.DBRef.html new file mode 100644 index 0000000000..fc5a372d05 --- /dev/null +++ b/docs/6.9/classes/BSON.DBRef.html @@ -0,0 +1,15 @@ +DBRef | mongodb

Class DBRef

A class representation of the BSON DBRef type.

+

Hierarchy (view full)

Constructors

Properties

Accessors

Methods

Constructors

  • Parameters

    • collection: string

      the collection name.

      +
    • oid: ObjectId

      the reference ObjectId.

      +
    • Optionaldb: string

      optional db name, if omitted the reference is local to the current db.

      +
    • Optionalfields: Document

    Returns DBRef

Properties

collection: string
db?: string
fields: Document

Accessors

  • get _bsontype(): "DBRef"
  • Returns "DBRef"

Methods

  • Prints a human-readable string of BSON value information +If invoked manually without node.js.inspect function, this will default to a modified JSON.stringify

    +

    Parameters

    • Optionaldepth: number
    • Optionaloptions: unknown
    • Optionalinspect: InspectFn

    Returns string

diff --git a/docs/6.9/classes/BSON.Decimal128.html b/docs/6.9/classes/BSON.Decimal128.html new file mode 100644 index 0000000000..3b84395096 --- /dev/null +++ b/docs/6.9/classes/BSON.Decimal128.html @@ -0,0 +1,23 @@ +Decimal128 | mongodb

Class Decimal128

A class representation of the BSON Decimal128 type.

+

Hierarchy (view full)

Constructors

Properties

Accessors

Methods

Constructors

  • Parameters

    • bytes: string | Uint8Array

      a buffer containing the raw Decimal128 bytes in little endian order, +or a string representation as returned by .toString()

      +

    Returns Decimal128

Properties

bytes: Uint8Array

Accessors

  • get _bsontype(): "Decimal128"
  • Returns "Decimal128"

Methods

  • Prints a human-readable string of BSON value information +If invoked manually without node.js.inspect function, this will default to a modified JSON.stringify

    +

    Parameters

    • Optionaldepth: number
    • Optionaloptions: unknown
    • Optionalinspect: InspectFn

    Returns string

  • Create a string representation of the raw Decimal128 value

    +

    Returns string

  • Create a Decimal128 instance from a string representation

    +

    Parameters

    • representation: string

      a numeric string representation.

      +

    Returns Decimal128

  • Create a Decimal128 instance from a string representation, allowing for rounding to 34 +significant digits

    +

    Parameters

    • representation: string

      a numeric string representation.

      +

    Returns Decimal128

    > let d = Decimal128.fromString('37.499999999999999196428571428571375')
    Uncaught:
    BSONError: "37.499999999999999196428571428571375" is not a valid Decimal128 string - inexact rounding
    at invalidErr (/home/wajames/js-bson/lib/bson.cjs:1402:11)
    at Decimal128.fromStringInternal (/home/wajames/js-bson/lib/bson.cjs:1633:25)
    at Decimal128.fromString (/home/wajames/js-bson/lib/bson.cjs:1424:27)

    > d = Decimal128.fromStringWithRounding('37.499999999999999196428571428571375')
    new Decimal128("37.49999999999999919642857142857138") +
    + +
diff --git a/docs/6.9/classes/BSON.Double.html b/docs/6.9/classes/BSON.Double.html new file mode 100644 index 0000000000..c1178df3af --- /dev/null +++ b/docs/6.9/classes/BSON.Double.html @@ -0,0 +1,27 @@ +Double | mongodb

Class Double

A class representation of the BSON Double type.

+

Hierarchy (view full)

Constructors

Properties

Accessors

Methods

Constructors

  • Create a Double type

    +

    Parameters

    • value: number

      the number we want to represent as a double.

      +

    Returns Double

Properties

value: number

Accessors

  • get _bsontype(): "Double"
  • Returns "Double"

Methods

  • Prints a human-readable string of BSON value information +If invoked manually without node.js.inspect function, this will default to a modified JSON.stringify

    +

    Parameters

    • Optionaldepth: number
    • Optionaloptions: unknown
    • Optionalinspect: InspectFn

    Returns string

  • Returns number

  • Returns a string representation of an object.

    +

    Parameters

    • Optionalradix: number

    Returns string

  • Access the number value.

    +

    Returns number

    returns the wrapped double number.

    +
  • Attempt to create an double type from string.

    +

    This method will throw a BSONError on any string input that is not representable as a IEEE-754 64-bit double. +Notably, this method will also throw on the following string formats:

    +
      +
    • Strings in non-decimal and non-exponential formats (binary, hex, or octal digits)
    • +
    • Strings with characters other than numeric, floating point, or leading sign characters (Note: 'Infinity', '-Infinity', and 'NaN' input strings are still allowed)
    • +
    • Strings with leading and/or trailing whitespace
    • +
    +

    Strings with leading zeros, however, are also allowed

    +

    Parameters

    • value: string

      the string we want to represent as a double.

      +

    Returns Double

diff --git a/docs/6.9/classes/BSON.Int32.html b/docs/6.9/classes/BSON.Int32.html new file mode 100644 index 0000000000..ae843a50fb --- /dev/null +++ b/docs/6.9/classes/BSON.Int32.html @@ -0,0 +1,27 @@ +Int32 | mongodb

Class Int32

A class representation of a BSON Int32 type.

+

Hierarchy (view full)

Constructors

Properties

Accessors

Methods

Constructors

  • Create an Int32 type

    +

    Parameters

    • value: string | number

      the number we want to represent as an int32.

      +

    Returns Int32

Properties

value: number

Accessors

  • get _bsontype(): "Int32"
  • Returns "Int32"

Methods

  • Prints a human-readable string of BSON value information +If invoked manually without node.js.inspect function, this will default to a modified JSON.stringify

    +

    Parameters

    • Optionaldepth: number
    • Optionaloptions: unknown
    • Optionalinspect: InspectFn

    Returns string

  • Returns number

  • Returns a string representation of an object.

    +

    Parameters

    • Optionalradix: number

    Returns string

  • Access the number value.

    +

    Returns number

    returns the wrapped int32 number.

    +
  • Attempt to create an Int32 type from string.

    +

    This method will throw a BSONError on any string input that is not representable as an Int32. +Notably, this method will also throw on the following string formats:

    +
      +
    • Strings in non-decimal formats (exponent notation, binary, hex, or octal digits)
    • +
    • Strings non-numeric and non-leading sign characters (ex: '2.0', '24,000')
    • +
    • Strings with leading and/or trailing whitespace
    • +
    +

    Strings with leading zeros, however, are allowed.

    +

    Parameters

    • value: string

      the string we want to represent as an int32.

      +

    Returns Int32

diff --git a/docs/6.9/classes/BSON.Long.html b/docs/6.9/classes/BSON.Long.html new file mode 100644 index 0000000000..8191c0909a --- /dev/null +++ b/docs/6.9/classes/BSON.Long.html @@ -0,0 +1,337 @@ +Long | mongodb

Class Long

A class representing a 64-bit integer

+

The internal representation of a long is the two given signed, 32-bit values. +We use 32-bit pieces because these are the size of integers on which +Javascript performs bit-operations. For operations like addition and +multiplication, we split each number into 16 bit pieces, which can easily be +multiplied within Javascript's floating-point representation without overflow +or change in sign. +In the algorithms below, we frequently reduce the negative case to the +positive case by negating the input(s) and then post-processing the result. +Note that we must ALWAYS check specially whether those values are MIN_VALUE +(-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as +a positive number, it overflows back into a negative). Not handling this +case would often result in infinite recursion. +Common constant values ZERO, ONE, NEG_ONE, etc. are found as static properties on this class.

+

Hierarchy (view full)

Constructors

  • Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as signed integers.

    +

    Parameters

    • low: number

      The low (signed) 32 bits of the long

      +
    • Optionalhigh: number

      The high (signed) 32 bits of the long

      +
    • Optionalunsigned: boolean

      Whether unsigned or not, defaults to signed

      +

    Returns Long

  • Constructs a 64 bit two's-complement integer, given a bigint representation.

    +

    Parameters

    • value: bigint

      BigInt representation of the long value

      +
    • Optionalunsigned: boolean

      Whether unsigned or not, defaults to signed

      +

    Returns Long

  • Constructs a 64 bit two's-complement integer, given a string representation.

    +

    Parameters

    • value: string

      String representation of the long value

      +
    • Optionalunsigned: boolean

      Whether unsigned or not, defaults to signed

      +

    Returns Long

Properties

high: number

The high 32 bits as a signed value.

+
low: number

The low 32 bits as a signed value.

+
unsigned: boolean

Whether unsigned or not.

+
MAX_UNSIGNED_VALUE: Long

Maximum unsigned value.

+
MAX_VALUE: Long

Maximum signed value.

+
MIN_VALUE: Long

Minimum signed value.

+
NEG_ONE: Long

Signed negative one.

+
ONE: Long

Signed one.

+
TWO_PWR_24: Long
UONE: Long

Unsigned one.

+
UZERO: Long

Unsigned zero.

+
ZERO: Long

Signed zero

+

Accessors

  • get __isLong__(): boolean
  • An indicator used to reliably determine if an object is a Long or not.

    +

    Returns boolean

  • get _bsontype(): "Long"
  • Returns "Long"

Methods

  • Returns the sum of this and the specified Long.

    +

    Parameters

    • addend:
          | string
          | number
          | Timestamp
          | Long

    Returns Long

  • Returns the sum of this and the specified Long.

    +

    Parameters

    • other:
          | string
          | number
          | Timestamp
          | Long

    Returns Long

    Sum

    +
  • This is an alias of Long.compare

    +

    Parameters

    • other:
          | string
          | number
          | Timestamp
          | Long

    Returns -1 | 0 | 1

  • Compares this Long's value with the specified's.

    +

    Parameters

    • other:
          | string
          | number
          | Timestamp
          | Long

    Returns -1 | 0 | 1

    0 if they are the same, 1 if the this is greater and -1 if the given one is greater

    +
  • This is an alias of Long.divide

    +

    Parameters

    • divisor:
          | string
          | number
          | Timestamp
          | Long

    Returns Long

  • Returns this Long divided by the specified. The result is signed if this Long is signed or unsigned if this Long is unsigned.

    +

    Parameters

    • divisor:
          | string
          | number
          | Timestamp
          | Long

    Returns Long

    Quotient

    +
  • This is an alias of Long.equals

    +

    Parameters

    • other:
          | string
          | number
          | Timestamp
          | Long

    Returns boolean

  • Tests if this Long's value equals the specified's.

    +

    Parameters

    • other:
          | string
          | number
          | Timestamp
          | Long

      Other value

      +

    Returns boolean

  • This is an alias of Long.isZero

    +

    Returns boolean

  • This is an alias of Long.greaterThanOrEqual

    +

    Parameters

    • other:
          | string
          | number
          | Timestamp
          | Long

    Returns boolean

  • Gets the high 32 bits as a signed integer.

    +

    Returns number

  • Gets the high 32 bits as an unsigned integer.

    +

    Returns number

  • Gets the low 32 bits as a signed integer.

    +

    Returns number

  • Gets the low 32 bits as an unsigned integer.

    +

    Returns number

  • Gets the number of bits needed to represent the absolute value of this Long.

    +

    Returns number

  • Tests if this Long's value is greater than the specified's.

    +

    Parameters

    • other:
          | string
          | number
          | Timestamp
          | Long

    Returns boolean

  • Tests if this Long's value is greater than or equal the specified's.

    +

    Parameters

    • other:
          | string
          | number
          | Timestamp
          | Long

    Returns boolean

  • This is an alias of Long.greaterThan

    +

    Parameters

    • other:
          | string
          | number
          | Timestamp
          | Long

    Returns boolean

  • This is an alias of Long.greaterThanOrEqual

    +

    Parameters

    • other:
          | string
          | number
          | Timestamp
          | Long

    Returns boolean

  • Prints a human-readable string of BSON value information +If invoked manually without node.js.inspect function, this will default to a modified JSON.stringify

    +

    Parameters

    • Optionaldepth: number
    • Optionaloptions: unknown
    • Optionalinspect: InspectFn

    Returns string

  • Tests if this Long's value is even.

    +

    Returns boolean

  • Tests if this Long's value is negative.

    +

    Returns boolean

  • Tests if this Long's value is odd.

    +

    Returns boolean

  • Tests if this Long's value is positive.

    +

    Returns boolean

  • Tests if this Long's value equals zero.

    +

    Returns boolean

  • This is an alias of Long.lessThanOrEqual

    +

    Parameters

    • other:
          | string
          | number
          | Timestamp
          | Long

    Returns boolean

  • Tests if this Long's value is less than the specified's.

    +

    Parameters

    • other:
          | string
          | number
          | Timestamp
          | Long

    Returns boolean

  • Tests if this Long's value is less than or equal the specified's.

    +

    Parameters

    • other:
          | string
          | number
          | Timestamp
          | Long

    Returns boolean

  • This is an alias of Long#lessThan.

    +

    Parameters

    • other:
          | string
          | number
          | Timestamp
          | Long

    Returns boolean

  • This is an alias of Long.lessThanOrEqual

    +

    Parameters

    • other:
          | string
          | number
          | Timestamp
          | Long

    Returns boolean

  • This is an alias of Long.modulo

    +

    Parameters

    • divisor:
          | string
          | number
          | Timestamp
          | Long

    Returns Long

  • Returns this Long modulo the specified.

    +

    Parameters

    • divisor:
          | string
          | number
          | Timestamp
          | Long

    Returns Long

  • This is an alias of Long.multiply

    +

    Parameters

    • multiplier:
          | string
          | number
          | Timestamp
          | Long

    Returns Long

  • Returns the product of this and the specified Long.

    +

    Parameters

    • multiplier:
          | string
          | number
          | Timestamp
          | Long

      Multiplier

      +

    Returns Long

    Product

    +
  • This is an alias of Long.notEquals

    +

    Parameters

    • other:
          | string
          | number
          | Timestamp
          | Long

    Returns boolean

  • This is an alias of Long.negate

    +

    Returns Long

  • Returns the Negation of this Long's value.

    +

    Returns Long

  • This is an alias of Long.notEquals

    +

    Parameters

    • other:
          | string
          | number
          | Timestamp
          | Long

    Returns boolean

  • Returns the bitwise NOT of this Long.

    +

    Returns Long

  • Tests if this Long's value differs from the specified's.

    +

    Parameters

    • other:
          | string
          | number
          | Timestamp
          | Long

    Returns boolean

  • Returns the bitwise OR of this Long and the specified.

    +

    Parameters

    • other: string | number | Long

    Returns Long

  • This is an alias of Long.modulo

    +

    Parameters

    • divisor:
          | string
          | number
          | Timestamp
          | Long

    Returns Long

  • Returns this Long with bits shifted to the left by the given amount.

    +

    Parameters

    • numBits: number | Long

      Number of bits

      +

    Returns Long

    Shifted Long

    +
  • Returns this Long with bits arithmetically shifted to the right by the given amount.

    +

    Parameters

    • numBits: number | Long

      Number of bits

      +

    Returns Long

    Shifted Long

    +
  • Returns this Long with bits logically shifted to the right by the given amount.

    +

    Parameters

    • numBits: number | Long

      Number of bits

      +

    Returns Long

    Shifted Long

    +
  • This is an alias of Long.shiftLeft

    +

    Parameters

    • numBits: number | Long

    Returns Long

  • This is an alias of Long.shiftRight

    +

    Parameters

    • numBits: number | Long

    Returns Long

  • This is an alias of Long.subtract

    +

    Parameters

    • subtrahend:
          | string
          | number
          | Timestamp
          | Long

    Returns Long

  • Returns the difference of this and the specified Long.

    +

    Parameters

    • subtrahend:
          | string
          | number
          | Timestamp
          | Long

      Subtrahend

      +

    Returns Long

    Difference

    +
  • Converts the Long to a BigInt (arbitrary precision).

    +

    Returns bigint

  • Converts this Long to its byte representation.

    +

    Parameters

    • Optionalle: boolean

      Whether little or big endian, defaults to big endian

      +

    Returns number[]

    Byte representation

    +
  • Converts this Long to its big endian byte representation.

    +

    Returns number[]

    Big endian byte representation

    +
  • Converts this Long to its little endian byte representation.

    +

    Returns number[]

    Little endian byte representation

    +
  • Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.

    +

    Returns number

  • Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).

    +

    Returns number

  • Converts this Long to signed.

    +

    Returns Long

  • Converts the Long to a string written in the specified radix.

    +

    Parameters

    • Optionalradix: number

      Radix (2-36), defaults to 10

      +

    Returns string

    RangeError If radix is out of range

    +
  • Converts this Long to unsigned.

    +

    Returns Long

  • Returns the bitwise XOR of this Long and the given one.

    +

    Parameters

    • other: string | number | Long

    Returns Long

  • Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.

    +

    Parameters

    • value: bigint

      The number in question

      +
    • Optionalunsigned: boolean

      Whether unsigned or not, defaults to signed

      +

    Returns Long

    The corresponding Long value

    +
  • Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. +Each is assumed to use 32 bits.

    +

    Parameters

    • lowBits: number

      The low 32 bits

      +
    • highBits: number

      The high 32 bits

      +
    • Optionalunsigned: boolean

      Whether unsigned or not, defaults to signed

      +

    Returns Long

    The corresponding Long value

    +
  • Creates a Long from its byte representation.

    +

    Parameters

    • bytes: number[]

      Byte representation

      +
    • Optionalunsigned: boolean

      Whether unsigned or not, defaults to signed

      +
    • Optionalle: boolean

      Whether little or big endian, defaults to big endian

      +

    Returns Long

    The corresponding Long value

    +
  • Creates a Long from its big endian byte representation.

    +

    Parameters

    • bytes: number[]

      Big endian byte representation

      +
    • Optionalunsigned: boolean

      Whether unsigned or not, defaults to signed

      +

    Returns Long

    The corresponding Long value

    +
  • Creates a Long from its little endian byte representation.

    +

    Parameters

    • bytes: number[]

      Little endian byte representation

      +
    • Optionalunsigned: boolean

      Whether unsigned or not, defaults to signed

      +

    Returns Long

    The corresponding Long value

    +
  • Parameters

    • doc: {
          $numberLong: string;
      }
      • $numberLong: string
    • Optionaloptions: EJSONOptions

    Returns number | bigint | Long

  • Returns a Long representing the given 32 bit integer value.

    +

    Parameters

    • value: number

      The 32 bit integer in question

      +
    • Optionalunsigned: boolean

      Whether unsigned or not, defaults to signed

      +

    Returns Long

    The corresponding Long value

    +
  • Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.

    +

    Parameters

    • value: number

      The number in question

      +
    • Optionalunsigned: boolean

      Whether unsigned or not, defaults to signed

      +

    Returns Long

    The corresponding Long value

    +
  • Returns a signed Long representation of the given string, written using radix 10.

    +

    If the input string is empty, this function will throw a BSONError.

    +

    If input string does not have valid signed 64-bit Long representation, this method will return a coerced value:

    +
      +
    • inputs that overflow 64-bit signed long will be coerced to Long.MAX_VALUE and Long.MIN_VALUE respectively
    • +
    • 'NaN' or '+/-Infinity' are coerced to Long.ZERO
    • +
    • other invalid characters sequences have variable behavior
    • +
    +

    Parameters

    • str: string

      The textual representation of the Long

      +

    Returns Long

    The corresponding Long value

    +
  • Returns a signed Long representation of the given string, written using the provided radix.

    +

    If the input string is empty or a provided radix is not within (2-36), this function will throw a BSONError.

    +

    If input parameters do not have valid signed 64-bit Long representation, this method will return a coerced value:

    +
      +
    • inputs that overflow 64-bit signed long will be coerced to Long.MAX_VALUE and Long.MIN_VALUE respectively
    • +
    • if the radix is less than 24, 'NaN' is coerced to Long.ZERO
    • +
    • if the radix is less than 35, '+/-Infinity' inputs are coerced to Long.ZERO
    • +
    • other invalid characters sequences have variable behavior
    • +
    +

    Parameters

    • str: string

      The textual representation of the Long

      +
    • Optionalradix: number

      The radix in which the text is written (2-36), defaults to 10

      +

    Returns Long

    The corresponding Long value

    +
  • Returns a Long representation of the given string, written using radix 10.

    +

    If the input string is empty, this function will throw a BSONError.

    +

    If input parameters do not have a valid 64-bit Long representation, this method will return a coerced value:

    +
      +
    • inputs that overflow 64-bit long will be coerced to max or min (if signed) values
    • +
    • if the radix is less than 24, 'NaN' is coerced to Long.ZERO
    • +
    • if the radix is less than 35, '+/-Infinity' inputs are coerced to Long.ZERO
    • +
    • other invalid characters sequences have variable behavior
    • +
    +

    Parameters

    • str: string

      The textual representation of the Long

      +
    • Optionalunsigned: boolean

      Whether unsigned or not, defaults to signed

      +

    Returns Long

    The corresponding Long value

    +
  • Returns a Long representation of the given string, written using the specified radix.

    +

    If the input string is empty or a provided radix is not within (2-36), this function will throw a BSONError.

    +

    If input parameters do not have a valid 64-bit Long representation, this method will return a coerced value:

    +
      +
    • inputs that overflow 64-bit long will be coerced to max or min (if signed) values
    • +
    • if the radix is less than 24, 'NaN' is coerced to Long.ZERO
    • +
    • if the radix is less than 35, '+/-Infinity' inputs are coerced to Long.ZERO
    • +
    • other invalid characters sequences have variable behavior
    • +
    +

    Parameters

    • str: string

      The textual representation of the Long

      +
    • Optionalunsigned: boolean

      Whether unsigned or not, defaults to signed

      +
    • Optionalradix: number

      The radix in which the text is written (2-36), defaults to 10

      +

    Returns Long

    The corresponding Long value

    +
  • Returns a signed Long representation of the given string, written using radix 10. +Will throw an error if the given text is not exactly representable as a Long. +Throws an error if any of the following conditions are true:

    +
      +
    • the string contains invalid characters for the radix 10
    • +
    • the string contains whitespace
    • +
    • the value the string represents is too large or too small to be a Long +Unlike Long.fromString, this method does not coerce '+/-Infinity' and 'NaN' to Long.Zero
    • +
    +

    Parameters

    • str: string

      The textual representation of the Long

      +

    Returns Long

    The corresponding Long value

    +
  • Returns a Long representation of the given string, written using the radix 10. +Will throw an error if the given parameters are not exactly representable as a Long. +Throws an error if any of the following conditions are true:

    +
      +
    • the string contains invalid characters for the given radix
    • +
    • the string contains whitespace
    • +
    • the value the string represents is too large or too small to be a Long +Unlike Long.fromString, this method does not coerce '+/-Infinity' and 'NaN' to Long.Zero
    • +
    +

    Parameters

    • str: string

      The textual representation of the Long

      +
    • Optionalunsigned: boolean

      Whether unsigned or not, defaults to signed

      +

    Returns Long

    The corresponding Long value

    +
  • Returns a signed Long representation of the given string, written using the specified radix. +Will throw an error if the given parameters are not exactly representable as a Long. +Throws an error if any of the following conditions are true:

    +
      +
    • the string contains invalid characters for the given radix
    • +
    • the string contains whitespace
    • +
    • the value the string represents is too large or too small to be a Long +Unlike Long.fromString, this method does not coerce '+/-Infinity' and 'NaN' to Long.Zero
    • +
    +

    Parameters

    • str: string

      The textual representation of the Long

      +
    • Optionalradix: boolean

      The radix in which the text is written (2-36), defaults to 10

      +

    Returns Long

    The corresponding Long value

    +
  • Returns a Long representation of the given string, written using the specified radix. +Will throw an error if the given parameters are not exactly representable as a Long. +Throws an error if any of the following conditions are true:

    +
      +
    • the string contains invalid characters for the given radix
    • +
    • the string contains whitespace
    • +
    • the value the string represents is too large or too small to be a Long +Unlike Long.fromString, this method does not coerce '+/-Infinity' and 'NaN' to Long.Zero
    • +
    +

    Parameters

    • str: string

      The textual representation of the Long

      +
    • Optionalunsigned: boolean

      Whether unsigned or not, defaults to signed

      +
    • Optionalradix: number

      The radix in which the text is written (2-36), defaults to 10

      +

    Returns Long

    The corresponding Long value

    +
  • Converts the specified value to a Long.

    +

    Parameters

    • val: string | number | {
          high: number;
          low: number;
          unsigned?: boolean;
      }
    • Optionalunsigned: boolean

      Whether unsigned or not, defaults to signed

      +

    Returns Long

  • Tests if the specified object is a Long.

    +

    Parameters

    • value: unknown

    Returns value is Long

diff --git a/docs/6.9/classes/BSON.MaxKey.html b/docs/6.9/classes/BSON.MaxKey.html new file mode 100644 index 0000000000..c24465a32c --- /dev/null +++ b/docs/6.9/classes/BSON.MaxKey.html @@ -0,0 +1,7 @@ +MaxKey | mongodb

Class MaxKey

A class representation of the BSON MaxKey type.

+

Hierarchy (view full)

Constructors

Accessors

Methods

Constructors

Accessors

  • get _bsontype(): "MaxKey"
  • Returns "MaxKey"

Methods

  • Prints a human-readable string of BSON value information +If invoked manually without node.js.inspect function, this will default to a modified JSON.stringify

    +

    Returns string

diff --git a/docs/6.9/classes/BSON.MinKey.html b/docs/6.9/classes/BSON.MinKey.html new file mode 100644 index 0000000000..096a882a93 --- /dev/null +++ b/docs/6.9/classes/BSON.MinKey.html @@ -0,0 +1,7 @@ +MinKey | mongodb

Class MinKey

A class representation of the BSON MinKey type.

+

Hierarchy (view full)

Constructors

Accessors

Methods

Constructors

Accessors

  • get _bsontype(): "MinKey"
  • Returns "MinKey"

Methods

  • Prints a human-readable string of BSON value information +If invoked manually without node.js.inspect function, this will default to a modified JSON.stringify

    +

    Returns string

diff --git a/docs/6.9/classes/BSON.ObjectId.html b/docs/6.9/classes/BSON.ObjectId.html new file mode 100644 index 0000000000..9d3687c5e6 --- /dev/null +++ b/docs/6.9/classes/BSON.ObjectId.html @@ -0,0 +1,50 @@ +ObjectId | mongodb

Class ObjectId

A class representation of the BSON ObjectId type.

+

Hierarchy (view full)

Constructors

  • Create ObjectId from a number.

    +

    Parameters

    • inputId: number

      A number.

      +

    Returns ObjectId

    Instead, use static createFromTime() to set a numeric value for the new ObjectId.

    +
  • Create ObjectId from a 24 character hex string.

    +

    Parameters

    • inputId: string

      A 24 character hex string.

      +

    Returns ObjectId

  • Create ObjectId from the BSON ObjectId type.

    +

    Parameters

    • inputId: ObjectId

      The BSON ObjectId type.

      +

    Returns ObjectId

  • Create ObjectId from the object type that has the toHexString method.

    +

    Parameters

    Returns ObjectId

  • Create ObjectId from a 12 byte binary Buffer.

    +

    Parameters

    • inputId: Uint8Array

      A 12 byte binary Buffer.

      +

    Returns ObjectId

  • To generate a new ObjectId, use ObjectId() with no argument.

    +

    Returns ObjectId

  • Implementation overload.

    +

    Parameters

    • OptionalinputId:
          | string
          | number
          | Uint8Array
          | ObjectId
          | ObjectIdLike

      All input types that are used in the constructor implementation.

      +

    Returns ObjectId

Properties

cacheHexString: boolean

Accessors

  • get _bsontype(): "ObjectId"
  • Returns "ObjectId"

  • get id(): Uint8Array
  • The ObjectId bytes

    +

    Returns Uint8Array

Methods

  • Compares the equality of this ObjectId with otherID.

    +

    Parameters

    • otherId:
          | undefined
          | null
          | string
          | ObjectId
          | ObjectIdLike

      ObjectId instance to compare against.

      +

    Returns boolean

  • Returns the generation date (accurate up to the second) that this ID was generated.

    +

    Returns Date

  • Converts to a string representation of this Id.

    +

    Parameters

    • Optionaldepth: number
    • Optionaloptions: unknown
    • Optionalinspect: InspectFn

    Returns string

    return the 24 character hex string representation.

    +
  • Returns the ObjectId id as a 24 lowercase character hex string representation

    +

    Returns string

  • Converts to its JSON the 24 character hex string representation.

    +

    Returns string

  • Converts the id into a 24 character hex string for printing, unless encoding is provided.

    +

    Parameters

    • Optionalencoding: "base64" | "hex"

      hex or base64

      +

    Returns string

  • Creates an ObjectId instance from a base64 string

    +

    Parameters

    • base64: string

    Returns ObjectId

  • Creates an ObjectId from a hex string representation of an ObjectId.

    +

    Parameters

    • hexString: string

      create a ObjectId from a passed in 24 character hexstring.

      +

    Returns ObjectId

  • Creates an ObjectId from a second based number, with the rest of the ObjectId zeroed out. Used for comparisons or sorting the ObjectId.

    +

    Parameters

    • time: number

      an integer number representing a number of seconds.

      +

    Returns ObjectId

  • Generate a 12 byte id buffer used in ObjectId's

    +

    Parameters

    • Optionaltime: number

      pass in a second based timestamp.

      +

    Returns Uint8Array

  • Checks if a value can be used to create a valid bson ObjectId

    +

    Parameters

    • id:
          | string
          | number
          | Uint8Array
          | ObjectId
          | ObjectIdLike

      any JS value

      +

    Returns boolean

diff --git a/docs/6.9/classes/BSON.Timestamp.html b/docs/6.9/classes/BSON.Timestamp.html new file mode 100644 index 0000000000..e58a5c56a8 --- /dev/null +++ b/docs/6.9/classes/BSON.Timestamp.html @@ -0,0 +1,165 @@ +Timestamp | mongodb

Class Timestamp

Hierarchy (view full)

Constructors

  • Parameters

    • int: bigint

      A 64-bit bigint representing the Timestamp.

      +

    Returns Timestamp

  • Parameters

    • long: Long

      A 64-bit Long representing the Timestamp.

      +

    Returns Timestamp

  • Parameters

    • value: {
          i: number;
          t: number;
      }

      A pair of two values indicating timestamp and increment.

      +
      • i: number
      • t: number

    Returns Timestamp

Properties

__isLong__: boolean
add: ((addend:
    | string
    | number
    | Timestamp
    | Long) => Long)

Type declaration

    • (addend): Long
    • Returns the sum of this and the specified Long.

      +

      Parameters

      • addend:
            | string
            | number
            | Timestamp
            | Long

      Returns Long

and: ((other:
    | string
    | number
    | Timestamp
    | Long) => Long)

Type declaration

    • (other): Long
    • Returns the sum of this and the specified Long.

      +

      Parameters

      • other:
            | string
            | number
            | Timestamp
            | Long

      Returns Long

      Sum

      +
comp: ((other:
    | string
    | number
    | Timestamp
    | Long) => -1 | 0 | 1)

Type declaration

    • (other): -1 | 0 | 1
    • This is an alias of Long.compare

      +

      Parameters

      • other:
            | string
            | number
            | Timestamp
            | Long

      Returns -1 | 0 | 1

compare: ((other:
    | string
    | number
    | Timestamp
    | Long) => -1 | 0 | 1)

Type declaration

    • (other): -1 | 0 | 1
    • Compares this Long's value with the specified's.

      +

      Parameters

      • other:
            | string
            | number
            | Timestamp
            | Long

      Returns -1 | 0 | 1

      0 if they are the same, 1 if the this is greater and -1 if the given one is greater

      +
div: ((divisor:
    | string
    | number
    | Timestamp
    | Long) => Long)

Type declaration

divide: ((divisor:
    | string
    | number
    | Timestamp
    | Long) => Long)

Type declaration

    • (divisor): Long
    • Returns this Long divided by the specified. The result is signed if this Long is signed or unsigned if this Long is unsigned.

      +

      Parameters

      • divisor:
            | string
            | number
            | Timestamp
            | Long

      Returns Long

      Quotient

      +
eq: ((other:
    | string
    | number
    | Timestamp
    | Long) => boolean)

Type declaration

    • (other): boolean
    • This is an alias of Long.equals

      +

      Parameters

      • other:
            | string
            | number
            | Timestamp
            | Long

      Returns boolean

equals: ((other:
    | string
    | number
    | Timestamp
    | Long) => boolean)

Type declaration

    • (other): boolean
    • Tests if this Long's value equals the specified's.

      +

      Parameters

      • other:
            | string
            | number
            | Timestamp
            | Long

        Other value

        +

      Returns boolean

eqz: (() => boolean)

Type declaration

    • (): boolean
    • This is an alias of Long.isZero

      +

      Returns boolean

ge: ((other:
    | string
    | number
    | Timestamp
    | Long) => boolean)

Type declaration

getHighBits: (() => number)

Type declaration

    • (): number
    • Gets the high 32 bits as a signed integer.

      +

      Returns number

getHighBitsUnsigned: (() => number)

Type declaration

    • (): number
    • Gets the high 32 bits as an unsigned integer.

      +

      Returns number

getLowBits: (() => number)

Type declaration

    • (): number
    • Gets the low 32 bits as a signed integer.

      +

      Returns number

getLowBitsUnsigned: (() => number)

Type declaration

    • (): number
    • Gets the low 32 bits as an unsigned integer.

      +

      Returns number

getNumBitsAbs: (() => number)

Type declaration

    • (): number
    • Gets the number of bits needed to represent the absolute value of this Long.

      +

      Returns number

greaterThan: ((other:
    | string
    | number
    | Timestamp
    | Long) => boolean)

Type declaration

    • (other): boolean
    • Tests if this Long's value is greater than the specified's.

      +

      Parameters

      • other:
            | string
            | number
            | Timestamp
            | Long

      Returns boolean

greaterThanOrEqual: ((other:
    | string
    | number
    | Timestamp
    | Long) => boolean)

Type declaration

    • (other): boolean
    • Tests if this Long's value is greater than or equal the specified's.

      +

      Parameters

      • other:
            | string
            | number
            | Timestamp
            | Long

      Returns boolean

gt: ((other:
    | string
    | number
    | Timestamp
    | Long) => boolean)

Type declaration

    • (other): boolean
    • This is an alias of Long.greaterThan

      +

      Parameters

      • other:
            | string
            | number
            | Timestamp
            | Long

      Returns boolean

gte: ((other:
    | string
    | number
    | Timestamp
    | Long) => boolean)

Type declaration

high: number
isEven: (() => boolean)

Type declaration

    • (): boolean
    • Tests if this Long's value is even.

      +

      Returns boolean

isNegative: (() => boolean)

Type declaration

    • (): boolean
    • Tests if this Long's value is negative.

      +

      Returns boolean

isOdd: (() => boolean)

Type declaration

    • (): boolean
    • Tests if this Long's value is odd.

      +

      Returns boolean

isPositive: (() => boolean)

Type declaration

    • (): boolean
    • Tests if this Long's value is positive.

      +

      Returns boolean

isZero: (() => boolean)

Type declaration

    • (): boolean
    • Tests if this Long's value equals zero.

      +

      Returns boolean

le: ((other:
    | string
    | number
    | Timestamp
    | Long) => boolean)

Type declaration

lessThan: ((other:
    | string
    | number
    | Timestamp
    | Long) => boolean)

Type declaration

    • (other): boolean
    • Tests if this Long's value is less than the specified's.

      +

      Parameters

      • other:
            | string
            | number
            | Timestamp
            | Long

      Returns boolean

lessThanOrEqual: ((other:
    | string
    | number
    | Timestamp
    | Long) => boolean)

Type declaration

    • (other): boolean
    • Tests if this Long's value is less than or equal the specified's.

      +

      Parameters

      • other:
            | string
            | number
            | Timestamp
            | Long

      Returns boolean

low: number
lt: ((other:
    | string
    | number
    | Timestamp
    | Long) => boolean)

Type declaration

    • (other): boolean
    • This is an alias of Long#lessThan.

      +

      Parameters

      • other:
            | string
            | number
            | Timestamp
            | Long

      Returns boolean

lte: ((other:
    | string
    | number
    | Timestamp
    | Long) => boolean)

Type declaration

mod: ((divisor:
    | string
    | number
    | Timestamp
    | Long) => Long)

Type declaration

modulo: ((divisor:
    | string
    | number
    | Timestamp
    | Long) => Long)

Type declaration

    • (divisor): Long
    • Returns this Long modulo the specified.

      +

      Parameters

      • divisor:
            | string
            | number
            | Timestamp
            | Long

      Returns Long

mul: ((multiplier:
    | string
    | number
    | Timestamp
    | Long) => Long)

Type declaration

multiply: ((multiplier:
    | string
    | number
    | Timestamp
    | Long) => Long)

Type declaration

    • (multiplier): Long
    • Returns the product of this and the specified Long.

      +

      Parameters

      • multiplier:
            | string
            | number
            | Timestamp
            | Long

        Multiplier

        +

      Returns Long

      Product

      +
ne: ((other:
    | string
    | number
    | Timestamp
    | Long) => boolean)

Type declaration

    • (other): boolean
    • This is an alias of Long.notEquals

      +

      Parameters

      • other:
            | string
            | number
            | Timestamp
            | Long

      Returns boolean

neg: (() => Long)

Type declaration

negate: (() => Long)

Type declaration

    • (): Long
    • Returns the Negation of this Long's value.

      +

      Returns Long

neq: ((other:
    | string
    | number
    | Timestamp
    | Long) => boolean)

Type declaration

    • (other): boolean
    • This is an alias of Long.notEquals

      +

      Parameters

      • other:
            | string
            | number
            | Timestamp
            | Long

      Returns boolean

not: (() => Long)

Type declaration

    • (): Long
    • Returns the bitwise NOT of this Long.

      +

      Returns Long

notEquals: ((other:
    | string
    | number
    | Timestamp
    | Long) => boolean)

Type declaration

    • (other): boolean
    • Tests if this Long's value differs from the specified's.

      +

      Parameters

      • other:
            | string
            | number
            | Timestamp
            | Long

      Returns boolean

or: ((other: string | number | Long) => Long)

Type declaration

    • (other): Long
    • Returns the bitwise OR of this Long and the specified.

      +

      Parameters

      • other: string | number | Long

      Returns Long

rem: ((divisor:
    | string
    | number
    | Timestamp
    | Long) => Long)

Type declaration

shiftLeft: ((numBits: number | Long) => Long)

Type declaration

    • (numBits): Long
    • Returns this Long with bits shifted to the left by the given amount.

      +

      Parameters

      • numBits: number | Long

        Number of bits

        +

      Returns Long

      Shifted Long

      +
shiftRight: ((numBits: number | Long) => Long)

Type declaration

    • (numBits): Long
    • Returns this Long with bits arithmetically shifted to the right by the given amount.

      +

      Parameters

      • numBits: number | Long

        Number of bits

        +

      Returns Long

      Shifted Long

      +
shiftRightUnsigned: ((numBits: number | Long) => Long)

Type declaration

    • (numBits): Long
    • Returns this Long with bits logically shifted to the right by the given amount.

      +

      Parameters

      • numBits: number | Long

        Number of bits

        +

      Returns Long

      Shifted Long

      +
shl: ((numBits: number | Long) => Long)

Type declaration

shr: ((numBits: number | Long) => Long)

Type declaration

shr_u: ((numBits: number | Long) => Long)

Type declaration

shru: ((numBits: number | Long) => Long)

Type declaration

sub: ((subtrahend:
    | string
    | number
    | Timestamp
    | Long) => Long)

Type declaration

subtract: ((subtrahend:
    | string
    | number
    | Timestamp
    | Long) => Long)

Type declaration

    • (subtrahend): Long
    • Returns the difference of this and the specified Long.

      +

      Parameters

      • subtrahend:
            | string
            | number
            | Timestamp
            | Long

        Subtrahend

        +

      Returns Long

      Difference

      +
toBigInt: (() => bigint)

Type declaration

    • (): bigint
    • Converts the Long to a BigInt (arbitrary precision).

      +

      Returns bigint

toBytes: ((le?: boolean) => number[])

Type declaration

    • (le?): number[]
    • Converts this Long to its byte representation.

      +

      Parameters

      • Optionalle: boolean

        Whether little or big endian, defaults to big endian

        +

      Returns number[]

      Byte representation

      +
toBytesBE: (() => number[])

Type declaration

    • (): number[]
    • Converts this Long to its big endian byte representation.

      +

      Returns number[]

      Big endian byte representation

      +
toBytesLE: (() => number[])

Type declaration

    • (): number[]
    • Converts this Long to its little endian byte representation.

      +

      Returns number[]

      Little endian byte representation

      +
toInt: (() => number)

Type declaration

    • (): number
    • Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.

      +

      Returns number

toNumber: (() => number)

Type declaration

    • (): number
    • Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).

      +

      Returns number

toSigned: (() => Long)

Type declaration

    • (): Long
    • Converts this Long to signed.

      +

      Returns Long

toString: ((radix?: number) => string)

Type declaration

    • (radix?): string
    • Converts the Long to a string written in the specified radix.

      +

      Parameters

      • Optionalradix: number

        Radix (2-36), defaults to 10

        +

      Returns string

      RangeError If radix is out of range

      +
toUnsigned: (() => Long)

Type declaration

    • (): Long
    • Converts this Long to unsigned.

      +

      Returns Long

unsigned: boolean
xor: ((other: string | number | Long) => Long)

Type declaration

    • (other): Long
    • Returns the bitwise XOR of this Long and the given one.

      +

      Parameters

      • other: string | number | Long

      Returns Long

MAX_VALUE: Long

Accessors

  • get _bsontype(): "Timestamp"
  • Returns "Timestamp"

Methods

  • Parameters

    • Optionaldepth: number
    • Optionaloptions: unknown
    • Optionalinspect: InspectFn

    Returns string

  • Returns {
        $timestamp: string;
    }

    • $timestamp: string
  • Returns a Timestamp for the given high and low bits. Each is assumed to use 32 bits.

    +

    Parameters

    • lowBits: number

      the low 32-bits.

      +
    • highBits: number

      the high 32-bits.

      +

    Returns Timestamp

  • Returns a Timestamp represented by the given (32-bit) integer value.

    +

    Parameters

    • value: number

    Returns Timestamp

  • Returns a Timestamp representing the given number value, provided that it is a finite number. Otherwise, zero is returned.

    +

    Parameters

    • value: number

    Returns Timestamp

  • Returns a Timestamp from the given string, optionally using the given radix.

    +

    Parameters

    • str: string

      the textual representation of the Timestamp.

      +
    • optRadix: number

      the radix in which the text is written.

      +

    Returns Timestamp

diff --git a/docs/6.9/classes/BSON.UUID.html b/docs/6.9/classes/BSON.UUID.html new file mode 100644 index 0000000000..00443a96fe --- /dev/null +++ b/docs/6.9/classes/BSON.UUID.html @@ -0,0 +1,77 @@ +UUID | mongodb

Class UUID

A class representation of the BSON UUID type.

+

Hierarchy (view full)

Constructors

  • Create a UUID type

    +

    When the argument to the constructor is omitted a random v4 UUID will be generated.

    +

    Parameters

    • Optionalinput: string | Uint8Array | UUID

      Can be a 32 or 36 character hex string (dashes excluded/included) or a 16 byte binary Buffer.

      +

    Returns UUID

Properties

buffer: Uint8Array
position: number
sub_type: number
BUFFER_SIZE: 256 = 256

Initial buffer default size

+
SUBTYPE_BYTE_ARRAY: 2 = 2

Byte Array BSON type

+
SUBTYPE_COLUMN: 7 = 7

Column BSON type

+
SUBTYPE_DEFAULT: 0 = 0

Default BSON type

+
SUBTYPE_ENCRYPTED: 6 = 6

Encrypted BSON type

+
SUBTYPE_FUNCTION: 1 = 1

Function BSON type

+
SUBTYPE_MD5: 5 = 5

MD5 BSON type

+
SUBTYPE_SENSITIVE: 8 = 8

Sensitive BSON type

+
SUBTYPE_USER_DEFINED: 128 = 128

User BSON type

+
SUBTYPE_UUID: 4 = 4

UUID BSON type

+
SUBTYPE_UUID_OLD: 3 = 3

Deprecated UUID BSON type

+

Please use SUBTYPE_UUID

+

Accessors

  • get _bsontype(): "Binary"
  • Returns "Binary"

  • get id(): Uint8Array
  • The UUID bytes

    +

    Returns Uint8Array

Methods

  • Compares the equality of this UUID with otherID.

    +

    Parameters

    • otherId: string | Uint8Array | UUID

      UUID instance to compare against.

      +

    Returns boolean

  • Converts to a string representation of this Id.

    +

    Parameters

    • Optionaldepth: number
    • Optionaloptions: unknown
    • Optionalinspect: InspectFn

    Returns string

    return the 36 character hex string representation.

    +
  • the length of the binary sequence

    +

    Returns number

  • Updates this binary with byte_value.

    +

    Parameters

    • byteValue:
          | string
          | number
          | Uint8Array
          | number[]

      a single byte we wish to write.

      +

    Returns void

  • Reads length bytes starting at position.

    +

    Parameters

    • position: number

      read from the given position in the Binary.

      +
    • length: number

      the number of bytes to read.

      +

    Returns BinarySequence

  • Creates a Binary instance from the current UUID.

    +

    Returns Binary

  • Returns the UUID id as a 32 or 36 character hex string representation, excluding/including dashes (defaults to 36 character dash separated)

    +

    Parameters

    • OptionalincludeDashes: boolean

      should the string exclude dash-separators.

      +

    Returns string

  • Converts the id into its JSON string representation. +A 36 character (dashes included) hex string in the format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

    +

    Returns string

  • Converts the id into a 36 character (dashes included) hex string, unless a encoding is specified.

    +

    Parameters

    • Optionalencoding: "base64" | "hex"

    Returns string

  • returns a view of the binary value as a Uint8Array

    +

    Returns Uint8Array

  • Writes a buffer to the binary.

    +

    Parameters

    • sequence: BinarySequence

      a string or buffer to be written to the Binary BSON object.

      +
    • offset: number

      specify the binary of where to write the content.

      +

    Returns void

  • Creates an UUID from a base64 string representation of an UUID.

    +

    Parameters

    • base64: string

    Returns UUID

  • Creates an UUID from a hex string representation of an UUID.

    +

    Parameters

    • hexString: string

      32 or 36 character hex string (dashes excluded/included).

      +

    Returns UUID

  • Generates a populated buffer containing a v4 uuid

    +

    Returns Uint8Array

  • Checks if a value is a valid bson UUID

    +

    Parameters

    • input:
          | string
          | Uint8Array
          | Binary
          | UUID

      UUID, string or Buffer to validate.

      +

    Returns boolean

diff --git a/docs/6.9/classes/Batch.html b/docs/6.9/classes/Batch.html new file mode 100644 index 0000000000..8da25fd8ee --- /dev/null +++ b/docs/6.9/classes/Batch.html @@ -0,0 +1,11 @@ +Batch | mongodb

Class Batch<T>

Keeps the state of a unordered batch so we can rewrite the results +correctly after command execution

+

Type Parameters

Constructors

Properties

batchType: BatchType
currentIndex: number
operations: T[]
originalIndexes: number[]
originalZeroIndex: number
size: number
sizeBytes: number
diff --git a/docs/6.9/classes/BulkOperationBase.html b/docs/6.9/classes/BulkOperationBase.html new file mode 100644 index 0000000000..f46062dd28 --- /dev/null +++ b/docs/6.9/classes/BulkOperationBase.html @@ -0,0 +1,22 @@ +BulkOperationBase | mongodb

Class BulkOperationBaseAbstract

Hierarchy (view full)

Properties

isOrdered: boolean
operationId?: number

Accessors

Methods

  • Builds a find operation for an update/updateOne/delete/deleteOne/replaceOne. +Returns a builder object used to complete the definition of the operation.

    +

    Parameters

    Returns FindOperators

    const bulkOp = collection.initializeOrderedBulkOp();

    // Add an updateOne to the bulkOp
    bulkOp.find({ a: 1 }).updateOne({ $set: { b: 2 } });

    // Add an updateMany to the bulkOp
    bulkOp.find({ c: 3 }).update({ $set: { d: 4 } });

    // Add an upsert
    bulkOp.find({ e: 5 }).upsert().updateOne({ $set: { f: 6 } });

    // Add a deletion
    bulkOp.find({ g: 7 }).deleteOne();

    // Add a multi deletion
    bulkOp.find({ h: 8 }).delete();

    // Add a replaceOne
    bulkOp.find({ i: 9 }).replaceOne({writeConcern: { j: 10 }});

    // Update using a pipeline (requires Mongodb 4.2 or higher)
    bulk.find({ k: 11, y: { $exists: true }, z: { $exists: true } }).updateOne([
    { $set: { total: { $sum: [ '$y', '$z' ] } } }
    ]);

    // All of the ops will now be executed
    await bulkOp.execute(); +
    + +
  • Add a single insert document to the bulk operation

    +

    Parameters

    Returns BulkOperationBase

    const bulkOp = collection.initializeOrderedBulkOp();

    // Adds three inserts to the bulkOp.
    bulkOp
    .insert({ a: 1 })
    .insert({ b: 2 })
    .insert({ c: 3 });
    await bulkOp.execute(); +
    + +
diff --git a/docs/6.9/classes/BulkWriteResult.html b/docs/6.9/classes/BulkWriteResult.html new file mode 100644 index 0000000000..97661a1658 --- /dev/null +++ b/docs/6.9/classes/BulkWriteResult.html @@ -0,0 +1,34 @@ +BulkWriteResult | mongodb

Class BulkWriteResult

The result of a bulk write.

+

Properties

deletedCount: number

Number of documents deleted.

+
insertedCount: number

Number of documents inserted.

+
insertedIds: {
    [key: number]: any;
}

Inserted document generated Id's, hash key is the index of the originating operation

+
matchedCount: number

Number of documents matched for update.

+
modifiedCount: number

Number of documents modified.

+
upsertedCount: number

Number of documents upserted.

+
upsertedIds: {
    [key: number]: any;
}

Upserted document generated Id's, hash key is the index of the originating operation

+

Accessors

  • get ok(): number
  • Evaluates to true if the bulk operation correctly executes

    +

    Returns number

Methods

  • Returns the number of write errors off the bulk operation

    +

    Returns number

  • Returns true if the bulk operation contains a write error

    +

    Returns boolean

diff --git a/docs/6.9/classes/CancellationToken.html b/docs/6.9/classes/CancellationToken.html new file mode 100644 index 0000000000..9b830f7fb4 --- /dev/null +++ b/docs/6.9/classes/CancellationToken.html @@ -0,0 +1,422 @@ +CancellationToken | mongodb

Class CancellationToken

Hierarchy (view full)

Constructors

Properties

captureRejections: boolean

Value: boolean

+

Change the default captureRejections option on all new EventEmitter objects.

+

v13.4.0, v12.16.0

+
captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

+

See how to write a custom rejection handler.

+

v13.4.0, v12.16.0

+
defaultMaxListeners: number

By default, a maximum of 10 listeners can be registered for any single +event. This limit can be changed for individual EventEmitter instances +using the emitter.setMaxListeners(n) method. To change the default +for allEventEmitter instances, the events.defaultMaxListeners property +can be used. If this value is not a positive number, a RangeError is thrown.

+

Take caution when setting the events.defaultMaxListeners because the +change affects all EventEmitter instances, including those created before +the change is made. However, calling emitter.setMaxListeners(n) still has +precedence over events.defaultMaxListeners.

+

This is not a hard limit. The EventEmitter instance will allow +more listeners to be added but will output a trace warning to stderr indicating +that a "possible EventEmitter memory leak" has been detected. For any single +EventEmitter, the emitter.getMaxListeners() and emitter.setMaxListeners() methods can be used to +temporarily avoid this warning:

+
import { EventEmitter } from 'node:events';
const emitter = new EventEmitter();
emitter.setMaxListeners(emitter.getMaxListeners() + 1);
emitter.once('event', () => {
// do stuff
emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
}); +
+ +

The --trace-warnings command-line flag can be used to display the +stack trace for such warnings.

+

The emitted warning can be inspected with process.on('warning') and will +have the additional emitter, type, and count properties, referring to +the event emitter instance, the event's name and the number of attached +listeners, respectively. +Its name property is set to 'MaxListenersExceededWarning'.

+

v0.11.2

+
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

+

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted. Therefore, the process will still crash if no +regular 'error' listener is installed.

+

v13.6.0, v12.17.0

+

Methods

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest...args: AnyRest

    Returns void

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Type Parameters

    • EventKey extends "cancel"

    Parameters

    • event: symbol | EventKey
    • Rest...args: Parameters<{
          cancel(): void;
      }[EventKey]>

    Returns boolean

    v0.1.26

    +
  • Returns an array listing the events for which the emitter has registered +listeners. The values in the array are strings or Symbols.

    +
    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ] +
    + +

    Returns string[]

    v6.0.0

    +
  • Returns the number of listeners listening for the event named eventName. +If listener is provided, it will return how many times the listener is found +in the list of the listeners of the event.

    +

    Type Parameters

    • EventKey extends "cancel"

    Parameters

    Returns number

    v3.2.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    });
    console.log(util.inspect(server.listeners('connection')));
    // Prints: [ [Function] ] +
    + +

    Type Parameters

    • EventKey extends "cancel"

    Parameters

    Returns {
        cancel(): void;
    }[EventKey][]

    v0.1.26

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends "cancel"

    Parameters

    • event: EventKey
    • listener: {
          cancel(): void;
      }[EventKey]

      The callback function

      +

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.1.101

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends "cancel"

    Parameters

    • event: EventKey
    • listener: {
          cancel(): void;
      }[EventKey]

      The callback function

      +

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.3.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "cancel"

    Parameters

    • event: EventKey
    • listener: {
          cancel(): void;
      }[EventKey]

      The callback function

      +

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "cancel"

    Parameters

    • event: EventKey
    • listener: {
          cancel(): void;
      }[EventKey]

      The callback function

      +

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Returns a copy of the array of listeners for the event named eventName, +including any wrappers (such as those created by .once()).

    +
    import { EventEmitter } from 'node:events';
    const emitter = new EventEmitter();
    emitter.once('log', () => console.log('log once'));

    // Returns a new Array with a function `onceWrapper` which has a property
    // `listener` which contains the original listener bound above
    const listeners = emitter.rawListeners('log');
    const logFnWrapper = listeners[0];

    // Logs "log once" to the console and does not unbind the `once` event
    logFnWrapper.listener();

    // Logs "log once" to the console and removes the listener
    logFnWrapper();

    emitter.on('log', () => console.log('log persistently'));
    // Will return a new Array with a single function bound by `.on()` above
    const newListeners = emitter.rawListeners('log');

    // Logs "log persistently" twice
    newListeners[0]();
    emitter.emit('log'); +
    + +

    Type Parameters

    • EventKey extends "cancel"

    Parameters

    Returns {
        cancel(): void;
    }[EventKey][]

    v9.4.0

    +
  • Removes all listeners, or those of the specified eventName.

    +

    It is bad practice to remove listeners added elsewhere in the code, +particularly when the EventEmitter instance was created by some other +component or module (e.g. sockets or file streams).

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "cancel"

    Parameters

    • Optionalevent: string | symbol | EventKey

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "cancel"

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • By default EventEmitters will print a warning if more than 10 listeners are +added for a particular event. This is a useful default that helps finding +memory leaks. The emitter.setMaxListeners() method allows the limit to be +modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • n: number

    Returns this

    v0.3.5

    +
  • Experimental

    Listens once to the abort event on the provided signal.

    +

    Listening to the abort event on abort signals is unsafe and may +lead to resource leaks since another third party with the signal can +call e.stopImmediatePropagation(). Unfortunately Node.js cannot change +this since it would violate the web standard. Additionally, the original +API makes it easy to forget to remove listeners.

    +

    This API allows safely using AbortSignals in Node.js APIs by solving these +two issues by listening to the event such that stopImmediatePropagation does +not prevent the listener from running.

    +

    Returns a disposable so that it may be unsubscribed from more easily.

    +
    import { addAbortListener } from 'node:events';

    function example(signal) {
    let disposable;
    try {
    signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
    disposable = addAbortListener(signal, (e) => {
    // Do something when signal is aborted.
    });
    } finally {
    disposable?.[Symbol.dispose]();
    }
    } +
    + +

    Parameters

    • signal: AbortSignal
    • resource: ((event: Event) => void)
        • (event): void
        • Parameters

          • event: Event

          Returns void

    Returns Disposable

    Disposable that removes the abort listener.

    +

    v20.5.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +

    For EventEmitters this behaves exactly the same as calling .listeners on +the emitter.

    +

    For EventTargets this is the only way to get the event listeners for the +event target. This is useful for debugging and diagnostic purposes.

    +
    import { getEventListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    const listener = () => console.log('Events are fun');
    ee.on('foo', listener);
    console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
    }
    {
    const et = new EventTarget();
    const listener = () => console.log('Events are fun');
    et.addEventListener('foo', listener);
    console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget
    • name: string | symbol

    Returns Function[]

    v15.2.0, v14.17.0

    +
  • Returns the currently set max amount of listeners.

    +

    For EventEmitters this behaves exactly the same as calling .getMaxListeners on +the emitter.

    +

    For EventTargets this is the only way to get the max event listeners for the +event target. If the number of event handlers on a single EventTarget exceeds +the max set, the EventTarget will print a warning.

    +
    import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    console.log(getMaxListeners(ee)); // 10
    setMaxListeners(11, ee);
    console.log(getMaxListeners(ee)); // 11
    }
    {
    const et = new EventTarget();
    console.log(getMaxListeners(et)); // 10
    setMaxListeners(11, et);
    console.log(getMaxListeners(et)); // 11
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget

    Returns number

    v19.9.0

    +
  • A class method that returns the number of listeners for the given eventName registered on the given emitter.

    +
    import { EventEmitter, listenerCount } from 'node:events';

    const myEmitter = new EventEmitter();
    myEmitter.on('event', () => {});
    myEmitter.on('event', () => {});
    console.log(listenerCount(myEmitter, 'event'));
    // Prints: 2 +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>

      The emitter to query

      +
    • eventName: string | symbol

      The event name

      +

    Returns number

    v0.9.12

    +

    Since v3.2.0 - Use listenerCount instead.

    +
  • import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo')) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here +
    + +

    Returns an AsyncIterator that iterates eventName events. It will throw +if the EventEmitter emits 'error'. It removes all listeners when +exiting the loop. The value returned by each iteration is an array +composed of the emitted event arguments.

    +

    An AbortSignal can be used to cancel waiting on events:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ac = new AbortController();

    (async () => {
    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo', { signal: ac.signal })) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here
    })();

    process.nextTick(() => ac.abort()); +
    + +

    Use the close option to specify an array of event names that will end the iteration:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    ee.emit('close');
    });

    for await (const event of on(ee, 'foo', { close: ['close'] })) {
    console.log(event); // prints ['bar'] [42]
    }
    // the loop will exit after 'close' is emitted
    console.log('done'); // prints 'done' +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

    An AsyncIterator that iterates eventName events emitted by the emitter

    +

    v13.6.0, v12.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

  • Creates a Promise that is fulfilled when the EventEmitter emits the given +event or that is rejected if the EventEmitter emits 'error' while waiting. +The Promise will resolve with an array of all the arguments emitted to the +given event.

    +

    This method is intentionally generic and works with the web platform EventTarget interface, which has no special'error' event +semantics and does not listen to the 'error' event.

    +
    import { once, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    process.nextTick(() => {
    ee.emit('myevent', 42);
    });

    const [value] = await once(ee, 'myevent');
    console.log(value);

    const err = new Error('kaboom');
    process.nextTick(() => {
    ee.emit('error', err);
    });

    try {
    await once(ee, 'myevent');
    } catch (err) {
    console.error('error happened', err);
    } +
    + +

    The special handling of the 'error' event is only used when events.once() is used to wait for another event. If events.once() is used to wait for the +'error' event itself, then it is treated as any other kind of event without +special handling:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();

    once(ee, 'error')
    .then(([err]) => console.log('ok', err.message))
    .catch((err) => console.error('error', err.message));

    ee.emit('error', new Error('boom'));

    // Prints: ok boom +
    + +

    An AbortSignal can be used to cancel waiting for the event:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();
    const ac = new AbortController();

    async function foo(emitter, event, signal) {
    try {
    await once(emitter, event, { signal });
    console.log('event emitted!');
    } catch (error) {
    if (error.name === 'AbortError') {
    console.error('Waiting for the event was canceled!');
    } else {
    console.error('There was an error', error.message);
    }
    }
    }

    foo(ee, 'foo', ac.signal);
    ac.abort(); // Abort waiting for the event
    ee.emit('foo'); // Prints: Waiting for the event was canceled! +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

    v11.13.0, v10.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

  • import { setMaxListeners, EventEmitter } from 'node:events';

    const target = new EventTarget();
    const emitter = new EventEmitter();

    setMaxListeners(5, target, emitter); +
    + +

    Parameters

    • Optionaln: number

      A non-negative number. The maximum number of listeners per EventTarget event.

      +
    • Rest...eventTargets: (EventEmitter<DefaultEventMap> | EventTarget)[]

    Returns void

    v15.4.0

    +
diff --git a/docs/6.9/classes/ChangeStream.html b/docs/6.9/classes/ChangeStream.html new file mode 100644 index 0000000000..d55f7eedec --- /dev/null +++ b/docs/6.9/classes/ChangeStream.html @@ -0,0 +1,465 @@ +ChangeStream | mongodb

Class ChangeStream<TSchema, TChange>

Creates a new Change Stream instance. Normally created using Collection.watch().

+

Type Parameters

Hierarchy (view full)

Implements

Properties

[asyncDispose]: (() => Promise<void>)

An alias for ChangeStream.close|ChangeStream.close().

+
namespace: MongoDBNamespace
options: ChangeStreamOptions & {
    writeConcern?: undefined;
}

WriteConcern can still be present on the options because +we inherit options from the client/db/collection. The +key must be present on the options in order to delete it. +This allows typescript to delete the key but will +not allow a writeConcern to be assigned as a property on options.

+
pipeline: Document[]
streamOptions?: CursorStreamOptions
type: symbol
captureRejections: boolean

Value: boolean

+

Change the default captureRejections option on all new EventEmitter objects.

+

v13.4.0, v12.16.0

+
captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

+

See how to write a custom rejection handler.

+

v13.4.0, v12.16.0

+
CHANGE: "change" = CHANGE

Fired for each new matching change in the specified namespace. Attaching a change +event listener to a Change Stream will switch the stream into flowing mode. Data will +then be passed as soon as it is available.

+
CLOSE: "close" = CLOSE
defaultMaxListeners: number

By default, a maximum of 10 listeners can be registered for any single +event. This limit can be changed for individual EventEmitter instances +using the emitter.setMaxListeners(n) method. To change the default +for allEventEmitter instances, the events.defaultMaxListeners property +can be used. If this value is not a positive number, a RangeError is thrown.

+

Take caution when setting the events.defaultMaxListeners because the +change affects all EventEmitter instances, including those created before +the change is made. However, calling emitter.setMaxListeners(n) still has +precedence over events.defaultMaxListeners.

+

This is not a hard limit. The EventEmitter instance will allow +more listeners to be added but will output a trace warning to stderr indicating +that a "possible EventEmitter memory leak" has been detected. For any single +EventEmitter, the emitter.getMaxListeners() and emitter.setMaxListeners() methods can be used to +temporarily avoid this warning:

+
import { EventEmitter } from 'node:events';
const emitter = new EventEmitter();
emitter.setMaxListeners(emitter.getMaxListeners() + 1);
emitter.once('event', () => {
// do stuff
emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
}); +
+ +

The --trace-warnings command-line flag can be used to display the +stack trace for such warnings.

+

The emitted warning can be inspected with process.on('warning') and will +have the additional emitter, type, and count properties, referring to +the event emitter instance, the event's name and the number of attached +listeners, respectively. +Its name property is set to 'MaxListenersExceededWarning'.

+

v0.11.2

+
END: "end" = END
ERROR: "error" = ERROR
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

+

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted. Therefore, the process will still crash if no +regular 'error' listener is installed.

+

v13.6.0, v12.17.0

+
INIT: "init" = INIT
MORE: "more" = MORE
RESPONSE: "response" = RESPONSE
RESUME_TOKEN_CHANGED: "resumeTokenChanged" = RESUME_TOKEN_CHANGED

Emitted each time the change stream stores a new resume token.

+

Accessors

  • get resumeToken(): unknown
  • The cached resume token that is used to resume after the most recently returned change.

    +

    Returns unknown

Methods

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest...args: AnyRest

    Returns void

  • Frees the internal resources used by the change stream.

    +

    Returns Promise<void>

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Type Parameters

    • EventKey extends
          | "error"
          | "close"
          | "response"
          | "more"
          | "init"
          | "change"
          | "end"
          | "resumeTokenChanged"

    Parameters

    Returns boolean

    v0.1.26

    +
  • Returns an array listing the events for which the emitter has registered +listeners. The values in the array are strings or Symbols.

    +
    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ] +
    + +

    Returns string[]

    v6.0.0

    +
  • Check if there is any document still available in the Change Stream

    +

    Returns Promise<boolean>

  • Returns the number of listeners listening for the event named eventName. +If listener is provided, it will return how many times the listener is found +in the list of the listeners of the event.

    +

    Type Parameters

    • EventKey extends
          | "error"
          | "close"
          | "response"
          | "more"
          | "init"
          | "change"
          | "end"
          | "resumeTokenChanged"

    Parameters

    Returns number

    v3.2.0

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends
          | "error"
          | "close"
          | "response"
          | "more"
          | "init"
          | "change"
          | "end"
          | "resumeTokenChanged"

    Parameters

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.1.101

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends
          | "error"
          | "close"
          | "response"
          | "more"
          | "init"
          | "change"
          | "end"
          | "resumeTokenChanged"

    Parameters

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.3.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends
          | "error"
          | "close"
          | "response"
          | "more"
          | "init"
          | "change"
          | "end"
          | "resumeTokenChanged"

    Parameters

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends
          | "error"
          | "close"
          | "response"
          | "more"
          | "init"
          | "change"
          | "end"
          | "resumeTokenChanged"

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Returns a copy of the array of listeners for the event named eventName, +including any wrappers (such as those created by .once()).

    +
    import { EventEmitter } from 'node:events';
    const emitter = new EventEmitter();
    emitter.once('log', () => console.log('log once'));

    // Returns a new Array with a function `onceWrapper` which has a property
    // `listener` which contains the original listener bound above
    const listeners = emitter.rawListeners('log');
    const logFnWrapper = listeners[0];

    // Logs "log once" to the console and does not unbind the `once` event
    logFnWrapper.listener();

    // Logs "log once" to the console and removes the listener
    logFnWrapper();

    emitter.on('log', () => console.log('log persistently'));
    // Will return a new Array with a single function bound by `.on()` above
    const newListeners = emitter.rawListeners('log');

    // Logs "log persistently" twice
    newListeners[0]();
    emitter.emit('log'); +
    + +

    Type Parameters

    • EventKey extends
          | "error"
          | "close"
          | "response"
          | "more"
          | "init"
          | "change"
          | "end"
          | "resumeTokenChanged"

    Parameters

    Returns ChangeStreamEvents<TSchema, TChange>[EventKey][]

    v9.4.0

    +
  • Removes all listeners, or those of the specified eventName.

    +

    It is bad practice to remove listeners added elsewhere in the code, +particularly when the EventEmitter instance was created by some other +component or module (e.g. sockets or file streams).

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends
          | "error"
          | "close"
          | "response"
          | "more"
          | "init"
          | "change"
          | "end"
          | "resumeTokenChanged"

    Parameters

    • Optionalevent: string | symbol | EventKey

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends
          | "error"
          | "close"
          | "response"
          | "more"
          | "init"
          | "change"
          | "end"
          | "resumeTokenChanged"

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • By default EventEmitters will print a warning if more than 10 listeners are +added for a particular event. This is a useful default that helps finding +memory leaks. The emitter.setMaxListeners() method allows the limit to be +modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • n: number

    Returns this

    v0.3.5

    +
  • Return a modified Readable stream including a possible transform method.

    +

    NOTE: When using a Stream to process change stream events, the stream will +NOT automatically resume in the case a resumable error is encountered.

    +

    Parameters

    Returns Readable & AsyncIterable<TChange>

    MongoChangeStreamError if the underlying cursor or the change stream is closed

    +
  • Try to get the next available document from the Change Stream's cursor or null if an empty batch is returned

    +

    Returns Promise<null | TChange>

  • Experimental

    Listens once to the abort event on the provided signal.

    +

    Listening to the abort event on abort signals is unsafe and may +lead to resource leaks since another third party with the signal can +call e.stopImmediatePropagation(). Unfortunately Node.js cannot change +this since it would violate the web standard. Additionally, the original +API makes it easy to forget to remove listeners.

    +

    This API allows safely using AbortSignals in Node.js APIs by solving these +two issues by listening to the event such that stopImmediatePropagation does +not prevent the listener from running.

    +

    Returns a disposable so that it may be unsubscribed from more easily.

    +
    import { addAbortListener } from 'node:events';

    function example(signal) {
    let disposable;
    try {
    signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
    disposable = addAbortListener(signal, (e) => {
    // Do something when signal is aborted.
    });
    } finally {
    disposable?.[Symbol.dispose]();
    }
    } +
    + +

    Parameters

    • signal: AbortSignal
    • resource: ((event: Event) => void)
        • (event): void
        • Parameters

          • event: Event

          Returns void

    Returns Disposable

    Disposable that removes the abort listener.

    +

    v20.5.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +

    For EventEmitters this behaves exactly the same as calling .listeners on +the emitter.

    +

    For EventTargets this is the only way to get the event listeners for the +event target. This is useful for debugging and diagnostic purposes.

    +
    import { getEventListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    const listener = () => console.log('Events are fun');
    ee.on('foo', listener);
    console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
    }
    {
    const et = new EventTarget();
    const listener = () => console.log('Events are fun');
    et.addEventListener('foo', listener);
    console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget
    • name: string | symbol

    Returns Function[]

    v15.2.0, v14.17.0

    +
  • Returns the currently set max amount of listeners.

    +

    For EventEmitters this behaves exactly the same as calling .getMaxListeners on +the emitter.

    +

    For EventTargets this is the only way to get the max event listeners for the +event target. If the number of event handlers on a single EventTarget exceeds +the max set, the EventTarget will print a warning.

    +
    import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    console.log(getMaxListeners(ee)); // 10
    setMaxListeners(11, ee);
    console.log(getMaxListeners(ee)); // 11
    }
    {
    const et = new EventTarget();
    console.log(getMaxListeners(et)); // 10
    setMaxListeners(11, et);
    console.log(getMaxListeners(et)); // 11
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget

    Returns number

    v19.9.0

    +
  • A class method that returns the number of listeners for the given eventName registered on the given emitter.

    +
    import { EventEmitter, listenerCount } from 'node:events';

    const myEmitter = new EventEmitter();
    myEmitter.on('event', () => {});
    myEmitter.on('event', () => {});
    console.log(listenerCount(myEmitter, 'event'));
    // Prints: 2 +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>

      The emitter to query

      +
    • eventName: string | symbol

      The event name

      +

    Returns number

    v0.9.12

    +

    Since v3.2.0 - Use listenerCount instead.

    +
  • import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo')) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here +
    + +

    Returns an AsyncIterator that iterates eventName events. It will throw +if the EventEmitter emits 'error'. It removes all listeners when +exiting the loop. The value returned by each iteration is an array +composed of the emitted event arguments.

    +

    An AbortSignal can be used to cancel waiting on events:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ac = new AbortController();

    (async () => {
    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo', { signal: ac.signal })) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here
    })();

    process.nextTick(() => ac.abort()); +
    + +

    Use the close option to specify an array of event names that will end the iteration:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    ee.emit('close');
    });

    for await (const event of on(ee, 'foo', { close: ['close'] })) {
    console.log(event); // prints ['bar'] [42]
    }
    // the loop will exit after 'close' is emitted
    console.log('done'); // prints 'done' +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

    An AsyncIterator that iterates eventName events emitted by the emitter

    +

    v13.6.0, v12.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

  • Creates a Promise that is fulfilled when the EventEmitter emits the given +event or that is rejected if the EventEmitter emits 'error' while waiting. +The Promise will resolve with an array of all the arguments emitted to the +given event.

    +

    This method is intentionally generic and works with the web platform EventTarget interface, which has no special'error' event +semantics and does not listen to the 'error' event.

    +
    import { once, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    process.nextTick(() => {
    ee.emit('myevent', 42);
    });

    const [value] = await once(ee, 'myevent');
    console.log(value);

    const err = new Error('kaboom');
    process.nextTick(() => {
    ee.emit('error', err);
    });

    try {
    await once(ee, 'myevent');
    } catch (err) {
    console.error('error happened', err);
    } +
    + +

    The special handling of the 'error' event is only used when events.once() is used to wait for another event. If events.once() is used to wait for the +'error' event itself, then it is treated as any other kind of event without +special handling:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();

    once(ee, 'error')
    .then(([err]) => console.log('ok', err.message))
    .catch((err) => console.error('error', err.message));

    ee.emit('error', new Error('boom'));

    // Prints: ok boom +
    + +

    An AbortSignal can be used to cancel waiting for the event:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();
    const ac = new AbortController();

    async function foo(emitter, event, signal) {
    try {
    await once(emitter, event, { signal });
    console.log('event emitted!');
    } catch (error) {
    if (error.name === 'AbortError') {
    console.error('Waiting for the event was canceled!');
    } else {
    console.error('There was an error', error.message);
    }
    }
    }

    foo(ee, 'foo', ac.signal);
    ac.abort(); // Abort waiting for the event
    ee.emit('foo'); // Prints: Waiting for the event was canceled! +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

    v11.13.0, v10.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

  • import { setMaxListeners, EventEmitter } from 'node:events';

    const target = new EventTarget();
    const emitter = new EventEmitter();

    setMaxListeners(5, target, emitter); +
    + +

    Parameters

    • Optionaln: number

      A non-negative number. The maximum number of listeners per EventTarget event.

      +
    • Rest...eventTargets: (EventEmitter<DefaultEventMap> | EventTarget)[]

    Returns void

    v15.4.0

    +
diff --git a/docs/6.9/classes/ClientEncryption.html b/docs/6.9/classes/ClientEncryption.html new file mode 100644 index 0000000000..8e59740d64 --- /dev/null +++ b/docs/6.9/classes/ClientEncryption.html @@ -0,0 +1,119 @@ +ClientEncryption | mongodb

Class ClientEncryption

The public interface for explicit in-use encryption

+

Constructors

  • Create a new encryption instance

    +

    Parameters

    Returns ClientEncryption

    new ClientEncryption(mongoClient, {
    keyVaultNamespace: 'client.encryption',
    kmsProviders: {
    local: {
    key: masterKey // The master key used for encryption/decryption. A 96-byte long Buffer
    }
    }
    }); +
    + +
    new ClientEncryption(mongoClient, {
    keyVaultNamespace: 'client.encryption',
    kmsProviders: {
    aws: {
    accessKeyId: AWS_ACCESS_KEY,
    secretAccessKey: AWS_SECRET_KEY
    }
    }
    }); +
    + +

Accessors

Methods

  • Adds a keyAltName to a key identified by the provided _id.

    +

    This method resolves to/returns the old key value (prior to adding the new altKeyName).

    +

    Parameters

    • _id: Binary

      The id of the document to update.

      +
    • keyAltName: string

      a keyAltName to search for a key

      +

    Returns Promise<null | WithId<DataKey>>

    Returns a promise that either resolves to a DataKey if a document matches the key or null if no documents +match the id. The promise rejects with an error if an error is thrown.

    +
    // adding an keyAltName to a data key
    const id = new Binary(); // id is a bson binary subtype 4 object
    const keyAltName = 'keyAltName';
    const oldKey = await clientEncryption.addKeyAltName(id, keyAltName);
    if (!oldKey) {
    // null is returned if there is no matching document with an id matching the supplied id
    } +
    + +
  • Creates a data key used for explicit encryption and inserts it into the key vault namespace

    +

    Parameters

    Returns Promise<UUID>

    // Using async/await to create a local key
    const dataKeyId = await clientEncryption.createDataKey('local'); +
    + +
    // Using async/await to create an aws key
    const dataKeyId = await clientEncryption.createDataKey('aws', {
    masterKey: {
    region: 'us-east-1',
    key: 'xxxxxxxxxxxxxx' // CMK ARN here
    }
    }); +
    + +
    // Using async/await to create an aws key with a keyAltName
    const dataKeyId = await clientEncryption.createDataKey('aws', {
    masterKey: {
    region: 'us-east-1',
    key: 'xxxxxxxxxxxxxx' // CMK ARN here
    },
    keyAltNames: [ 'mySpecialKey' ]
    }); +
    + +
  • Explicitly decrypt a provided encrypted value

    +

    Type Parameters

    • T = any

    Parameters

    • value: Binary

      An encrypted value

      +

    Returns Promise<T>

    a Promise that either resolves with the decrypted value, or rejects with an error

    +
    // Decrypting value with async/await API
    async function decryptMyValue(value) {
    return clientEncryption.decrypt(value);
    } +
    + +
  • Deletes the key with the provided id from the keyvault, if it exists.

    +

    Parameters

    Returns Promise<DeleteResult>

    // delete a key by _id
    const id = new Binary(); // id is a bson binary subtype 4 object
    const { deletedCount } = await clientEncryption.deleteKey(id);

    if (deletedCount != null && deletedCount > 0) {
    // successful deletion
    } +
    + +
  • Explicitly encrypt a provided value. Note that either options.keyId or options.keyAltName must +be specified. Specifying both options.keyId and options.keyAltName is considered an error.

    +

    Parameters

    Returns Promise<Binary>

    a Promise that either resolves with the encrypted value, or rejects with an error.

    +
    // Encryption with async/await api
    async function encryptMyData(value) {
    const keyId = await clientEncryption.createDataKey('local');
    return clientEncryption.encrypt(value, { keyId, algorithm: 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic' });
    } +
    + +
    // Encryption using a keyAltName
    async function encryptMyData(value) {
    await clientEncryption.createDataKey('local', { keyAltNames: 'mySpecialKey' });
    return clientEncryption.encrypt(value, { keyAltName: 'mySpecialKey', algorithm: 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic' });
    } +
    + +
  • Encrypts a Match Expression or Aggregate Expression to query a range index.

    +

    Only supported when queryType is "range" and algorithm is "Range".

    +

    Parameters

    • expression: Document

      a BSON document of one of the following forms:

      +
        +
      1. A Match Expression of this form: +{$and: [{<field>: {$gt: <value1>}}, {<field>: {$lt: <value2> }}]}
      2. +
      3. An Aggregate Expression of this form: +{$and: [{$gt: [<fieldpath>, <value1>]}, {$lt: [<fieldpath>, <value2>]}]}
      4. +
      +

      $gt may also be $gte. $lt may also be $lte.

      +
    • options: ClientEncryptionEncryptOptions

    Returns Promise<Binary>

    Returns a Promise that either resolves with the encrypted value or rejects with an error.

    +
  • Finds a key in the keyvault with the specified _id.

    +

    Returns a promise that either resolves to a DataKey if a document matches the key or null if no documents +match the id. The promise rejects with an error if an error is thrown.

    +

    Parameters

    Returns Promise<null | DataKey>

    // getting a key by id
    const id = new Binary(); // id is a bson binary subtype 4 object
    const key = await clientEncryption.getKey(id);
    if (!key) {
    // key is null if there was no matching key
    } +
    + +
  • Finds a key in the keyvault which has the specified keyAltName.

    +

    Parameters

    • keyAltName: string

      a keyAltName to search for a key

      +

    Returns Promise<null | WithId<DataKey>>

    Returns a promise that either resolves to a DataKey if a document matches the key or null if no documents +match the keyAltName. The promise rejects with an error if an error is thrown.

    +
    // get a key by alt name
    const keyAltName = 'keyAltName';
    const key = await clientEncryption.getKeyByAltName(keyAltName);
    if (!key) {
    // key is null if there is no matching key
    } +
    + +
  • Adds a keyAltName to a key identified by the provided _id.

    +

    This method resolves to/returns the old key value (prior to removing the new altKeyName).

    +

    If the removed keyAltName is the last keyAltName for that key, the altKeyNames property is unset from the document.

    +

    Parameters

    • _id: Binary

      The id of the document to update.

      +
    • keyAltName: string

      a keyAltName to search for a key

      +

    Returns Promise<null | WithId<DataKey>>

    Returns a promise that either resolves to a DataKey if a document matches the key or null if no documents +match the id. The promise rejects with an error if an error is thrown.

    +
    // removing a key alt name from a data key
    const id = new Binary(); // id is a bson binary subtype 4 object
    const keyAltName = 'keyAltName';
    const oldKey = await clientEncryption.removeKeyAltName(id, keyAltName);

    if (!oldKey) {
    // null is returned if there is no matching document with an id matching the supplied id
    } +
    + +
  • Searches the keyvault for any data keys matching the provided filter. If there are matches, rewrapManyDataKey then attempts to re-wrap the data keys using the provided options.

    +

    If no matches are found, then no bulk write is performed.

    +

    Returns Promise<{
        bulkWriteResult?: BulkWriteResult;
    }>

    // rewrapping all data data keys (using a filter that matches all documents)
    const filter = {};

    const result = await clientEncryption.rewrapManyDataKey(filter);
    if (result.bulkWriteResult != null) {
    // keys were re-wrapped, results will be available in the bulkWrite object.
    } +
    + +
    // attempting to rewrap all data keys with no matches
    const filter = { _id: new Binary() } // assume _id matches no documents in the database
    const result = await clientEncryption.rewrapManyDataKey(filter);

    if (result.bulkWriteResult == null) {
    // no keys matched, `bulkWriteResult` does not exist on the result object
    } +
    + +
diff --git a/docs/6.9/classes/ClientSession.html b/docs/6.9/classes/ClientSession.html new file mode 100644 index 0000000000..d25cd6d0dc --- /dev/null +++ b/docs/6.9/classes/ClientSession.html @@ -0,0 +1,499 @@ +ClientSession | mongodb

Class ClientSession

A class representing a client session on the server

+

NOTE: not meant to be instantiated directly.

+

Hierarchy (view full)

Implements

Properties

[asyncDispose]: (() => Promise<void>)
clientOptions?: MongoOptions
clusterTime?: ClusterTime
defaultTransactionOptions: TransactionOptions
explicit: boolean
hasEnded: boolean
operationTime?: Timestamp
supports: {
    causalConsistency: boolean;
}
transaction: Transaction
captureRejections: boolean

Value: boolean

+

Change the default captureRejections option on all new EventEmitter objects.

+

v13.4.0, v12.16.0

+
captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

+

See how to write a custom rejection handler.

+

v13.4.0, v12.16.0

+
defaultMaxListeners: number

By default, a maximum of 10 listeners can be registered for any single +event. This limit can be changed for individual EventEmitter instances +using the emitter.setMaxListeners(n) method. To change the default +for allEventEmitter instances, the events.defaultMaxListeners property +can be used. If this value is not a positive number, a RangeError is thrown.

+

Take caution when setting the events.defaultMaxListeners because the +change affects all EventEmitter instances, including those created before +the change is made. However, calling emitter.setMaxListeners(n) still has +precedence over events.defaultMaxListeners.

+

This is not a hard limit. The EventEmitter instance will allow +more listeners to be added but will output a trace warning to stderr indicating +that a "possible EventEmitter memory leak" has been detected. For any single +EventEmitter, the emitter.getMaxListeners() and emitter.setMaxListeners() methods can be used to +temporarily avoid this warning:

+
import { EventEmitter } from 'node:events';
const emitter = new EventEmitter();
emitter.setMaxListeners(emitter.getMaxListeners() + 1);
emitter.once('event', () => {
// do stuff
emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
}); +
+ +

The --trace-warnings command-line flag can be used to display the +stack trace for such warnings.

+

The emitted warning can be inspected with process.on('warning') and will +have the additional emitter, type, and count properties, referring to +the event emitter instance, the event's name and the number of attached +listeners, respectively. +Its name property is set to 'MaxListenersExceededWarning'.

+

v0.11.2

+
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

+

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted. Therefore, the process will still crash if no +regular 'error' listener is installed.

+

v13.6.0, v12.17.0

+

Accessors

  • get snapshotEnabled(): boolean
  • Whether or not this session is configured for snapshot reads

    +

    Returns boolean

Methods

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest...args: AnyRest

    Returns void

  • Aborts the currently active transaction in this session.

    +

    Returns Promise<void>

  • Advances the clusterTime for a ClientSession to the provided clusterTime of another ClientSession

    +

    Parameters

    • clusterTime: ClusterTime

      the $clusterTime returned by the server from another session in the form of a document containing the BSON.Timestamp clusterTime and signature

      +

    Returns void

  • Advances the operationTime for a ClientSession.

    +

    Parameters

    • operationTime: Timestamp

      the BSON.Timestamp of the operation type it is desired to advance to

      +

    Returns void

  • Commits the currently active transaction in this session.

    +

    Returns Promise<void>

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Type Parameters

    • EventKey extends "ended"

    Parameters

    Returns boolean

    v0.1.26

    +
  • Frees any client-side resources held by the current session. If a session is in a transaction, +the transaction is aborted.

    +

    Does not end the session on the server.

    +

    Parameters

    • Optionaloptions: EndSessionOptions

      Optional settings. Currently reserved for future use

      +

    Returns Promise<void>

  • Used to determine if this session equals another

    +

    Parameters

    Returns boolean

  • Returns an array listing the events for which the emitter has registered +listeners. The values in the array are strings or Symbols.

    +
    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ] +
    + +

    Returns string[]

    v6.0.0

    +
  • Increment the transaction number on the internal ServerSession

    +

    Returns void

  • Returns boolean

    whether this session is currently in a transaction or not

    +
  • Returns the number of listeners listening for the event named eventName. +If listener is provided, it will return how many times the listener is found +in the list of the listeners of the event.

    +

    Type Parameters

    • EventKey extends "ended"

    Parameters

    Returns number

    v3.2.0

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends "ended"

    Parameters

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.1.101

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends "ended"

    Parameters

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.3.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "ended"

    Parameters

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "ended"

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Returns a copy of the array of listeners for the event named eventName, +including any wrappers (such as those created by .once()).

    +
    import { EventEmitter } from 'node:events';
    const emitter = new EventEmitter();
    emitter.once('log', () => console.log('log once'));

    // Returns a new Array with a function `onceWrapper` which has a property
    // `listener` which contains the original listener bound above
    const listeners = emitter.rawListeners('log');
    const logFnWrapper = listeners[0];

    // Logs "log once" to the console and does not unbind the `once` event
    logFnWrapper.listener();

    // Logs "log once" to the console and removes the listener
    logFnWrapper();

    emitter.on('log', () => console.log('log persistently'));
    // Will return a new Array with a single function bound by `.on()` above
    const newListeners = emitter.rawListeners('log');

    // Logs "log persistently" twice
    newListeners[0]();
    emitter.emit('log'); +
    + +

    Type Parameters

    • EventKey extends "ended"

    Parameters

    Returns ClientSessionEvents[EventKey][]

    v9.4.0

    +
  • Removes all listeners, or those of the specified eventName.

    +

    It is bad practice to remove listeners added elsewhere in the code, +particularly when the EventEmitter instance was created by some other +component or module (e.g. sockets or file streams).

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "ended"

    Parameters

    • Optionalevent: string | symbol | EventKey

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "ended"

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • By default EventEmitters will print a warning if more than 10 listeners are +added for a particular event. This is a useful default that helps finding +memory leaks. The emitter.setMaxListeners() method allows the limit to be +modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • n: number

    Returns this

    v0.3.5

    +
  • Starts a new transaction with the given options.

    +

    Parameters

    Returns void

    IMPORTANT: Running operations in parallel is not supported during a transaction. The use of Promise.all, +Promise.allSettled, Promise.race, etc to parallelize operations inside a transaction is +undefined behaviour.

    +
  • This is here to ensure that ClientSession is never serialized to BSON.

    +

    Returns never

  • Starts a transaction and runs a provided function, ensuring the commitTransaction is always attempted when all operations run in the function have completed.

    +

    IMPORTANT: This method requires the function passed in to return a Promise. That promise must be made by await-ing all operations in such a way that rejections are propagated to the returned promise.

    +

    IMPORTANT: Running operations in parallel is not supported during a transaction. The use of Promise.all, +Promise.allSettled, Promise.race, etc to parallelize operations inside a transaction is +undefined behaviour.

    +

    Type Parameters

    • T = any

    Parameters

    Returns Promise<T>

    A raw command response or undefined

    +
      +
    • If all operations successfully complete and the commitTransaction operation is successful, then the provided function will return the result of the provided function.
    • +
    • If the transaction is unable to complete or an error is thrown from within the provided function, then the provided function will throw an error. +
        +
      • If the transaction is manually aborted within the provided function it will not throw.
      • +
      +
    • +
    • If the driver needs to attempt to retry the operations, the provided function may be called multiple times.
    • +
    +

    Checkout a descriptive example here:

    +

    https://www.mongodb.com/blog/post/quick-start-nodejs--mongodb--how-to-implement-transactions

    +

    If a command inside withTransaction fails:

    +
      +
    • It may cause the transaction on the server to be aborted.
    • +
    • This situation is normally handled transparently by the driver.
    • +
    • However, if the application catches such an error and does not rethrow it, the driver will not be able to determine whether the transaction was aborted or not.
    • +
    • The driver will then retry the transaction indefinitely.
    • +
    +

    To avoid this situation, the application must not silently handle errors within the provided function. +If the application needs to handle errors within, it must await all operations such that if an operation is rejected it becomes the rejection of the callback function passed into withTransaction.

    +
  • Experimental

    Listens once to the abort event on the provided signal.

    +

    Listening to the abort event on abort signals is unsafe and may +lead to resource leaks since another third party with the signal can +call e.stopImmediatePropagation(). Unfortunately Node.js cannot change +this since it would violate the web standard. Additionally, the original +API makes it easy to forget to remove listeners.

    +

    This API allows safely using AbortSignals in Node.js APIs by solving these +two issues by listening to the event such that stopImmediatePropagation does +not prevent the listener from running.

    +

    Returns a disposable so that it may be unsubscribed from more easily.

    +
    import { addAbortListener } from 'node:events';

    function example(signal) {
    let disposable;
    try {
    signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
    disposable = addAbortListener(signal, (e) => {
    // Do something when signal is aborted.
    });
    } finally {
    disposable?.[Symbol.dispose]();
    }
    } +
    + +

    Parameters

    • signal: AbortSignal
    • resource: ((event: Event) => void)
        • (event): void
        • Parameters

          • event: Event

          Returns void

    Returns Disposable

    Disposable that removes the abort listener.

    +

    v20.5.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +

    For EventEmitters this behaves exactly the same as calling .listeners on +the emitter.

    +

    For EventTargets this is the only way to get the event listeners for the +event target. This is useful for debugging and diagnostic purposes.

    +
    import { getEventListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    const listener = () => console.log('Events are fun');
    ee.on('foo', listener);
    console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
    }
    {
    const et = new EventTarget();
    const listener = () => console.log('Events are fun');
    et.addEventListener('foo', listener);
    console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget
    • name: string | symbol

    Returns Function[]

    v15.2.0, v14.17.0

    +
  • Returns the currently set max amount of listeners.

    +

    For EventEmitters this behaves exactly the same as calling .getMaxListeners on +the emitter.

    +

    For EventTargets this is the only way to get the max event listeners for the +event target. If the number of event handlers on a single EventTarget exceeds +the max set, the EventTarget will print a warning.

    +
    import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    console.log(getMaxListeners(ee)); // 10
    setMaxListeners(11, ee);
    console.log(getMaxListeners(ee)); // 11
    }
    {
    const et = new EventTarget();
    console.log(getMaxListeners(et)); // 10
    setMaxListeners(11, et);
    console.log(getMaxListeners(et)); // 11
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget

    Returns number

    v19.9.0

    +
  • A class method that returns the number of listeners for the given eventName registered on the given emitter.

    +
    import { EventEmitter, listenerCount } from 'node:events';

    const myEmitter = new EventEmitter();
    myEmitter.on('event', () => {});
    myEmitter.on('event', () => {});
    console.log(listenerCount(myEmitter, 'event'));
    // Prints: 2 +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>

      The emitter to query

      +
    • eventName: string | symbol

      The event name

      +

    Returns number

    v0.9.12

    +

    Since v3.2.0 - Use listenerCount instead.

    +
  • import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo')) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here +
    + +

    Returns an AsyncIterator that iterates eventName events. It will throw +if the EventEmitter emits 'error'. It removes all listeners when +exiting the loop. The value returned by each iteration is an array +composed of the emitted event arguments.

    +

    An AbortSignal can be used to cancel waiting on events:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ac = new AbortController();

    (async () => {
    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo', { signal: ac.signal })) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here
    })();

    process.nextTick(() => ac.abort()); +
    + +

    Use the close option to specify an array of event names that will end the iteration:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    ee.emit('close');
    });

    for await (const event of on(ee, 'foo', { close: ['close'] })) {
    console.log(event); // prints ['bar'] [42]
    }
    // the loop will exit after 'close' is emitted
    console.log('done'); // prints 'done' +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

    An AsyncIterator that iterates eventName events emitted by the emitter

    +

    v13.6.0, v12.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

  • Creates a Promise that is fulfilled when the EventEmitter emits the given +event or that is rejected if the EventEmitter emits 'error' while waiting. +The Promise will resolve with an array of all the arguments emitted to the +given event.

    +

    This method is intentionally generic and works with the web platform EventTarget interface, which has no special'error' event +semantics and does not listen to the 'error' event.

    +
    import { once, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    process.nextTick(() => {
    ee.emit('myevent', 42);
    });

    const [value] = await once(ee, 'myevent');
    console.log(value);

    const err = new Error('kaboom');
    process.nextTick(() => {
    ee.emit('error', err);
    });

    try {
    await once(ee, 'myevent');
    } catch (err) {
    console.error('error happened', err);
    } +
    + +

    The special handling of the 'error' event is only used when events.once() is used to wait for another event. If events.once() is used to wait for the +'error' event itself, then it is treated as any other kind of event without +special handling:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();

    once(ee, 'error')
    .then(([err]) => console.log('ok', err.message))
    .catch((err) => console.error('error', err.message));

    ee.emit('error', new Error('boom'));

    // Prints: ok boom +
    + +

    An AbortSignal can be used to cancel waiting for the event:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();
    const ac = new AbortController();

    async function foo(emitter, event, signal) {
    try {
    await once(emitter, event, { signal });
    console.log('event emitted!');
    } catch (error) {
    if (error.name === 'AbortError') {
    console.error('Waiting for the event was canceled!');
    } else {
    console.error('There was an error', error.message);
    }
    }
    }

    foo(ee, 'foo', ac.signal);
    ac.abort(); // Abort waiting for the event
    ee.emit('foo'); // Prints: Waiting for the event was canceled! +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

    v11.13.0, v10.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

  • import { setMaxListeners, EventEmitter } from 'node:events';

    const target = new EventTarget();
    const emitter = new EventEmitter();

    setMaxListeners(5, target, emitter); +
    + +

    Parameters

    • Optionaln: number

      A non-negative number. The maximum number of listeners per EventTarget event.

      +
    • Rest...eventTargets: (EventEmitter<DefaultEventMap> | EventTarget)[]

    Returns void

    v15.4.0

    +
diff --git a/docs/6.9/classes/Collection.html b/docs/6.9/classes/Collection.html new file mode 100644 index 0000000000..8f300b3051 --- /dev/null +++ b/docs/6.9/classes/Collection.html @@ -0,0 +1,276 @@ +Collection | mongodb

Class Collection<TSchema>

The Collection class is an internal class that embodies a MongoDB collection +allowing for insert/find/update/delete and other command operation on that MongoDB collection.

+

COLLECTION Cannot directly be instantiated

+
import { MongoClient } from 'mongodb';

interface Pet {
name: string;
kind: 'dog' | 'cat' | 'fish';
}

const client = new MongoClient('mongodb://localhost:27017');
const pets = client.db().collection<Pet>('pets');

const petCursor = pets.find();

for await (const pet of petCursor) {
console.log(`${pet.name} is a ${pet.kind}!`);
} +
+ +

Type Parameters

Accessors

  • get dbName(): string
  • The name of the database this collection belongs to

    +

    Returns string

  • get namespace(): string
  • The namespace of this collection, in the format ${this.dbName}.${this.collectionName}

    +

    Returns string

  • get readConcern(): undefined | ReadConcern
  • The current readConcern of the collection. If not explicitly defined for +this collection, will be inherited from the parent DB

    +

    Returns undefined | ReadConcern

  • get readPreference(): undefined | ReadPreference
  • The current readPreference of the collection. If not explicitly defined for +this collection, will be inherited from the parent DB

    +

    Returns undefined | ReadPreference

  • get writeConcern(): undefined | WriteConcern
  • The current writeConcern of the collection. If not explicitly defined for +this collection, will be inherited from the parent DB

    +

    Returns undefined | WriteConcern

Methods

  • Perform a bulkWrite operation without a fluent API

    +

    Legal operation types are

    +
      +
    • insertOne
    • +
    • replaceOne
    • +
    • updateOne
    • +
    • updateMany
    • +
    • deleteOne
    • +
    • deleteMany
    • +
    +

    If documents passed in do not contain the _id field, +one will be added to each of the documents missing it by the driver, mutating the document. This behavior +can be overridden by setting the forceServerObjectId flag.

    +

    Parameters

    Returns Promise<BulkWriteResult>

    MongoDriverError if operations is not an array

    +
  • An estimated count of matching documents in the db to a filter.

    +

    NOTE: This method has been deprecated, since it does not provide an accurate count of the documents +in a collection. To obtain an accurate count of documents in the collection, use Collection#countDocuments| countDocuments. +To obtain an estimated count of all documents in the collection, use Collection#estimatedDocumentCount| estimatedDocumentCount.

    +

    Parameters

    Returns Promise<number>

    use Collection#countDocuments| countDocuments or Collection#estimatedDocumentCount| estimatedDocumentCount instead

    +
  • Creates an index on the db and collection collection.

    +

    Parameters

    Returns Promise<string>

    const collection = client.db('foo').collection('bar');

    await collection.createIndex({ a: 1, b: -1 });

    // Alternate syntax for { c: 1, d: -1 } that ensures order of indexes
    await collection.createIndex([ [c, 1], [d, -1] ]);

    // Equivalent to { e: 1 }
    await collection.createIndex('e');

    // Equivalent to { f: 1, g: 1 }
    await collection.createIndex(['f', 'g'])

    // Equivalent to { h: 1, i: -1 }
    await collection.createIndex([ { h: 1 }, { i: -1 } ]);

    // Equivalent to { j: 1, k: -1, l: 2d }
    await collection.createIndex(['j', ['k', -1], { l: '2d' }]) +
    + +
  • Creates multiple indexes in the collection, this method is only supported for +MongoDB 2.6 or higher. Earlier version of MongoDB will throw a command not supported +error.

    +

    Note: Unlike Collection#createIndex| createIndex, this function takes in raw index specifications. +Index specifications are defined here.

    +

    Parameters

    Returns Promise<string[]>

    const collection = client.db('foo').collection('bar');
    await collection.createIndexes([
    // Simple index on field fizz
    {
    key: { fizz: 1 },
    }
    // wildcard index
    {
    key: { '$**': 1 }
    },
    // named index on darmok and jalad
    {
    key: { darmok: 1, jalad: -1 }
    name: 'tanagra'
    }
    ]); +
    + +
  • Creates a single search index for the collection.

    +

    Parameters

    Returns Promise<string>

    A promise that resolves to the name of the new search index.

    +

    Only available when used against a 7.0+ Atlas cluster.

    +
  • Creates multiple search indexes for the current collection.

    +

    Parameters

    Returns Promise<string[]>

    A promise that resolves to an array of the newly created search index names.

    +

    Only available when used against a 7.0+ Atlas cluster.

    +
  • Drop the collection from the database, removing it permanently. New accesses will create a new collection.

    +

    Parameters

    Returns Promise<boolean>

  • Drops all indexes from this collection.

    +

    Parameters

    Returns Promise<boolean>

  • Deletes a search index by index name.

    +

    Parameters

    • name: string

      The name of the search index to be deleted.

      +

    Returns Promise<void>

    Only available when used against a 7.0+ Atlas cluster.

    +
  • Gets an estimate of the count of documents in a collection using collection metadata. +This will always run a count command on all server versions.

    +

    due to an oversight in versions 5.0.0-5.0.8 of MongoDB, the count command, +which estimatedDocumentCount uses in its implementation, was not included in v1 of +the Stable API, and so users of the Stable API with estimatedDocumentCount are +recommended to upgrade their server version to 5.0.9+ or set apiStrict: false to avoid +encountering errors.

    +

    Parameters

    Returns Promise<number>

  • Checks if one or more indexes exist on the collection, fails on first non-existing index

    +

    Parameters

    • indexes: string | string[]

      One or more index names to check.

      +
    • Optionaloptions: AbstractCursorOptions

      Optional settings for the command

      +

    Returns Promise<boolean>

  • Initiate an In order bulk write operation. Operations will be serially executed in the order they are added, creating a new operation for each switch in types.

    +

    Parameters

    Returns OrderedBulkOperation

    MongoNotConnectedError

    +

    NOTE: MongoClient must be connected prior to calling this method due to a known limitation in this legacy implementation. +However, collection.bulkWrite() provides an equivalent API that does not require prior connecting.

    +
  • Initiate an Out of order batch write operation. All operations will be buffered into insert/update/remove commands executed out of order.

    +

    Parameters

    Returns UnorderedBulkOperation

    MongoNotConnectedError

    +

    NOTE: MongoClient must be connected prior to calling this method due to a known limitation in this legacy implementation. +However, collection.bulkWrite() provides an equivalent API that does not require prior connecting.

    +
  • Returns if the collection is a capped collection

    +

    Parameters

    Returns Promise<boolean>

  • Updates a search index by replacing the existing index definition with the provided definition.

    +

    Parameters

    • name: string

      The name of the search index to update.

      +
    • definition: Document

      The new search index definition.

      +

    Returns Promise<void>

    Only available when used against a 7.0+ Atlas cluster.

    +
  • Create a new Change Stream, watching for new changes (insertions, updates, replacements, deletions, and invalidations) in this collection.

    +

    Type Parameters

    Parameters

    • pipeline: Document[] = []

      An array of pipeline stages through which to pass change stream documents. This allows for filtering (using $match) and manipulating the change stream documents.

      +
    • options: ChangeStreamOptions = {}

      Optional settings for the command

      +

    Returns ChangeStream<TLocal, TChange>

    watch() accepts two generic arguments for distinct use cases:

    +
      +
    • The first is to override the schema that may be defined for this specific collection
    • +
    • The second is to override the shape of the change stream document entirely, if it is not provided the type will default to ChangeStreamDocument of the first argument
    • +
    +

    By just providing the first argument I can type the change to be ChangeStreamDocument<{ _id: number }>

    +
    collection.watch<{ _id: number }>()
    .on('change', change => console.log(change._id.toFixed(4))); +
    + +

    Passing a second argument provides a way to reflect the type changes caused by an advanced pipeline. +Here, we are using a pipeline to have MongoDB filter for insert changes only and add a comment. +No need start from scratch on the ChangeStreamInsertDocument type! +By using an intersection we can save time and ensure defaults remain the same type!

    +
    collection
    .watch<Schema, ChangeStreamInsertDocument<Schema> & { comment: string }>([
    { $addFields: { comment: 'big changes' } },
    { $match: { operationType: 'insert' } }
    ])
    .on('change', change => {
    change.comment.startsWith('big');
    change.operationType === 'insert';
    // No need to narrow in code because the generics did that for us!
    expectType<Schema>(change.fullDocument);
    }); +
    + +
diff --git a/docs/6.9/classes/CommandFailedEvent.html b/docs/6.9/classes/CommandFailedEvent.html new file mode 100644 index 0000000000..e12f0fb550 --- /dev/null +++ b/docs/6.9/classes/CommandFailedEvent.html @@ -0,0 +1,14 @@ +CommandFailedEvent | mongodb

Class CommandFailedEvent

An event indicating the failure of a given command

+

Properties

address: string
commandName: string
connectionId?: string | number

Driver generated connection id

+
duration: number
failure: Error
requestId: number
serverConnectionId: null | bigint

Server generated connection id +Distinct from the connection id and is returned by the hello or legacy hello response as "connectionId" from the server on 4.2+.

+
serviceId?: ObjectId

Accessors

diff --git a/docs/6.9/classes/CommandStartedEvent.html b/docs/6.9/classes/CommandStartedEvent.html new file mode 100644 index 0000000000..a3abb63aa3 --- /dev/null +++ b/docs/6.9/classes/CommandStartedEvent.html @@ -0,0 +1,16 @@ +CommandStartedEvent | mongodb

Class CommandStartedEvent

An event indicating the start of a given command

+

Properties

address: string
command: Document
commandName: string
commandObj?: Document
connectionId?: string | number

Driver generated connection id

+
databaseName: string
requestId: number
serverConnectionId: null | bigint

Server generated connection id +Distinct from the connection id and is returned by the hello or legacy hello response as "connectionId" +from the server on 4.2+.

+
serviceId?: ObjectId

Accessors

diff --git a/docs/6.9/classes/CommandSucceededEvent.html b/docs/6.9/classes/CommandSucceededEvent.html new file mode 100644 index 0000000000..cf05b8b09d --- /dev/null +++ b/docs/6.9/classes/CommandSucceededEvent.html @@ -0,0 +1,14 @@ +CommandSucceededEvent | mongodb

Class CommandSucceededEvent

An event indicating the success of a given command

+

Properties

address: string
commandName: string
connectionId?: string | number

Driver generated connection id

+
duration: number
reply: unknown
requestId: number
serverConnectionId: null | bigint

Server generated connection id +Distinct from the connection id and is returned by the hello or legacy hello response as "connectionId" from the server on 4.2+.

+
serviceId?: ObjectId

Accessors

diff --git a/docs/6.9/classes/ConnectionCheckOutFailedEvent.html b/docs/6.9/classes/ConnectionCheckOutFailedEvent.html new file mode 100644 index 0000000000..5fa83aeff6 --- /dev/null +++ b/docs/6.9/classes/ConnectionCheckOutFailedEvent.html @@ -0,0 +1,13 @@ +ConnectionCheckOutFailedEvent | mongodb

Class ConnectionCheckOutFailedEvent

An event published when a request to check a connection out fails

+

Hierarchy (view full)

Properties

Properties

address: string

The address (host/port pair) of the pool

+
durationMS: number

The time it took to check out the connection. +More specifically, the time elapsed between +emitting a ConnectionCheckOutStartedEvent +and emitting this event as part of the same check out.

+
reason: string

The reason the attempt to check out failed

+
time: Date

A timestamp when the event was created

+
diff --git a/docs/6.9/classes/ConnectionCheckOutStartedEvent.html b/docs/6.9/classes/ConnectionCheckOutStartedEvent.html new file mode 100644 index 0000000000..c7f0f576ba --- /dev/null +++ b/docs/6.9/classes/ConnectionCheckOutStartedEvent.html @@ -0,0 +1,6 @@ +ConnectionCheckOutStartedEvent | mongodb

Class ConnectionCheckOutStartedEvent

An event published when a request to check a connection out begins

+

Hierarchy (view full)

Properties

Properties

address: string

The address (host/port pair) of the pool

+
time: Date

A timestamp when the event was created

+
diff --git a/docs/6.9/classes/ConnectionCheckedInEvent.html b/docs/6.9/classes/ConnectionCheckedInEvent.html new file mode 100644 index 0000000000..d6489082c5 --- /dev/null +++ b/docs/6.9/classes/ConnectionCheckedInEvent.html @@ -0,0 +1,8 @@ +ConnectionCheckedInEvent | mongodb

Class ConnectionCheckedInEvent

An event published when a connection is checked into the connection pool

+

Hierarchy (view full)

Properties

Properties

address: string

The address (host/port pair) of the pool

+
connectionId: number | "<monitor>"

The id of the connection

+
time: Date

A timestamp when the event was created

+
diff --git a/docs/6.9/classes/ConnectionCheckedOutEvent.html b/docs/6.9/classes/ConnectionCheckedOutEvent.html new file mode 100644 index 0000000000..66ccdb1ea0 --- /dev/null +++ b/docs/6.9/classes/ConnectionCheckedOutEvent.html @@ -0,0 +1,13 @@ +ConnectionCheckedOutEvent | mongodb

Class ConnectionCheckedOutEvent

An event published when a connection is checked out of the connection pool

+

Hierarchy (view full)

Properties

address: string

The address (host/port pair) of the pool

+
connectionId: number | "<monitor>"

The id of the connection

+
durationMS: number

The time it took to check out the connection. +More specifically, the time elapsed between +emitting a ConnectionCheckOutStartedEvent +and emitting this event as part of the same checking out.

+
time: Date

A timestamp when the event was created

+
diff --git a/docs/6.9/classes/ConnectionClosedEvent.html b/docs/6.9/classes/ConnectionClosedEvent.html new file mode 100644 index 0000000000..d046a8510d --- /dev/null +++ b/docs/6.9/classes/ConnectionClosedEvent.html @@ -0,0 +1,11 @@ +ConnectionClosedEvent | mongodb

Class ConnectionClosedEvent

An event published when a connection is closed

+

Hierarchy (view full)

Properties

address: string

The address (host/port pair) of the pool

+
connectionId: number | "<monitor>"

The id of the connection

+
reason: string

The reason the connection was closed

+
serviceId?: ObjectId
time: Date

A timestamp when the event was created

+
diff --git a/docs/6.9/classes/ConnectionCreatedEvent.html b/docs/6.9/classes/ConnectionCreatedEvent.html new file mode 100644 index 0000000000..655a51eaf1 --- /dev/null +++ b/docs/6.9/classes/ConnectionCreatedEvent.html @@ -0,0 +1,8 @@ +ConnectionCreatedEvent | mongodb

Class ConnectionCreatedEvent

An event published when a connection pool creates a new connection

+

Hierarchy (view full)

Properties

Properties

address: string

The address (host/port pair) of the pool

+
connectionId: number | "<monitor>"

A monotonically increasing, per-pool id for the newly created connection

+
time: Date

A timestamp when the event was created

+
diff --git a/docs/6.9/classes/ConnectionPoolClearedEvent.html b/docs/6.9/classes/ConnectionPoolClearedEvent.html new file mode 100644 index 0000000000..645f5c1818 --- /dev/null +++ b/docs/6.9/classes/ConnectionPoolClearedEvent.html @@ -0,0 +1,7 @@ +ConnectionPoolClearedEvent | mongodb

Class ConnectionPoolClearedEvent

An event published when a connection pool is cleared

+

Hierarchy (view full)

Properties

address: string

The address (host/port pair) of the pool

+
interruptInUseConnections?: boolean
time: Date

A timestamp when the event was created

+
diff --git a/docs/6.9/classes/ConnectionPoolClosedEvent.html b/docs/6.9/classes/ConnectionPoolClosedEvent.html new file mode 100644 index 0000000000..c7e9357fdf --- /dev/null +++ b/docs/6.9/classes/ConnectionPoolClosedEvent.html @@ -0,0 +1,6 @@ +ConnectionPoolClosedEvent | mongodb

Class ConnectionPoolClosedEvent

An event published when a connection pool is closed

+

Hierarchy (view full)

Properties

Properties

address: string

The address (host/port pair) of the pool

+
time: Date

A timestamp when the event was created

+
diff --git a/docs/6.9/classes/ConnectionPoolCreatedEvent.html b/docs/6.9/classes/ConnectionPoolCreatedEvent.html new file mode 100644 index 0000000000..147e1dfc12 --- /dev/null +++ b/docs/6.9/classes/ConnectionPoolCreatedEvent.html @@ -0,0 +1,8 @@ +ConnectionPoolCreatedEvent | mongodb

Class ConnectionPoolCreatedEvent

An event published when a connection pool is created

+

Hierarchy (view full)

Properties

Properties

address: string

The address (host/port pair) of the pool

+
options: Pick<ConnectionPoolOptions,
    | "maxConnecting"
    | "maxIdleTimeMS"
    | "maxPoolSize"
    | "minPoolSize"
    | "waitQueueTimeoutMS">

The options used to create this connection pool

+
time: Date

A timestamp when the event was created

+
diff --git a/docs/6.9/classes/ConnectionPoolMonitoringEvent.html b/docs/6.9/classes/ConnectionPoolMonitoringEvent.html new file mode 100644 index 0000000000..2dd6796683 --- /dev/null +++ b/docs/6.9/classes/ConnectionPoolMonitoringEvent.html @@ -0,0 +1,6 @@ +ConnectionPoolMonitoringEvent | mongodb

Class ConnectionPoolMonitoringEventAbstract

The base export class for all monitoring events published from the connection pool

+

Hierarchy (view full)

Properties

Properties

address: string

The address (host/port pair) of the pool

+
time: Date

A timestamp when the event was created

+
diff --git a/docs/6.9/classes/ConnectionPoolReadyEvent.html b/docs/6.9/classes/ConnectionPoolReadyEvent.html new file mode 100644 index 0000000000..93ee8b7243 --- /dev/null +++ b/docs/6.9/classes/ConnectionPoolReadyEvent.html @@ -0,0 +1,6 @@ +ConnectionPoolReadyEvent | mongodb

Class ConnectionPoolReadyEvent

An event published when a connection pool is ready

+

Hierarchy (view full)

Properties

Properties

address: string

The address (host/port pair) of the pool

+
time: Date

A timestamp when the event was created

+
diff --git a/docs/6.9/classes/ConnectionReadyEvent.html b/docs/6.9/classes/ConnectionReadyEvent.html new file mode 100644 index 0000000000..0041c08d74 --- /dev/null +++ b/docs/6.9/classes/ConnectionReadyEvent.html @@ -0,0 +1,17 @@ +ConnectionReadyEvent | mongodb

Class ConnectionReadyEvent

An event published when a connection is ready for use

+

Hierarchy (view full)

Properties

address: string

The address (host/port pair) of the pool

+
connectionId: number | "<monitor>"

The id of the connection

+
durationMS: number

The time it took to establish the connection. +In accordance with the definition of establishment of a connection +specified by ConnectionPoolOptions.maxConnecting, +it is the time elapsed between emitting a ConnectionCreatedEvent +and emitting this event as part of the same checking out.

+

Naturally, when establishing a connection is part of checking out, +this duration is not greater than +ConnectionCheckedOutEvent.duration.

+
time: Date

A timestamp when the event was created

+
diff --git a/docs/6.9/classes/Db.html b/docs/6.9/classes/Db.html new file mode 100644 index 0000000000..d6630b2aa8 --- /dev/null +++ b/docs/6.9/classes/Db.html @@ -0,0 +1,133 @@ +Db | mongodb

Class Db

The Db class is a class that represents a MongoDB Database.

+
import { MongoClient } from 'mongodb';

interface Pet {
name: string;
kind: 'dog' | 'cat' | 'fish';
}

const client = new MongoClient('mongodb://localhost:27017');
const db = client.db();

// Create a collection that validates our union
await db.createCollection<Pet>('pets', {
validator: { $expr: { $in: ['$kind', ['dog', 'cat', 'fish']] } }
}) +
+ +

Constructors

  • Creates a new Db instance.

    +

    Db name cannot contain a dot, the server may apply more restrictions when an operation is run.

    +

    Parameters

    • client: MongoClient

      The MongoClient for the database.

      +
    • databaseName: string

      The name of the database this instance represents.

      +
    • Optionaloptions: DbOptions

      Optional settings for Db construction.

      +

    Returns Db

Properties

SYSTEM_COMMAND_COLLECTION: string = CONSTANTS.SYSTEM_COMMAND_COLLECTION
SYSTEM_INDEX_COLLECTION: string = CONSTANTS.SYSTEM_INDEX_COLLECTION
SYSTEM_JS_COLLECTION: string = CONSTANTS.SYSTEM_JS_COLLECTION
SYSTEM_NAMESPACE_COLLECTION: string = CONSTANTS.SYSTEM_NAMESPACE_COLLECTION
SYSTEM_PROFILE_COLLECTION: string = CONSTANTS.SYSTEM_PROFILE_COLLECTION
SYSTEM_USER_COLLECTION: string = CONSTANTS.SYSTEM_USER_COLLECTION

Accessors

  • get readPreference(): ReadPreference
  • The current readPreference of the Db. If not explicitly defined for +this Db, will be inherited from the parent MongoClient

    +

    Returns ReadPreference

  • get secondaryOk(): boolean
  • Check if a secondary can be used (because the read preference is not set to primary)

    +

    Returns boolean

Methods

  • Returns a reference to a MongoDB Collection. If it does not exist it will be created implicitly.

    +

    Collection namespace validation is performed server-side.

    +

    Type Parameters

    Parameters

    Returns Collection<TSchema>

    return the new Collection instance

    +
  • Execute a command

    +

    Parameters

    Returns Promise<Document>

    This command does not inherit options from the MongoClient.

    +

    The driver will ensure the following fields are attached to the command sent to the server:

    +
      +
    • lsid - sourced from an implicit session or options.session
    • +
    • $readPreference - defaults to primary or can be configured by options.readPreference
    • +
    • $db - sourced from the name of this database
    • +
    +

    If the client has a serverApi setting:

    +
      +
    • apiVersion
    • +
    • apiStrict
    • +
    • apiDeprecationErrors
    • +
    +

    When in a transaction:

    +
      +
    • readConcern - sourced from readConcern set on the TransactionOptions
    • +
    • writeConcern - sourced from writeConcern set on the TransactionOptions
    • +
    +

    Attaching any of the above fields to the command will have no effect as the driver will overwrite the value.

    +
  • Creates an index on the db and collection.

    +

    Parameters

    • name: string

      Name of the collection to create the index on.

      +
    • indexSpec: IndexSpecification

      Specify the field to index, or an index specification

      +
    • Optionaloptions: CreateIndexesOptions

      Optional settings for the command

      +

    Returns Promise<string>

  • Drop a collection from the database, removing it permanently. New accesses will create a new collection.

    +

    Parameters

    • name: string

      Name of collection to drop

      +
    • Optionaloptions: DropCollectionOptions

      Optional settings for the command

      +

    Returns Promise<boolean>

  • Drop a database, removing it permanently from the server.

    +

    Parameters

    Returns Promise<boolean>

  • Retrieve the current profiling Level for MongoDB

    +

    Parameters

    Returns Promise<string>

  • Remove a user from a database

    +

    Parameters

    • username: string

      The username to remove

      +
    • Optionaloptions: CommandOperationOptions

      Optional settings for the command

      +

    Returns Promise<boolean>

  • Rename a collection.

    +

    Type Parameters

    Parameters

    • fromCollection: string

      Name of current collection to rename

      +
    • toCollection: string

      New name of of the collection

      +
    • Optionaloptions: RenameOptions

      Optional settings for the command

      +

    Returns Promise<Collection<TSchema>>

    This operation does not inherit options from the MongoClient.

    +
  • A low level cursor API providing basic driver functionality:

    +
      +
    • ClientSession management
    • +
    • ReadPreference for server selection
    • +
    • Running getMores automatically when a local batch is exhausted
    • +
    +

    Parameters

    • command: Document

      The command that will start a cursor on the server.

      +
    • Optionaloptions: RunCursorCommandOptions

      Configurations for running the command, bson options will apply to getMores

      +

    Returns RunCommandCursor

  • Create a new Change Stream, watching for new changes (insertions, updates, +replacements, deletions, and invalidations) in this database. Will ignore all +changes to system collections.

    +

    Type Parameters

    Parameters

    • pipeline: Document[] = []

      An array of pipeline stages through which to pass change stream documents. This allows for filtering (using $match) and manipulating the change stream documents.

      +
    • options: ChangeStreamOptions = {}

      Optional settings for the command

      +

    Returns ChangeStream<TSchema, TChange>

    watch() accepts two generic arguments for distinct use cases:

    +
      +
    • The first is to provide the schema that may be defined for all the collections within this database
    • +
    • The second is to override the shape of the change stream document entirely, if it is not provided the type will default to ChangeStreamDocument of the first argument
    • +
    +
diff --git a/docs/6.9/classes/FindCursor.html b/docs/6.9/classes/FindCursor.html new file mode 100644 index 0000000000..0016edc3e6 --- /dev/null +++ b/docs/6.9/classes/FindCursor.html @@ -0,0 +1,569 @@ +FindCursor | mongodb

Class FindCursor<TSchema>

Type Parameters

  • TSchema = any

Hierarchy (view full)

Properties

[asyncDispose]: (() => Promise<void>)

An alias for AbstractCursor.close|AbstractCursor.close().

+
captureRejections: boolean

Value: boolean

+

Change the default captureRejections option on all new EventEmitter objects.

+

v13.4.0, v12.16.0

+
captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

+

See how to write a custom rejection handler.

+

v13.4.0, v12.16.0

+
CLOSE: "close" = ...
defaultMaxListeners: number

By default, a maximum of 10 listeners can be registered for any single +event. This limit can be changed for individual EventEmitter instances +using the emitter.setMaxListeners(n) method. To change the default +for allEventEmitter instances, the events.defaultMaxListeners property +can be used. If this value is not a positive number, a RangeError is thrown.

+

Take caution when setting the events.defaultMaxListeners because the +change affects all EventEmitter instances, including those created before +the change is made. However, calling emitter.setMaxListeners(n) still has +precedence over events.defaultMaxListeners.

+

This is not a hard limit. The EventEmitter instance will allow +more listeners to be added but will output a trace warning to stderr indicating +that a "possible EventEmitter memory leak" has been detected. For any single +EventEmitter, the emitter.getMaxListeners() and emitter.setMaxListeners() methods can be used to +temporarily avoid this warning:

+
import { EventEmitter } from 'node:events';
const emitter = new EventEmitter();
emitter.setMaxListeners(emitter.getMaxListeners() + 1);
emitter.once('event', () => {
// do stuff
emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
}); +
+ +

The --trace-warnings command-line flag can be used to display the +stack trace for such warnings.

+

The emitted warning can be inspected with process.on('warning') and will +have the additional emitter, type, and count properties, referring to +the event emitter instance, the event's name and the number of attached +listeners, respectively. +Its name property is set to 'MaxListenersExceededWarning'.

+

v0.11.2

+
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

+

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted. Therefore, the process will still crash if no +regular 'error' listener is installed.

+

v13.6.0, v12.17.0

+

Accessors

  • get closed(): boolean
  • The cursor is closed and all remaining locally buffered documents have been iterated.

    +

    Returns boolean

  • get id(): undefined | Long
  • The cursor has no id until it receives a response from the initial cursor creating command.

    +

    It is non-zero for as long as the database has an open cursor.

    +

    The initiating command may receive a zero id if the entire result is in the firstBatch.

    +

    Returns undefined | Long

  • get killed(): boolean
  • A killCursors command was attempted on this cursor. +This is performed if the cursor id is non zero.

    +

    Returns boolean

Methods

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest...args: AnyRest

    Returns void

  • Add a cursor flag to the cursor

    +

    Parameters

    • flag:
          | "tailable"
          | "oplogReplay"
          | "noCursorTimeout"
          | "awaitData"
          | "partial"
          | "exhaust"

      The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial' -.

      +
    • value: boolean

      The flag boolean value.

      +

    Returns this

  • Add a query modifier to the cursor query

    +

    Parameters

    • name: string

      The query modifier (must start with $, such as $orderby etc)

      +
    • value:
          | string
          | number
          | boolean
          | Document

      The modifier value.

      +

    Returns this

  • Set the collation options for the cursor.

    +

    Parameters

    • value: CollationOptions

      The cursor collation options (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields).

      +

    Returns this

  • Add a comment to the cursor query allowing for tracking the comment in the log.

    +

    Parameters

    • value: string

      The comment attached to this query.

      +

    Returns this

  • Get the count of documents for this cursor

    +

    Parameters

    Returns Promise<number>

    Use collection.estimatedDocumentCount or collection.countDocuments instead

    +
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns boolean

    v0.1.26

    +
  • Returns an array listing the events for which the emitter has registered +listeners. The values in the array are strings or Symbols.

    +
    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ] +
    + +

    Returns string[]

    v6.0.0

    +
  • Iterates over all the documents for this cursor using the iterator, callback pattern.

    +

    If the iterator returns false, iteration will stop.

    +

    Parameters

    • iterator: ((doc: TSchema) => boolean | void)

      The iteration callback.

      +
        • (doc): boolean | void
        • Parameters

          Returns boolean | void

    Returns Promise<void>

      +
    • Will be removed in a future release. Use for await...of instead.
    • +
    +
  • Set the cursor hint

    +

    Parameters

    • hint: Hint

      If specified, then the query system will only consider plans using the hinted index.

      +

    Returns this

  • Set the limit for the cursor.

    +

    Parameters

    • value: number

      The limit for the cursor query.

      +

    Returns this

  • Returns the number of listeners listening for the event named eventName. +If listener is provided, it will return how many times the listener is found +in the list of the listeners of the event.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns number

    v3.2.0

    +
  • Map all documents using the provided function +If there is a transform set on the cursor, that will be called first and the result passed to +this function's transform.

    +

    Type Parameters

    • T

    Parameters

    • transform: ((doc: TSchema) => T)

      The mapping transformation method.

      +

    Returns FindCursor<T>

    Note Cursors use null internally to indicate that there are no more documents in the cursor. Providing a mapping +function that maps values to null will result in the cursor closing itself before it has finished iterating +all documents. This will not result in a memory leak, just surprising behavior. For example:

    +
    const cursor = collection.find({});
    cursor.map(() => null);

    const documents = await cursor.toArray();
    // documents is always [], regardless of how many documents are in the collection. +
    + +

    Other falsey values are allowed:

    +
    const cursor = collection.find({});
    cursor.map(() => '');

    const documents = await cursor.toArray();
    // documents is now an array of empty strings +
    + +

    Note for Typescript Users: adding a transform changes the return type of the iteration of this cursor, +it does not return a new instance of a cursor. This means when calling map, +you should always assign the result to a new variable in order to get a correctly typed cursor variable. +Take note of the following example:

    +
    const cursor: FindCursor<Document> = coll.find();
    const mappedCursor: FindCursor<number> = cursor.map(doc => Object.keys(doc).length);
    const keyCounts: number[] = await mappedCursor.toArray(); // cursor.toArray() still returns Document[] +
    + +
  • Set the cursor max

    +

    Parameters

    • max: Document

      Specify a $max value to specify the exclusive upper bound for a specific index in order to constrain the results of find(). The $max specifies the upper bound for all keys of a specific index in order.

      +

    Returns this

  • Set a maxAwaitTimeMS on a tailing cursor query to allow to customize the timeout value for the option awaitData (Only supported on MongoDB 3.2 or higher, ignored otherwise)

    +

    Parameters

    • value: number

      Number of milliseconds to wait before aborting the tailed query.

      +

    Returns this

  • Set a maxTimeMS on the cursor query, allowing for hard timeout limits on queries (Only supported on MongoDB 2.6 or higher)

    +

    Parameters

    • value: number

      Number of milliseconds to wait before aborting the query.

      +

    Returns this

  • Set the cursor min

    +

    Parameters

    • min: Document

      Specify a $min value to specify the inclusive lower bound for a specific index in order to constrain the results of find(). The $min specifies the lower bound for all keys of a specific index in order.

      +

    Returns this

  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.1.101

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.3.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Add a project stage to the aggregation pipeline

    +

    Type Parameters

    Parameters

    Returns FindCursor<T>

    In order to strictly type this function you must provide an interface +that represents the effect of your projection on the result documents.

    +

    By default chaining a projection to your cursor changes the returned type to the generic +Document type. +You should specify a parameterized type to have assertions on your final results.

    +
    // Best way
    const docs: FindCursor<{ a: number }> = cursor.project<{ a: number }>({ _id: 0, a: true });
    // Flexible way
    const docs: FindCursor<Document> = cursor.project({ _id: 0, a: true }); +
    + +
    const cursor: FindCursor<{ a: number; b: string }> = coll.find();
    const projectCursor = cursor.project<{ a: number }>({ _id: 0, a: true });
    const aPropOnlyArray: {a: number}[] = await projectCursor.toArray();

    // or always use chaining and save the final cursor

    const cursor = coll.find().project<{ a: string }>({
    _id: 0,
    a: { $convert: { input: '$a', to: 'string' }
    }}); +
    + +
  • Returns a copy of the array of listeners for the event named eventName, +including any wrappers (such as those created by .once()).

    +
    import { EventEmitter } from 'node:events';
    const emitter = new EventEmitter();
    emitter.once('log', () => console.log('log once'));

    // Returns a new Array with a function `onceWrapper` which has a property
    // `listener` which contains the original listener bound above
    const listeners = emitter.rawListeners('log');
    const logFnWrapper = listeners[0];

    // Logs "log once" to the console and does not unbind the `once` event
    logFnWrapper.listener();

    // Logs "log once" to the console and removes the listener
    logFnWrapper();

    emitter.on('log', () => console.log('log persistently'));
    // Will return a new Array with a single function bound by `.on()` above
    const newListeners = emitter.rawListeners('log');

    // Logs "log persistently" twice
    newListeners[0]();
    emitter.emit('log'); +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns AbstractCursorEvents[EventKey][]

    v9.4.0

    +
  • Removes all listeners, or those of the specified eventName.

    +

    It is bad practice to remove listeners added elsewhere in the code, +particularly when the EventEmitter instance was created by some other +component or module (e.g. sockets or file streams).

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    • Optionalevent: string | symbol | EventKey

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Set the cursor returnKey. +If set to true, modifies the cursor to only return the index field or fields for the results of the query, rather than documents. +If set to true and the query does not use an index to perform the read operation, the returned documents will not contain any fields.

    +

    Parameters

    • value: boolean

      the returnKey value.

      +

    Returns this

  • Rewind this cursor to its uninitialized state. Any options that are present on the cursor will +remain in effect. Iterating this cursor will cause new queries to be sent to the server, even +if the resultant data has already been retrieved by this cursor.

    +

    Returns void

  • By default EventEmitters will print a warning if more than 10 listeners are +added for a particular event. This is a useful default that helps finding +memory leaks. The emitter.setMaxListeners() method allows the limit to be +modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • n: number

    Returns this

    v0.3.5

    +
  • Modifies the output of a query by adding a field $recordId to matching documents. $recordId is the internal key which uniquely identifies a document in a collection.

    +

    Parameters

    • value: boolean

      The $showDiskLoc option has now been deprecated and replaced with the showRecordId field. $showDiskLoc will still be accepted for OP_QUERY stye find.

      +

    Returns this

  • Set the skip for the cursor.

    +

    Parameters

    • value: number

      The skip for the cursor query.

      +

    Returns this

  • Sets the sort order of the cursor query.

    +

    Parameters

    • sort: Sort

      The key or keys set for the sort.

      +
    • Optionaldirection: SortDirection

      The direction of the sorting (1 or -1).

      +

    Returns this

  • Returns an array of documents. The caller is responsible for making sure that there +is enough memory to store the results. Note that the array only contains partial +results when this cursor had been previously accessed. In that case, +cursor.rewind() can be used to reset the cursor.

    +

    Returns Promise<TSchema[]>

  • Experimental

    Listens once to the abort event on the provided signal.

    +

    Listening to the abort event on abort signals is unsafe and may +lead to resource leaks since another third party with the signal can +call e.stopImmediatePropagation(). Unfortunately Node.js cannot change +this since it would violate the web standard. Additionally, the original +API makes it easy to forget to remove listeners.

    +

    This API allows safely using AbortSignals in Node.js APIs by solving these +two issues by listening to the event such that stopImmediatePropagation does +not prevent the listener from running.

    +

    Returns a disposable so that it may be unsubscribed from more easily.

    +
    import { addAbortListener } from 'node:events';

    function example(signal) {
    let disposable;
    try {
    signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
    disposable = addAbortListener(signal, (e) => {
    // Do something when signal is aborted.
    });
    } finally {
    disposable?.[Symbol.dispose]();
    }
    } +
    + +

    Parameters

    • signal: AbortSignal
    • resource: ((event: Event) => void)
        • (event): void
        • Parameters

          • event: Event

          Returns void

    Returns Disposable

    Disposable that removes the abort listener.

    +

    v20.5.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +

    For EventEmitters this behaves exactly the same as calling .listeners on +the emitter.

    +

    For EventTargets this is the only way to get the event listeners for the +event target. This is useful for debugging and diagnostic purposes.

    +
    import { getEventListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    const listener = () => console.log('Events are fun');
    ee.on('foo', listener);
    console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
    }
    {
    const et = new EventTarget();
    const listener = () => console.log('Events are fun');
    et.addEventListener('foo', listener);
    console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget
    • name: string | symbol

    Returns Function[]

    v15.2.0, v14.17.0

    +
  • Returns the currently set max amount of listeners.

    +

    For EventEmitters this behaves exactly the same as calling .getMaxListeners on +the emitter.

    +

    For EventTargets this is the only way to get the max event listeners for the +event target. If the number of event handlers on a single EventTarget exceeds +the max set, the EventTarget will print a warning.

    +
    import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    console.log(getMaxListeners(ee)); // 10
    setMaxListeners(11, ee);
    console.log(getMaxListeners(ee)); // 11
    }
    {
    const et = new EventTarget();
    console.log(getMaxListeners(et)); // 10
    setMaxListeners(11, et);
    console.log(getMaxListeners(et)); // 11
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget

    Returns number

    v19.9.0

    +
  • A class method that returns the number of listeners for the given eventName registered on the given emitter.

    +
    import { EventEmitter, listenerCount } from 'node:events';

    const myEmitter = new EventEmitter();
    myEmitter.on('event', () => {});
    myEmitter.on('event', () => {});
    console.log(listenerCount(myEmitter, 'event'));
    // Prints: 2 +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>

      The emitter to query

      +
    • eventName: string | symbol

      The event name

      +

    Returns number

    v0.9.12

    +

    Since v3.2.0 - Use listenerCount instead.

    +
  • import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo')) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here +
    + +

    Returns an AsyncIterator that iterates eventName events. It will throw +if the EventEmitter emits 'error'. It removes all listeners when +exiting the loop. The value returned by each iteration is an array +composed of the emitted event arguments.

    +

    An AbortSignal can be used to cancel waiting on events:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ac = new AbortController();

    (async () => {
    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo', { signal: ac.signal })) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here
    })();

    process.nextTick(() => ac.abort()); +
    + +

    Use the close option to specify an array of event names that will end the iteration:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    ee.emit('close');
    });

    for await (const event of on(ee, 'foo', { close: ['close'] })) {
    console.log(event); // prints ['bar'] [42]
    }
    // the loop will exit after 'close' is emitted
    console.log('done'); // prints 'done' +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

    An AsyncIterator that iterates eventName events emitted by the emitter

    +

    v13.6.0, v12.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

  • Creates a Promise that is fulfilled when the EventEmitter emits the given +event or that is rejected if the EventEmitter emits 'error' while waiting. +The Promise will resolve with an array of all the arguments emitted to the +given event.

    +

    This method is intentionally generic and works with the web platform EventTarget interface, which has no special'error' event +semantics and does not listen to the 'error' event.

    +
    import { once, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    process.nextTick(() => {
    ee.emit('myevent', 42);
    });

    const [value] = await once(ee, 'myevent');
    console.log(value);

    const err = new Error('kaboom');
    process.nextTick(() => {
    ee.emit('error', err);
    });

    try {
    await once(ee, 'myevent');
    } catch (err) {
    console.error('error happened', err);
    } +
    + +

    The special handling of the 'error' event is only used when events.once() is used to wait for another event. If events.once() is used to wait for the +'error' event itself, then it is treated as any other kind of event without +special handling:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();

    once(ee, 'error')
    .then(([err]) => console.log('ok', err.message))
    .catch((err) => console.error('error', err.message));

    ee.emit('error', new Error('boom'));

    // Prints: ok boom +
    + +

    An AbortSignal can be used to cancel waiting for the event:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();
    const ac = new AbortController();

    async function foo(emitter, event, signal) {
    try {
    await once(emitter, event, { signal });
    console.log('event emitted!');
    } catch (error) {
    if (error.name === 'AbortError') {
    console.error('Waiting for the event was canceled!');
    } else {
    console.error('There was an error', error.message);
    }
    }
    }

    foo(ee, 'foo', ac.signal);
    ac.abort(); // Abort waiting for the event
    ee.emit('foo'); // Prints: Waiting for the event was canceled! +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

    v11.13.0, v10.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

  • import { setMaxListeners, EventEmitter } from 'node:events';

    const target = new EventTarget();
    const emitter = new EventEmitter();

    setMaxListeners(5, target, emitter); +
    + +

    Parameters

    • Optionaln: number

      A non-negative number. The maximum number of listeners per EventTarget event.

      +
    • Rest...eventTargets: (EventEmitter<DefaultEventMap> | EventTarget)[]

    Returns void

    v15.4.0

    +
diff --git a/docs/6.9/classes/FindOperators.html b/docs/6.9/classes/FindOperators.html new file mode 100644 index 0000000000..6d4dec0e7d --- /dev/null +++ b/docs/6.9/classes/FindOperators.html @@ -0,0 +1,22 @@ +FindOperators | mongodb

Class FindOperators

A builder object that is returned from BulkOperationBase#find. +Is used to build a write operation that involves a query filter.

+

Properties

bulkOperation: BulkOperationBase

Methods

  • Specifies arrayFilters for UpdateOne or UpdateMany bulk operations.

    +

    Parameters

    Returns this

  • Upsert modifier for update bulk operation, noting that this operation is an upsert.

    +

    Returns this

diff --git a/docs/6.9/classes/GridFSBucket.html b/docs/6.9/classes/GridFSBucket.html new file mode 100644 index 0000000000..203c8a207c --- /dev/null +++ b/docs/6.9/classes/GridFSBucket.html @@ -0,0 +1,458 @@ +GridFSBucket | mongodb

Class GridFSBucket

Constructor for a streaming GridFS interface

+

Hierarchy (view full)

Constructors

Properties

captureRejections: boolean

Value: boolean

+

Change the default captureRejections option on all new EventEmitter objects.

+

v13.4.0, v12.16.0

+
captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

+

See how to write a custom rejection handler.

+

v13.4.0, v12.16.0

+
defaultMaxListeners: number

By default, a maximum of 10 listeners can be registered for any single +event. This limit can be changed for individual EventEmitter instances +using the emitter.setMaxListeners(n) method. To change the default +for allEventEmitter instances, the events.defaultMaxListeners property +can be used. If this value is not a positive number, a RangeError is thrown.

+

Take caution when setting the events.defaultMaxListeners because the +change affects all EventEmitter instances, including those created before +the change is made. However, calling emitter.setMaxListeners(n) still has +precedence over events.defaultMaxListeners.

+

This is not a hard limit. The EventEmitter instance will allow +more listeners to be added but will output a trace warning to stderr indicating +that a "possible EventEmitter memory leak" has been detected. For any single +EventEmitter, the emitter.getMaxListeners() and emitter.setMaxListeners() methods can be used to +temporarily avoid this warning:

+
import { EventEmitter } from 'node:events';
const emitter = new EventEmitter();
emitter.setMaxListeners(emitter.getMaxListeners() + 1);
emitter.once('event', () => {
// do stuff
emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
}); +
+ +

The --trace-warnings command-line flag can be used to display the +stack trace for such warnings.

+

The emitted warning can be inspected with process.on('warning') and will +have the additional emitter, type, and count properties, referring to +the event emitter instance, the event's name and the number of attached +listeners, respectively. +Its name property is set to 'MaxListenersExceededWarning'.

+

v0.11.2

+
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

+

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted. Therefore, the process will still crash if no +regular 'error' listener is installed.

+

v13.6.0, v12.17.0

+
INDEX: "index" = ...

When the first call to openUploadStream is made, the upload stream will +check to see if it needs to create the proper indexes on the chunks and +files collections. This event is fired either when 1) it determines that +no index creation is necessary, 2) when it successfully creates the +necessary indexes.

+

Methods

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest...args: AnyRest

    Returns void

  • Deletes a file with the given id

    +

    Parameters

    Returns Promise<void>

  • Removes this bucket's files collection, followed by its chunks collection.

    +

    Returns Promise<void>

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Type Parameters

    • EventKey extends "index"

    Parameters

    Returns boolean

    v0.1.26

    +
  • Returns an array listing the events for which the emitter has registered +listeners. The values in the array are strings or Symbols.

    +
    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ] +
    + +

    Returns string[]

    v6.0.0

    +
  • Returns the number of listeners listening for the event named eventName. +If listener is provided, it will return how many times the listener is found +in the list of the listeners of the event.

    +

    Type Parameters

    • EventKey extends "index"

    Parameters

    Returns number

    v3.2.0

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends "index"

    Parameters

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.1.101

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends "index"

    Parameters

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.3.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "index"

    Parameters

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "index"

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Returns a copy of the array of listeners for the event named eventName, +including any wrappers (such as those created by .once()).

    +
    import { EventEmitter } from 'node:events';
    const emitter = new EventEmitter();
    emitter.once('log', () => console.log('log once'));

    // Returns a new Array with a function `onceWrapper` which has a property
    // `listener` which contains the original listener bound above
    const listeners = emitter.rawListeners('log');
    const logFnWrapper = listeners[0];

    // Logs "log once" to the console and does not unbind the `once` event
    logFnWrapper.listener();

    // Logs "log once" to the console and removes the listener
    logFnWrapper();

    emitter.on('log', () => console.log('log persistently'));
    // Will return a new Array with a single function bound by `.on()` above
    const newListeners = emitter.rawListeners('log');

    // Logs "log persistently" twice
    newListeners[0]();
    emitter.emit('log'); +
    + +

    Type Parameters

    • EventKey extends "index"

    Parameters

    Returns GridFSBucketEvents[EventKey][]

    v9.4.0

    +
  • Removes all listeners, or those of the specified eventName.

    +

    It is bad practice to remove listeners added elsewhere in the code, +particularly when the EventEmitter instance was created by some other +component or module (e.g. sockets or file streams).

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "index"

    Parameters

    • Optionalevent: string | symbol | EventKey

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "index"

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Renames the file with the given _id to the given string

    +

    Parameters

    • id: ObjectId

      the id of the file to rename

      +
    • filename: string

      new name for the file

      +

    Returns Promise<void>

  • By default EventEmitters will print a warning if more than 10 listeners are +added for a particular event. This is a useful default that helps finding +memory leaks. The emitter.setMaxListeners() method allows the limit to be +modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • n: number

    Returns this

    v0.3.5

    +
  • Experimental

    Listens once to the abort event on the provided signal.

    +

    Listening to the abort event on abort signals is unsafe and may +lead to resource leaks since another third party with the signal can +call e.stopImmediatePropagation(). Unfortunately Node.js cannot change +this since it would violate the web standard. Additionally, the original +API makes it easy to forget to remove listeners.

    +

    This API allows safely using AbortSignals in Node.js APIs by solving these +two issues by listening to the event such that stopImmediatePropagation does +not prevent the listener from running.

    +

    Returns a disposable so that it may be unsubscribed from more easily.

    +
    import { addAbortListener } from 'node:events';

    function example(signal) {
    let disposable;
    try {
    signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
    disposable = addAbortListener(signal, (e) => {
    // Do something when signal is aborted.
    });
    } finally {
    disposable?.[Symbol.dispose]();
    }
    } +
    + +

    Parameters

    • signal: AbortSignal
    • resource: ((event: Event) => void)
        • (event): void
        • Parameters

          • event: Event

          Returns void

    Returns Disposable

    Disposable that removes the abort listener.

    +

    v20.5.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +

    For EventEmitters this behaves exactly the same as calling .listeners on +the emitter.

    +

    For EventTargets this is the only way to get the event listeners for the +event target. This is useful for debugging and diagnostic purposes.

    +
    import { getEventListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    const listener = () => console.log('Events are fun');
    ee.on('foo', listener);
    console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
    }
    {
    const et = new EventTarget();
    const listener = () => console.log('Events are fun');
    et.addEventListener('foo', listener);
    console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget
    • name: string | symbol

    Returns Function[]

    v15.2.0, v14.17.0

    +
  • Returns the currently set max amount of listeners.

    +

    For EventEmitters this behaves exactly the same as calling .getMaxListeners on +the emitter.

    +

    For EventTargets this is the only way to get the max event listeners for the +event target. If the number of event handlers on a single EventTarget exceeds +the max set, the EventTarget will print a warning.

    +
    import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    console.log(getMaxListeners(ee)); // 10
    setMaxListeners(11, ee);
    console.log(getMaxListeners(ee)); // 11
    }
    {
    const et = new EventTarget();
    console.log(getMaxListeners(et)); // 10
    setMaxListeners(11, et);
    console.log(getMaxListeners(et)); // 11
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget

    Returns number

    v19.9.0

    +
  • A class method that returns the number of listeners for the given eventName registered on the given emitter.

    +
    import { EventEmitter, listenerCount } from 'node:events';

    const myEmitter = new EventEmitter();
    myEmitter.on('event', () => {});
    myEmitter.on('event', () => {});
    console.log(listenerCount(myEmitter, 'event'));
    // Prints: 2 +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>

      The emitter to query

      +
    • eventName: string | symbol

      The event name

      +

    Returns number

    v0.9.12

    +

    Since v3.2.0 - Use listenerCount instead.

    +
  • import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo')) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here +
    + +

    Returns an AsyncIterator that iterates eventName events. It will throw +if the EventEmitter emits 'error'. It removes all listeners when +exiting the loop. The value returned by each iteration is an array +composed of the emitted event arguments.

    +

    An AbortSignal can be used to cancel waiting on events:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ac = new AbortController();

    (async () => {
    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo', { signal: ac.signal })) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here
    })();

    process.nextTick(() => ac.abort()); +
    + +

    Use the close option to specify an array of event names that will end the iteration:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    ee.emit('close');
    });

    for await (const event of on(ee, 'foo', { close: ['close'] })) {
    console.log(event); // prints ['bar'] [42]
    }
    // the loop will exit after 'close' is emitted
    console.log('done'); // prints 'done' +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

    An AsyncIterator that iterates eventName events emitted by the emitter

    +

    v13.6.0, v12.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

  • Creates a Promise that is fulfilled when the EventEmitter emits the given +event or that is rejected if the EventEmitter emits 'error' while waiting. +The Promise will resolve with an array of all the arguments emitted to the +given event.

    +

    This method is intentionally generic and works with the web platform EventTarget interface, which has no special'error' event +semantics and does not listen to the 'error' event.

    +
    import { once, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    process.nextTick(() => {
    ee.emit('myevent', 42);
    });

    const [value] = await once(ee, 'myevent');
    console.log(value);

    const err = new Error('kaboom');
    process.nextTick(() => {
    ee.emit('error', err);
    });

    try {
    await once(ee, 'myevent');
    } catch (err) {
    console.error('error happened', err);
    } +
    + +

    The special handling of the 'error' event is only used when events.once() is used to wait for another event. If events.once() is used to wait for the +'error' event itself, then it is treated as any other kind of event without +special handling:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();

    once(ee, 'error')
    .then(([err]) => console.log('ok', err.message))
    .catch((err) => console.error('error', err.message));

    ee.emit('error', new Error('boom'));

    // Prints: ok boom +
    + +

    An AbortSignal can be used to cancel waiting for the event:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();
    const ac = new AbortController();

    async function foo(emitter, event, signal) {
    try {
    await once(emitter, event, { signal });
    console.log('event emitted!');
    } catch (error) {
    if (error.name === 'AbortError') {
    console.error('Waiting for the event was canceled!');
    } else {
    console.error('There was an error', error.message);
    }
    }
    }

    foo(ee, 'foo', ac.signal);
    ac.abort(); // Abort waiting for the event
    ee.emit('foo'); // Prints: Waiting for the event was canceled! +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

    v11.13.0, v10.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

  • import { setMaxListeners, EventEmitter } from 'node:events';

    const target = new EventTarget();
    const emitter = new EventEmitter();

    setMaxListeners(5, target, emitter); +
    + +

    Parameters

    • Optionaln: number

      A non-negative number. The maximum number of listeners per EventTarget event.

      +
    • Rest...eventTargets: (EventEmitter<DefaultEventMap> | EventTarget)[]

    Returns void

    v15.4.0

    +
diff --git a/docs/6.9/classes/GridFSBucketReadStream.html b/docs/6.9/classes/GridFSBucketReadStream.html new file mode 100644 index 0000000000..283944e35d --- /dev/null +++ b/docs/6.9/classes/GridFSBucketReadStream.html @@ -0,0 +1,1172 @@ +GridFSBucketReadStream | mongodb

Class GridFSBucketReadStream

A readable stream that enables you to read buffers from GridFS.

+

Do not instantiate this class directly. Use openDownloadStream() instead.

+

Hierarchy

  • Readable
    • GridFSBucketReadStream

Properties

closed: boolean

Is true after 'close' has been emitted.

+

v18.0.0

+
destroyed: boolean

Is true after readable.destroy() has been called.

+

v8.0.0

+
errored: null | Error

Returns error if the stream has been destroyed with an error.

+

v18.0.0

+
readable: boolean

Is true if it is safe to call read, which means +the stream has not been destroyed or emitted 'error' or 'end'.

+

v11.4.0

+
readableAborted: boolean

Returns whether the stream was destroyed or errored before emitting 'end'.

+

v16.8.0

+
readableDidRead: boolean

Returns whether 'data' has been emitted.

+

v16.7.0, v14.18.0

+
readableEncoding: null | BufferEncoding

Getter for the property encoding of a given Readable stream. The encoding property can be set using the setEncoding method.

+

v12.7.0

+
readableEnded: boolean

Becomes true when 'end' event is emitted.

+

v12.9.0

+
readableFlowing: null | boolean

This property reflects the current state of a Readable stream as described +in the Three states section.

+

v9.4.0

+
readableHighWaterMark: number

Returns the value of highWaterMark passed when creating this Readable.

+

v9.3.0

+
readableLength: number

This property contains the number of bytes (or objects) in the queue +ready to be read. The value provides introspection data regarding +the status of the highWaterMark.

+

v9.4.0

+
readableObjectMode: boolean

Getter for the property objectMode of a given Readable stream.

+

v12.3.0

+
captureRejections: boolean

Value: boolean

+

Change the default captureRejections option on all new EventEmitter objects.

+

v13.4.0, v12.16.0

+
captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

+

See how to write a custom rejection handler.

+

v13.4.0, v12.16.0

+
defaultMaxListeners: number

By default, a maximum of 10 listeners can be registered for any single +event. This limit can be changed for individual EventEmitter instances +using the emitter.setMaxListeners(n) method. To change the default +for allEventEmitter instances, the events.defaultMaxListeners property +can be used. If this value is not a positive number, a RangeError is thrown.

+

Take caution when setting the events.defaultMaxListeners because the +change affects all EventEmitter instances, including those created before +the change is made. However, calling emitter.setMaxListeners(n) still has +precedence over events.defaultMaxListeners.

+

This is not a hard limit. The EventEmitter instance will allow +more listeners to be added but will output a trace warning to stderr indicating +that a "possible EventEmitter memory leak" has been detected. For any single +EventEmitter, the emitter.getMaxListeners() and emitter.setMaxListeners() methods can be used to +temporarily avoid this warning:

+
import { EventEmitter } from 'node:events';
const emitter = new EventEmitter();
emitter.setMaxListeners(emitter.getMaxListeners() + 1);
emitter.once('event', () => {
// do stuff
emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
}); +
+ +

The --trace-warnings command-line flag can be used to display the +stack trace for such warnings.

+

The emitted warning can be inspected with process.on('warning') and will +have the additional emitter, type, and count properties, referring to +the event emitter instance, the event's name and the number of attached +listeners, respectively. +Its name property is set to 'MaxListenersExceededWarning'.

+

v0.11.2

+
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

+

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted. Therefore, the process will still crash if no +regular 'error' listener is installed.

+

v13.6.0, v12.17.0

+
FILE: "file" = ...

Fires when the stream loaded the file document corresponding to the provided id.

+

Methods

  • Parameters

    • callback: ((error?: null | Error) => void)
        • (error?): void
        • Parameters

          • Optionalerror: null | Error

          Returns void

    Returns void

  • Parameters

    • error: null | Error
    • callback: ((error?: null | Error) => void)
        • (error?): void
        • Parameters

          • Optionalerror: null | Error

          Returns void

    Returns void

  • Calls readable.destroy() with an AbortError and returns a promise that fulfills when the stream is finished.

    +

    Returns Promise<void>

    v20.4.0

    +
  • Returns AsyncIterableIterator<any>

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest...args: AnyRest

    Returns void

  • Marks this stream as aborted (will never push another data event) +and kills the underlying cursor. Will emit the 'end' event, and then +the 'close' event once the cursor is successfully killed.

    +

    Returns Promise<void>

  • Event emitter +The defined events on documents including:

    +
      +
    1. close
    2. +
    3. data
    4. +
    5. end
    6. +
    7. error
    8. +
    9. pause
    10. +
    11. readable
    12. +
    13. resume
    14. +
    +

    Parameters

    • event: "close"
    • listener: (() => void)
        • (): void
        • Returns void

    Returns this

  • Alias for emitter.on(eventName, listener).

    +

    Parameters

    • event: "data"
    • listener: ((chunk: any) => void)
        • (chunk): void
        • Parameters

          • chunk: any

          Returns void

    Returns this

    v0.1.26

    +
  • Alias for emitter.on(eventName, listener).

    +

    Parameters

    • event: "end"
    • listener: (() => void)
        • (): void
        • Returns void

    Returns this

    v0.1.26

    +
  • Alias for emitter.on(eventName, listener).

    +

    Parameters

    • event: "error"
    • listener: ((err: Error) => void)
        • (err): void
        • Parameters

          • err: Error

          Returns void

    Returns this

    v0.1.26

    +
  • Alias for emitter.on(eventName, listener).

    +

    Parameters

    • event: "pause"
    • listener: (() => void)
        • (): void
        • Returns void

    Returns this

    v0.1.26

    +
  • Alias for emitter.on(eventName, listener).

    +

    Parameters

    • event: "readable"
    • listener: (() => void)
        • (): void
        • Returns void

    Returns this

    v0.1.26

    +
  • Alias for emitter.on(eventName, listener).

    +

    Parameters

    • event: "resume"
    • listener: (() => void)
        • (): void
        • Returns void

    Returns this

    v0.1.26

    +
  • Alias for emitter.on(eventName, listener).

    +

    Parameters

    • event: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v0.1.26

    +
  • This method returns a new stream with chunks of the underlying stream paired with a counter +in the form [index, chunk]. The first index value is 0 and it increases by 1 for each chunk produced.

    +

    Parameters

    • Optionaloptions: Pick<ArrayOptions, "signal">

    Returns Readable

    a stream of indexed pairs.

    +

    v17.5.0

    +
  • Type Parameters

    • T extends ReadableStream

    Parameters

    • stream:
          | ComposeFnParam
          | T
          | Iterable<T>
          | AsyncIterable<T>
    • Optionaloptions: {
          signal: AbortSignal;
      }
      • signal: AbortSignal

    Returns T

  • Destroy the stream. Optionally emit an 'error' event, and emit a 'close' event (unless emitClose is set to false). After this call, the readable +stream will release any internal resources and subsequent calls to push() will be ignored.

    +

    Once destroy() has been called any further calls will be a no-op and no +further errors except from _destroy() may be emitted as 'error'.

    +

    Implementors should not override this method, but instead implement readable._destroy().

    +

    Parameters

    • Optionalerror: Error

      Error which will be passed as payload in 'error' event

      +

    Returns this

    v8.0.0

    +
  • This method returns a new stream with the first limit chunks dropped from the start.

    +

    Parameters

    • limit: number

      the number of chunks to drop from the readable.

      +
    • Optionaloptions: Pick<ArrayOptions, "signal">

    Returns Readable

    a stream with limit chunks dropped from the start.

    +

    v17.5.0

    +
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Parameters

    • event: "close"

    Returns boolean

    v0.1.26

    +
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Parameters

    • event: "data"
    • chunk: any

    Returns boolean

    v0.1.26

    +
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Parameters

    • event: "end"

    Returns boolean

    v0.1.26

    +
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Parameters

    • event: "error"
    • err: Error

    Returns boolean

    v0.1.26

    +
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Parameters

    • event: "pause"

    Returns boolean

    v0.1.26

    +
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Parameters

    • event: "readable"

    Returns boolean

    v0.1.26

    +
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Parameters

    • event: "resume"

    Returns boolean

    v0.1.26

    +
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Parameters

    • event: string | symbol
    • Rest...args: any[]

    Returns boolean

    v0.1.26

    +
  • Sets the 0-based offset in bytes to start streaming from. Throws +an error if this stream has entered flowing mode +(e.g. if you've already called on('data'))

    +

    Parameters

    • end: number = 0

      Offset in bytes to stop reading at

      +

    Returns this

  • Returns an array listing the events for which the emitter has registered +listeners. The values in the array are strings or Symbols.

    +
    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ] +
    + +

    Returns (string | symbol)[]

    v6.0.0

    +
  • This method is similar to Array.prototype.every and calls fn on each chunk in the stream +to check if all awaited return values are truthy value for fn. Once an fn call on a chunk +awaited return value is falsy, the stream is destroyed and the promise is fulfilled with false. +If all of the fn calls on the chunks return a truthy value, the promise is fulfilled with true.

    +

    Parameters

    • fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>)

      a function to call on each chunk of the stream. Async or not.

      +
        • (data, options?): boolean | Promise<boolean>
        • Parameters

          • data: any
          • Optionaloptions: Pick<ArrayOptions, "signal">

          Returns boolean | Promise<boolean>

    • Optionaloptions: ArrayOptions

    Returns Promise<boolean>

    a promise evaluating to true if fn returned a truthy value for every one of the chunks.

    +

    v17.5.0

    +
  • This method allows filtering the stream. For each chunk in the stream the fn function will be called +and if it returns a truthy value, the chunk will be passed to the result stream. +If the fn function returns a promise - that promise will be awaited.

    +

    Parameters

    • fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>)

      a function to filter chunks from the stream. Async or not.

      +
        • (data, options?): boolean | Promise<boolean>
        • Parameters

          • data: any
          • Optionaloptions: Pick<ArrayOptions, "signal">

          Returns boolean | Promise<boolean>

    • Optionaloptions: ArrayOptions

    Returns Readable

    a stream filtered with the predicate fn.

    +

    v17.4.0, v16.14.0

    +
  • This method is similar to Array.prototype.find and calls fn on each chunk in the stream +to find a chunk with a truthy value for fn. Once an fn call's awaited return value is truthy, +the stream is destroyed and the promise is fulfilled with value for which fn returned a truthy value. +If all of the fn calls on the chunks return a falsy value, the promise is fulfilled with undefined.

    +

    Type Parameters

    • T

    Parameters

    • fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => data is T)

      a function to call on each chunk of the stream. Async or not.

      +
        • (data, options?): data is T
        • Parameters

          • data: any
          • Optionaloptions: Pick<ArrayOptions, "signal">

          Returns data is T

    • Optionaloptions: ArrayOptions

    Returns Promise<undefined | T>

    a promise evaluating to the first chunk for which fn evaluated with a truthy value, +or undefined if no element was found.

    +

    v17.5.0

    +
  • Parameters

    • fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>)
        • (data, options?): boolean | Promise<boolean>
        • Parameters

          • data: any
          • Optionaloptions: Pick<ArrayOptions, "signal">

          Returns boolean | Promise<boolean>

    • Optionaloptions: ArrayOptions

    Returns Promise<any>

  • This method returns a new stream by applying the given callback to each chunk of the stream +and then flattening the result.

    +

    It is possible to return a stream or another iterable or async iterable from fn and the result streams +will be merged (flattened) into the returned stream.

    +

    Parameters

    • fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => any)

      a function to map over every chunk in the stream. May be async. May be a stream or generator.

      +
        • (data, options?): any
        • Parameters

          • data: any
          • Optionaloptions: Pick<ArrayOptions, "signal">

          Returns any

    • Optionaloptions: ArrayOptions

    Returns Readable

    a stream flat-mapped with the function fn.

    +

    v17.5.0

    +
  • This method allows iterating a stream. For each chunk in the stream the fn function will be called. +If the fn function returns a promise - that promise will be awaited.

    +

    This method is different from for await...of loops in that it can optionally process chunks concurrently. +In addition, a forEach iteration can only be stopped by having passed a signal option +and aborting the related AbortController while for await...of can be stopped with break or return. +In either case the stream will be destroyed.

    +

    This method is different from listening to the 'data' event in that it uses the readable event +in the underlying machinary and can limit the number of concurrent fn calls.

    +

    Parameters

    • fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => void | Promise<void>)

      a function to call on each chunk of the stream. Async or not.

      +
        • (data, options?): void | Promise<void>
        • Parameters

          • data: any
          • Optionaloptions: Pick<ArrayOptions, "signal">

          Returns void | Promise<void>

    • Optionaloptions: ArrayOptions

    Returns Promise<void>

    a promise for when the stream has finished.

    +

    v17.5.0

    +
  • Returns the current max listener value for the EventEmitter which is either +set by emitter.setMaxListeners(n) or defaults to defaultMaxListeners.

    +

    Returns number

    v1.0.0

    +
  • The readable.isPaused() method returns the current operating state of the Readable. +This is used primarily by the mechanism that underlies the readable.pipe() method. +In most typical cases, there will be no reason to use this method directly.

    +
    const readable = new stream.Readable();

    readable.isPaused(); // === false
    readable.pause();
    readable.isPaused(); // === true
    readable.resume();
    readable.isPaused(); // === false +
    + +

    Returns boolean

    v0.11.14

    +
  • The iterator created by this method gives users the option to cancel the destruction +of the stream if the for await...of loop is exited by return, break, or throw, +or if the iterator should destroy the stream if the stream emitted an error during iteration.

    +

    Parameters

    • Optionaloptions: {
          destroyOnReturn?: boolean;
      }
      • OptionaldestroyOnReturn?: boolean

        When set to false, calling return on the async iterator, +or exiting a for await...of iteration using a break, return, or throw will not destroy the stream. +Default: true.

        +

    Returns AsyncIterableIterator<any>

    v16.3.0

    +
  • Returns the number of listeners listening for the event named eventName. +If listener is provided, it will return how many times the listener is found +in the list of the listeners of the event.

    +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event being listened for

      +
    • Optionallistener: Function

      The event handler function

      +

    Returns number

    v3.2.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    });
    console.log(util.inspect(server.listeners('connection')));
    // Prints: [ [Function] ] +
    + +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

    Returns Function[]

    v0.1.26

    +
  • This method allows mapping over the stream. The fn function will be called for every chunk in the stream. +If the fn function returns a promise - that promise will be awaited before being passed to the result stream.

    +

    Parameters

    • fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => any)

      a function to map over every chunk in the stream. Async or not.

      +
        • (data, options?): any
        • Parameters

          • data: any
          • Optionaloptions: Pick<ArrayOptions, "signal">

          Returns any

    • Optionaloptions: ArrayOptions

    Returns Readable

    a stream mapped with the function fn.

    +

    v17.4.0, v16.14.0

    +
  • Alias for emitter.removeListener().

    +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v10.0.0

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "close"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "data"
    • listener: ((chunk: any) => void)

      The callback function

      +
        • (chunk): void
        • Parameters

          • chunk: any

          Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "end"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "error"
    • listener: ((err: Error) => void)

      The callback function

      +
        • (err): void
        • Parameters

          • err: Error

          Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "pause"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "readable"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "resume"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: string | symbol
    • listener: ((...args: any[]) => void)

      The callback function

      +
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v0.1.101

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "close"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "data"
    • listener: ((chunk: any) => void)

      The callback function

      +
        • (chunk): void
        • Parameters

          • chunk: any

          Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "end"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "error"
    • listener: ((err: Error) => void)

      The callback function

      +
        • (err): void
        • Parameters

          • err: Error

          Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "pause"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "readable"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "resume"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: string | symbol
    • listener: ((...args: any[]) => void)

      The callback function

      +
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v0.3.0

    +
  • The readable.pause() method will cause a stream in flowing mode to stop +emitting 'data' events, switching out of flowing mode. Any data that +becomes available will remain in the internal buffer.

    +
    const readable = getReadableStreamSomehow();
    readable.on('data', (chunk) => {
    console.log(`Received ${chunk.length} bytes of data.`);
    readable.pause();
    console.log('There will be no additional data for 1 second.');
    setTimeout(() => {
    console.log('Now data will start flowing again.');
    readable.resume();
    }, 1000);
    }); +
    + +

    The readable.pause() method has no effect if there is a 'readable' event listener.

    +

    Returns this

    v0.9.4

    +
  • Type Parameters

    • T extends WritableStream

    Parameters

    • destination: T
    • Optionaloptions: {
          end?: boolean;
      }
      • Optionalend?: boolean

    Returns T

  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "close"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "data"
    • listener: ((chunk: any) => void)

      The callback function

      +
        • (chunk): void
        • Parameters

          • chunk: any

          Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "end"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "error"
    • listener: ((err: Error) => void)

      The callback function

      +
        • (err): void
        • Parameters

          • err: Error

          Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "pause"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "readable"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "resume"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: string | symbol
    • listener: ((...args: any[]) => void)

      The callback function

      +
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "close"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "data"
    • listener: ((chunk: any) => void)

      The callback function

      +
        • (chunk): void
        • Parameters

          • chunk: any

          Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "end"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "error"
    • listener: ((err: Error) => void)

      The callback function

      +
        • (err): void
        • Parameters

          • err: Error

          Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "pause"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "readable"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "resume"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: string | symbol
    • listener: ((...args: any[]) => void)

      The callback function

      +
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v6.0.0

    +
  • Parameters

    • chunk: any
    • Optionalencoding: BufferEncoding

    Returns boolean

  • Returns a copy of the array of listeners for the event named eventName, +including any wrappers (such as those created by .once()).

    +
    import { EventEmitter } from 'node:events';
    const emitter = new EventEmitter();
    emitter.once('log', () => console.log('log once'));

    // Returns a new Array with a function `onceWrapper` which has a property
    // `listener` which contains the original listener bound above
    const listeners = emitter.rawListeners('log');
    const logFnWrapper = listeners[0];

    // Logs "log once" to the console and does not unbind the `once` event
    logFnWrapper.listener();

    // Logs "log once" to the console and removes the listener
    logFnWrapper();

    emitter.on('log', () => console.log('log persistently'));
    // Will return a new Array with a single function bound by `.on()` above
    const newListeners = emitter.rawListeners('log');

    // Logs "log persistently" twice
    newListeners[0]();
    emitter.emit('log'); +
    + +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

    Returns Function[]

    v9.4.0

    +
  • The readable.read() method reads data out of the internal buffer and +returns it. If no data is available to be read, null is returned. By default, +the data is returned as a Buffer object unless an encoding has been +specified using the readable.setEncoding() method or the stream is operating +in object mode.

    +

    The optional size argument specifies a specific number of bytes to read. If +size bytes are not available to be read, null will be returned unless the +stream has ended, in which case all of the data remaining in the internal buffer +will be returned.

    +

    If the size argument is not specified, all of the data contained in the +internal buffer will be returned.

    +

    The size argument must be less than or equal to 1 GiB.

    +

    The readable.read() method should only be called on Readable streams +operating in paused mode. In flowing mode, readable.read() is called +automatically until the internal buffer is fully drained.

    +
    const readable = getReadableStreamSomehow();

    // 'readable' may be triggered multiple times as data is buffered in
    readable.on('readable', () => {
    let chunk;
    console.log('Stream is readable (new data received in buffer)');
    // Use a loop to make sure we read all currently available data
    while (null !== (chunk = readable.read())) {
    console.log(`Read ${chunk.length} bytes of data...`);
    }
    });

    // 'end' will be triggered once when there is no more data available
    readable.on('end', () => {
    console.log('Reached end of stream.');
    }); +
    + +

    Each call to readable.read() returns a chunk of data, or null. The chunks +are not concatenated. A while loop is necessary to consume all data +currently in the buffer. When reading a large file .read() may return null, +having consumed all buffered content so far, but there is still more data to +come not yet buffered. In this case a new 'readable' event will be emitted +when there is more data in the buffer. Finally the 'end' event will be +emitted when there is no more data to come.

    +

    Therefore to read a file's whole contents from a readable, it is necessary +to collect chunks across multiple 'readable' events:

    +
    const chunks = [];

    readable.on('readable', () => {
    let chunk;
    while (null !== (chunk = readable.read())) {
    chunks.push(chunk);
    }
    });

    readable.on('end', () => {
    const content = chunks.join('');
    }); +
    + +

    A Readable stream in object mode will always return a single item from +a call to readable.read(size), regardless of the value of the size argument.

    +

    If the readable.read() method returns a chunk of data, a 'data' event will +also be emitted.

    +

    Calling read after the 'end' event has +been emitted will return null. No runtime error will be raised.

    +

    Parameters

    • Optionalsize: number

      Optional argument to specify how much data to read.

      +

    Returns any

    v0.9.4

    +
  • This method calls fn on each chunk of the stream in order, passing it the result from the calculation +on the previous element. It returns a promise for the final value of the reduction.

    +

    If no initial value is supplied the first chunk of the stream is used as the initial value. +If the stream is empty, the promise is rejected with a TypeError with the ERR_INVALID_ARGS code property.

    +

    The reducer function iterates the stream element-by-element which means that there is no concurrency parameter +or parallelism. To perform a reduce concurrently, you can extract the async function to readable.map method.

    +

    Type Parameters

    • T = any

    Parameters

    • fn: ((previous: any, data: any, options?: Pick<ArrayOptions, "signal">) => T)

      a reducer function to call over every chunk in the stream. Async or not.

      +
        • (previous, data, options?): T
        • Parameters

          • previous: any
          • data: any
          • Optionaloptions: Pick<ArrayOptions, "signal">

          Returns T

    • Optionalinitial: undefined

      the initial value to use in the reduction.

      +
    • Optionaloptions: Pick<ArrayOptions, "signal">

    Returns Promise<T>

    a promise for the final value of the reduction.

    +

    v17.5.0

    +
  • Type Parameters

    • T = any

    Parameters

    • fn: ((previous: T, data: any, options?: Pick<ArrayOptions, "signal">) => T)
        • (previous, data, options?): T
        • Parameters

          • previous: T
          • data: any
          • Optionaloptions: Pick<ArrayOptions, "signal">

          Returns T

    • initial: T
    • Optionaloptions: Pick<ArrayOptions, "signal">

    Returns Promise<T>

  • Removes all listeners, or those of the specified eventName.

    +

    It is bad practice to remove listeners added elsewhere in the code, +particularly when the EventEmitter instance was created by some other +component or module (e.g. sockets or file streams).

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • OptionaleventName: string | symbol

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "close"
    • listener: (() => void)
        • (): void
        • Returns void

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "data"
    • listener: ((chunk: any) => void)
        • (chunk): void
        • Parameters

          • chunk: any

          Returns void

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "end"
    • listener: (() => void)
        • (): void
        • Returns void

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "error"
    • listener: ((err: Error) => void)
        • (err): void
        • Parameters

          • err: Error

          Returns void

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "pause"
    • listener: (() => void)
        • (): void
        • Returns void

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "readable"
    • listener: (() => void)
        • (): void
        • Returns void

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "resume"
    • listener: (() => void)
        • (): void
        • Returns void

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v0.1.26

    +
  • The readable.resume() method causes an explicitly paused Readable stream to +resume emitting 'data' events, switching the stream into flowing mode.

    +

    The readable.resume() method can be used to fully consume the data from a +stream without actually processing any of that data:

    +
    getReadableStreamSomehow()
    .resume()
    .on('end', () => {
    console.log('Reached the end, but did not read anything.');
    }); +
    + +

    The readable.resume() method has no effect if there is a 'readable' event listener.

    +

    Returns this

    v0.9.4

    +
  • The readable.setEncoding() method sets the character encoding for +data read from the Readable stream.

    +

    By default, no encoding is assigned and stream data will be returned as Buffer objects. Setting an encoding causes the stream data +to be returned as strings of the specified encoding rather than as Buffer objects. For instance, calling readable.setEncoding('utf8') will cause the +output data to be interpreted as UTF-8 data, and passed as strings. Calling readable.setEncoding('hex') will cause the data to be encoded in hexadecimal +string format.

    +

    The Readable stream will properly handle multi-byte characters delivered +through the stream that would otherwise become improperly decoded if simply +pulled from the stream as Buffer objects.

    +
    const readable = getReadableStreamSomehow();
    readable.setEncoding('utf8');
    readable.on('data', (chunk) => {
    assert.equal(typeof chunk, 'string');
    console.log('Got %d characters of string data:', chunk.length);
    }); +
    + +

    Parameters

    • encoding: BufferEncoding

      The encoding to use.

      +

    Returns this

    v0.9.4

    +
  • By default EventEmitters will print a warning if more than 10 listeners are +added for a particular event. This is a useful default that helps finding +memory leaks. The emitter.setMaxListeners() method allows the limit to be +modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • n: number

    Returns this

    v0.3.5

    +
  • This method is similar to Array.prototype.some and calls fn on each chunk in the stream +until the awaited return value is true (or any truthy value). Once an fn call on a chunk +awaited return value is truthy, the stream is destroyed and the promise is fulfilled with true. +If none of the fn calls on the chunks return a truthy value, the promise is fulfilled with false.

    +

    Parameters

    • fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>)

      a function to call on each chunk of the stream. Async or not.

      +
        • (data, options?): boolean | Promise<boolean>
        • Parameters

          • data: any
          • Optionaloptions: Pick<ArrayOptions, "signal">

          Returns boolean | Promise<boolean>

    • Optionaloptions: ArrayOptions

    Returns Promise<boolean>

    a promise evaluating to true if fn returned a truthy value for at least one of the chunks.

    +

    v17.5.0

    +
  • Sets the 0-based offset in bytes to start streaming from. Throws +an error if this stream has entered flowing mode +(e.g. if you've already called on('data'))

    +

    Parameters

    • start: number = 0

      0-based offset in bytes to start streaming from

      +

    Returns this

  • This method returns a new stream with the first limit chunks.

    +

    Parameters

    • limit: number

      the number of chunks to take from the readable.

      +
    • Optionaloptions: Pick<ArrayOptions, "signal">

    Returns Readable

    a stream with limit chunks taken.

    +

    v17.5.0

    +
  • This method allows easily obtaining the contents of a stream.

    +

    As this method reads the entire stream into memory, it negates the benefits of streams. It's intended +for interoperability and convenience, not as the primary way to consume streams.

    +

    Parameters

    • Optionaloptions: Pick<ArrayOptions, "signal">

    Returns Promise<any[]>

    a promise containing an array with the contents of the stream.

    +

    v17.5.0

    +
  • The readable.unpipe() method detaches a Writable stream previously attached +using the pipe method.

    +

    If the destination is not specified, then all pipes are detached.

    +

    If the destination is specified, but no pipe is set up for it, then +the method does nothing.

    +
    const fs = require('node:fs');
    const readable = getReadableStreamSomehow();
    const writable = fs.createWriteStream('file.txt');
    // All the data from readable goes into 'file.txt',
    // but only for the first second.
    readable.pipe(writable);
    setTimeout(() => {
    console.log('Stop writing to file.txt.');
    readable.unpipe(writable);
    console.log('Manually close the file stream.');
    writable.end();
    }, 1000); +
    + +

    Parameters

    • Optionaldestination: WritableStream

      Optional specific stream to unpipe

      +

    Returns this

    v0.9.4

    +
  • Passing chunk as null signals the end of the stream (EOF) and behaves the +same as readable.push(null), after which no more data can be written. The EOF +signal is put at the end of the buffer and any buffered data will still be +flushed.

    +

    The readable.unshift() method pushes a chunk of data back into the internal +buffer. This is useful in certain situations where a stream is being consumed by +code that needs to "un-consume" some amount of data that it has optimistically +pulled out of the source, so that the data can be passed on to some other party.

    +

    The stream.unshift(chunk) method cannot be called after the 'end' event +has been emitted or a runtime error will be thrown.

    +

    Developers using stream.unshift() often should consider switching to +use of a Transform stream instead. See the API for stream implementers section for more information.

    +
    // Pull off a header delimited by \n\n.
    // Use unshift() if we get too much.
    // Call the callback with (error, header, stream).
    const { StringDecoder } = require('node:string_decoder');
    function parseHeader(stream, callback) {
    stream.on('error', callback);
    stream.on('readable', onReadable);
    const decoder = new StringDecoder('utf8');
    let header = '';
    function onReadable() {
    let chunk;
    while (null !== (chunk = stream.read())) {
    const str = decoder.write(chunk);
    if (str.includes('\n\n')) {
    // Found the header boundary.
    const split = str.split(/\n\n/);
    header += split.shift();
    const remaining = split.join('\n\n');
    const buf = Buffer.from(remaining, 'utf8');
    stream.removeListener('error', callback);
    // Remove the 'readable' listener before unshifting.
    stream.removeListener('readable', onReadable);
    if (buf.length)
    stream.unshift(buf);
    // Now the body of the message can be read from the stream.
    callback(null, header, stream);
    return;
    }
    // Still reading the header.
    header += str;
    }
    }
    } +
    + +

    Unlike push, stream.unshift(chunk) will not +end the reading process by resetting the internal reading state of the stream. +This can cause unexpected results if readable.unshift() is called during a +read (i.e. from within a _read implementation on a +custom stream). Following the call to readable.unshift() with an immediate push will reset the reading state appropriately, +however it is best to simply avoid calling readable.unshift() while in the +process of performing a read.

    +

    Parameters

    • chunk: any

      Chunk of data to unshift onto the read queue. For streams not operating in object mode, chunk must +be a {string}, {Buffer}, {TypedArray}, {DataView} or null. For object mode streams, chunk may be any JavaScript value.

      +
    • Optionalencoding: BufferEncoding

      Encoding of string chunks. Must be a valid Buffer encoding, such as 'utf8' or 'ascii'.

      +

    Returns void

    v0.9.11

    +
  • Prior to Node.js 0.10, streams did not implement the entire node:stream module API as it is currently defined. (See Compatibility for more +information.)

    +

    When using an older Node.js library that emits 'data' events and has a pause method that is advisory only, the readable.wrap() method can be used to create a Readable +stream that uses +the old stream as its data source.

    +

    It will rarely be necessary to use readable.wrap() but the method has been +provided as a convenience for interacting with older Node.js applications and +libraries.

    +
    const { OldReader } = require('./old-api-module.js');
    const { Readable } = require('node:stream');
    const oreader = new OldReader();
    const myReader = new Readable().wrap(oreader);

    myReader.on('readable', () => {
    myReader.read(); // etc.
    }); +
    + +

    Parameters

    • stream: ReadableStream

      An "old style" readable stream

      +

    Returns this

    v0.9.4

    +
  • Experimental

    Listens once to the abort event on the provided signal.

    +

    Listening to the abort event on abort signals is unsafe and may +lead to resource leaks since another third party with the signal can +call e.stopImmediatePropagation(). Unfortunately Node.js cannot change +this since it would violate the web standard. Additionally, the original +API makes it easy to forget to remove listeners.

    +

    This API allows safely using AbortSignals in Node.js APIs by solving these +two issues by listening to the event such that stopImmediatePropagation does +not prevent the listener from running.

    +

    Returns a disposable so that it may be unsubscribed from more easily.

    +
    import { addAbortListener } from 'node:events';

    function example(signal) {
    let disposable;
    try {
    signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
    disposable = addAbortListener(signal, (e) => {
    // Do something when signal is aborted.
    });
    } finally {
    disposable?.[Symbol.dispose]();
    }
    } +
    + +

    Parameters

    • signal: AbortSignal
    • resource: ((event: Event) => void)
        • (event): void
        • Parameters

          • event: Event

          Returns void

    Returns Disposable

    Disposable that removes the abort listener.

    +

    v20.5.0

    +
  • A utility method for creating Readable Streams out of iterators.

    +

    Parameters

    • iterable: Iterable<any> | AsyncIterable<any>

      Object implementing the Symbol.asyncIterator or Symbol.iterator iterable protocol. Emits an 'error' event if a null value is passed.

      +
    • Optionaloptions: ReadableOptions

      Options provided to new stream.Readable([options]). By default, Readable.from() will set options.objectMode to true, unless this is explicitly opted out by setting options.objectMode to false.

      +

    Returns Readable

    v12.3.0, v10.17.0

    +
  • Experimental

    A utility method for creating a Readable from a web ReadableStream.

    +

    Parameters

    • readableStream: ReadableStream<any>
    • Optionaloptions: Pick<ReadableOptions,
          | "signal"
          | "objectMode"
          | "highWaterMark"
          | "encoding">

    Returns Readable

    v17.0.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +

    For EventEmitters this behaves exactly the same as calling .listeners on +the emitter.

    +

    For EventTargets this is the only way to get the event listeners for the +event target. This is useful for debugging and diagnostic purposes.

    +
    import { getEventListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    const listener = () => console.log('Events are fun');
    ee.on('foo', listener);
    console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
    }
    {
    const et = new EventTarget();
    const listener = () => console.log('Events are fun');
    et.addEventListener('foo', listener);
    console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget
    • name: string | symbol

    Returns Function[]

    v15.2.0, v14.17.0

    +
  • Returns the currently set max amount of listeners.

    +

    For EventEmitters this behaves exactly the same as calling .getMaxListeners on +the emitter.

    +

    For EventTargets this is the only way to get the max event listeners for the +event target. If the number of event handlers on a single EventTarget exceeds +the max set, the EventTarget will print a warning.

    +
    import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    console.log(getMaxListeners(ee)); // 10
    setMaxListeners(11, ee);
    console.log(getMaxListeners(ee)); // 11
    }
    {
    const et = new EventTarget();
    console.log(getMaxListeners(et)); // 10
    setMaxListeners(11, et);
    console.log(getMaxListeners(et)); // 11
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget

    Returns number

    v19.9.0

    +
  • Returns whether the stream has been read from or cancelled.

    +

    Parameters

    • stream: Readable | ReadableStream

    Returns boolean

    v16.8.0

    +
  • A class method that returns the number of listeners for the given eventName registered on the given emitter.

    +
    import { EventEmitter, listenerCount } from 'node:events';

    const myEmitter = new EventEmitter();
    myEmitter.on('event', () => {});
    myEmitter.on('event', () => {});
    console.log(listenerCount(myEmitter, 'event'));
    // Prints: 2 +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>

      The emitter to query

      +
    • eventName: string | symbol

      The event name

      +

    Returns number

    v0.9.12

    +

    Since v3.2.0 - Use listenerCount instead.

    +
  • import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo')) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here +
    + +

    Returns an AsyncIterator that iterates eventName events. It will throw +if the EventEmitter emits 'error'. It removes all listeners when +exiting the loop. The value returned by each iteration is an array +composed of the emitted event arguments.

    +

    An AbortSignal can be used to cancel waiting on events:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ac = new AbortController();

    (async () => {
    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo', { signal: ac.signal })) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here
    })();

    process.nextTick(() => ac.abort()); +
    + +

    Use the close option to specify an array of event names that will end the iteration:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    ee.emit('close');
    });

    for await (const event of on(ee, 'foo', { close: ['close'] })) {
    console.log(event); // prints ['bar'] [42]
    }
    // the loop will exit after 'close' is emitted
    console.log('done'); // prints 'done' +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

    An AsyncIterator that iterates eventName events emitted by the emitter

    +

    v13.6.0, v12.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

  • Creates a Promise that is fulfilled when the EventEmitter emits the given +event or that is rejected if the EventEmitter emits 'error' while waiting. +The Promise will resolve with an array of all the arguments emitted to the +given event.

    +

    This method is intentionally generic and works with the web platform EventTarget interface, which has no special'error' event +semantics and does not listen to the 'error' event.

    +
    import { once, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    process.nextTick(() => {
    ee.emit('myevent', 42);
    });

    const [value] = await once(ee, 'myevent');
    console.log(value);

    const err = new Error('kaboom');
    process.nextTick(() => {
    ee.emit('error', err);
    });

    try {
    await once(ee, 'myevent');
    } catch (err) {
    console.error('error happened', err);
    } +
    + +

    The special handling of the 'error' event is only used when events.once() is used to wait for another event. If events.once() is used to wait for the +'error' event itself, then it is treated as any other kind of event without +special handling:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();

    once(ee, 'error')
    .then(([err]) => console.log('ok', err.message))
    .catch((err) => console.error('error', err.message));

    ee.emit('error', new Error('boom'));

    // Prints: ok boom +
    + +

    An AbortSignal can be used to cancel waiting for the event:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();
    const ac = new AbortController();

    async function foo(emitter, event, signal) {
    try {
    await once(emitter, event, { signal });
    console.log('event emitted!');
    } catch (error) {
    if (error.name === 'AbortError') {
    console.error('Waiting for the event was canceled!');
    } else {
    console.error('There was an error', error.message);
    }
    }
    }

    foo(ee, 'foo', ac.signal);
    ac.abort(); // Abort waiting for the event
    ee.emit('foo'); // Prints: Waiting for the event was canceled! +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

    v11.13.0, v10.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

  • import { setMaxListeners, EventEmitter } from 'node:events';

    const target = new EventTarget();
    const emitter = new EventEmitter();

    setMaxListeners(5, target, emitter); +
    + +

    Parameters

    • Optionaln: number

      A non-negative number. The maximum number of listeners per EventTarget event.

      +
    • Rest...eventTargets: (EventEmitter<DefaultEventMap> | EventTarget)[]

    Returns void

    v15.4.0

    +
  • Experimental

    A utility method for creating a web ReadableStream from a Readable.

    +

    Parameters

    • streamReadable: Readable

    Returns ReadableStream<any>

    v17.0.0

    +
diff --git a/docs/6.9/classes/GridFSBucketWriteStream.html b/docs/6.9/classes/GridFSBucketWriteStream.html new file mode 100644 index 0000000000..1b0b602849 --- /dev/null +++ b/docs/6.9/classes/GridFSBucketWriteStream.html @@ -0,0 +1,951 @@ +GridFSBucketWriteStream | mongodb

Class GridFSBucketWriteStream

A writable stream that enables you to write buffers to GridFS.

+

Do not instantiate this class directly. Use openUploadStream() instead.

+

Hierarchy

  • Writable
    • GridFSBucketWriteStream

Properties

bucket: GridFSBucket
bufToStore: Buffer

Space used to store a chunk currently being inserted

+

A Collection instance where the file's chunks are stored

+
chunkSizeBytes: number

The number of bytes that each chunk will be limited to

+
closed: boolean

Is true after 'close' has been emitted.

+

v18.0.0

+
destroyed: boolean

Is true after writable.destroy() has been called.

+

v8.0.0

+
done: boolean

Indicates the stream is finished uploading

+
errored: null | Error

Returns error if the stream has been destroyed with an error.

+

v18.0.0

+
filename: string

The name of the file

+

A Collection instance where the file's GridFSFile document is stored

+
gridFSFile: null | GridFSFile = null

The document containing information about the inserted file. +This property is defined after the finish event has been emitted. +It will remain null if an error occurs.

+
fs.createReadStream('file.txt')
.pipe(bucket.openUploadStream('file.txt'))
.on('finish', function () {
console.log(this.gridFSFile)
}) +
+ +

The ObjectId used for the _id field on the GridFSFile document

+
length: number

Accumulates the number of bytes inserted as the stream uploads chunks

+
n: number

Accumulates the number of chunks inserted as the stream uploads file contents

+

Options controlling the metadata inserted along with the file

+
pos: number

Tracks the current offset into the buffered bytes being uploaded

+
state: {
    aborted: boolean;
    errored: boolean;
    outstandingRequests: number;
    streamEnd: boolean;
}

Contains a number of properties indicating the current state of the stream

+

Type declaration

  • aborted: boolean

    If set the stream was intentionally aborted

    +
  • errored: boolean

    If set an error occurred during insertion

    +
  • outstandingRequests: number

    Indicates the number of chunks that still need to be inserted to exhaust the current buffered data

    +
  • streamEnd: boolean

    If set the stream has ended

    +
writable: boolean

Is true if it is safe to call writable.write(), which means +the stream has not been destroyed, errored, or ended.

+

v11.4.0

+
writableCorked: number

Number of times writable.uncork() needs to be +called in order to fully uncork the stream.

+

v13.2.0, v12.16.0

+
writableEnded: boolean

Is true after writable.end() has been called. This property +does not indicate whether the data has been flushed, for this use writable.writableFinished instead.

+

v12.9.0

+
writableFinished: boolean

Is set to true immediately before the 'finish' event is emitted.

+

v12.6.0

+
writableHighWaterMark: number

Return the value of highWaterMark passed when creating this Writable.

+

v9.3.0

+
writableLength: number

This property contains the number of bytes (or objects) in the queue +ready to be written. The value provides introspection data regarding +the status of the highWaterMark.

+

v9.4.0

+
writableNeedDrain: boolean

Is true if the stream's buffer has been full and stream will emit 'drain'.

+

v15.2.0, v14.17.0

+
writableObjectMode: boolean

Getter for the property objectMode of a given Writable stream.

+

v12.3.0

+
writeConcern?: WriteConcern

The write concern setting to be used with every insert operation

+
captureRejections: boolean

Value: boolean

+

Change the default captureRejections option on all new EventEmitter objects.

+

v13.4.0, v12.16.0

+
captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

+

See how to write a custom rejection handler.

+

v13.4.0, v12.16.0

+
defaultMaxListeners: number

By default, a maximum of 10 listeners can be registered for any single +event. This limit can be changed for individual EventEmitter instances +using the emitter.setMaxListeners(n) method. To change the default +for allEventEmitter instances, the events.defaultMaxListeners property +can be used. If this value is not a positive number, a RangeError is thrown.

+

Take caution when setting the events.defaultMaxListeners because the +change affects all EventEmitter instances, including those created before +the change is made. However, calling emitter.setMaxListeners(n) still has +precedence over events.defaultMaxListeners.

+

This is not a hard limit. The EventEmitter instance will allow +more listeners to be added but will output a trace warning to stderr indicating +that a "possible EventEmitter memory leak" has been detected. For any single +EventEmitter, the emitter.getMaxListeners() and emitter.setMaxListeners() methods can be used to +temporarily avoid this warning:

+
import { EventEmitter } from 'node:events';
const emitter = new EventEmitter();
emitter.setMaxListeners(emitter.getMaxListeners() + 1);
emitter.once('event', () => {
// do stuff
emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
}); +
+ +

The --trace-warnings command-line flag can be used to display the +stack trace for such warnings.

+

The emitted warning can be inspected with process.on('warning') and will +have the additional emitter, type, and count properties, referring to +the event emitter instance, the event's name and the number of attached +listeners, respectively. +Its name property is set to 'MaxListenersExceededWarning'.

+

v0.11.2

+
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

+

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted. Therefore, the process will still crash if no +regular 'error' listener is installed.

+

v13.6.0, v12.17.0

+

Methods

  • Parameters

    • error: null | Error
    • callback: ((error?: null | Error) => void)
        • (error?): void
        • Parameters

          • Optionalerror: null | Error

          Returns void

    Returns void

  • Parameters

    • chunks: {
          chunk: any;
          encoding: BufferEncoding;
      }[]
    • callback: ((error?: null | Error) => void)
        • (error?): void
        • Parameters

          • Optionalerror: null | Error

          Returns void

    Returns void

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest...args: AnyRest

    Returns void

  • Places this write stream into an aborted state (all future writes fail) +and deletes all chunks that have already been written.

    +

    Returns Promise<void>

  • Event emitter +The defined events on documents including:

    +
      +
    1. close
    2. +
    3. drain
    4. +
    5. error
    6. +
    7. finish
    8. +
    9. pipe
    10. +
    11. unpipe
    12. +
    +

    Parameters

    • event: "close"
    • listener: (() => void)
        • (): void
        • Returns void

    Returns this

  • Alias for emitter.on(eventName, listener).

    +

    Parameters

    • event: "drain"
    • listener: (() => void)
        • (): void
        • Returns void

    Returns this

    v0.1.26

    +
  • Alias for emitter.on(eventName, listener).

    +

    Parameters

    • event: "error"
    • listener: ((err: Error) => void)
        • (err): void
        • Parameters

          • err: Error

          Returns void

    Returns this

    v0.1.26

    +
  • Alias for emitter.on(eventName, listener).

    +

    Parameters

    • event: "finish"
    • listener: (() => void)
        • (): void
        • Returns void

    Returns this

    v0.1.26

    +
  • Alias for emitter.on(eventName, listener).

    +

    Parameters

    • event: "pipe"
    • listener: ((src: Readable) => void)
        • (src): void
        • Parameters

          • src: Readable

          Returns void

    Returns this

    v0.1.26

    +
  • Alias for emitter.on(eventName, listener).

    +

    Parameters

    • event: "unpipe"
    • listener: ((src: Readable) => void)
        • (src): void
        • Parameters

          • src: Readable

          Returns void

    Returns this

    v0.1.26

    +
  • Alias for emitter.on(eventName, listener).

    +

    Parameters

    • event: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v0.1.26

    +
  • Type Parameters

    • T extends ReadableStream

    Parameters

    • stream:
          | ComposeFnParam
          | T
          | Iterable<T>
          | AsyncIterable<T>
    • Optionaloptions: {
          signal: AbortSignal;
      }
      • signal: AbortSignal

    Returns T

  • The writable.cork() method forces all written data to be buffered in memory. +The buffered data will be flushed when either the uncork or end methods are called.

    +

    The primary intent of writable.cork() is to accommodate a situation in which +several small chunks are written to the stream in rapid succession. Instead of +immediately forwarding them to the underlying destination, writable.cork() buffers all the chunks until writable.uncork() is called, which will pass them +all to writable._writev(), if present. This prevents a head-of-line blocking +situation where data is being buffered while waiting for the first small chunk +to be processed. However, use of writable.cork() without implementing writable._writev() may have an adverse effect on throughput.

    +

    See also: writable.uncork(), writable._writev().

    +

    Returns void

    v0.11.2

    +
  • Destroy the stream. Optionally emit an 'error' event, and emit a 'close' event (unless emitClose is set to false). After this call, the writable +stream has ended and subsequent calls to write() or end() will result in +an ERR_STREAM_DESTROYED error. +This is a destructive and immediate way to destroy a stream. Previous calls to write() may not have drained, and may trigger an ERR_STREAM_DESTROYED error. +Use end() instead of destroy if data should flush before close, or wait for +the 'drain' event before destroying the stream.

    +

    Once destroy() has been called any further calls will be a no-op and no +further errors except from _destroy() may be emitted as 'error'.

    +

    Implementors should not override this method, +but instead implement writable._destroy().

    +

    Parameters

    • Optionalerror: Error

      Optional, an error to emit with 'error' event.

      +

    Returns this

    v8.0.0

    +
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Parameters

    • event: "close"

    Returns boolean

    v0.1.26

    +
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Parameters

    • event: "drain"

    Returns boolean

    v0.1.26

    +
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Parameters

    • event: "error"
    • err: Error

    Returns boolean

    v0.1.26

    +
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Parameters

    • event: "finish"

    Returns boolean

    v0.1.26

    +
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Parameters

    • event: "pipe"
    • src: Readable

    Returns boolean

    v0.1.26

    +
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Parameters

    • event: "unpipe"
    • src: Readable

    Returns boolean

    v0.1.26

    +
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Parameters

    • event: string | symbol
    • Rest...args: any[]

    Returns boolean

    v0.1.26

    +
  • Calling the writable.end() method signals that no more data will be written +to the Writable. The optional chunk and encoding arguments allow one +final additional chunk of data to be written immediately before closing the +stream.

    +

    Calling the write method after calling end will raise an error.

    +
    // Write 'hello, ' and then end with 'world!'.
    const fs = require('node:fs');
    const file = fs.createWriteStream('example.txt');
    file.write('hello, ');
    file.end('world!');
    // Writing more now is not allowed! +
    + +

    Parameters

    • Optionalcb: (() => void)
        • (): void
        • Returns void

    Returns this

    v0.9.4

    +
  • Parameters

    • chunk: any
    • Optionalcb: (() => void)
        • (): void
        • Returns void

    Returns this

  • Parameters

    • chunk: any
    • encoding: BufferEncoding
    • Optionalcb: (() => void)
        • (): void
        • Returns void

    Returns this

  • Returns an array listing the events for which the emitter has registered +listeners. The values in the array are strings or Symbols.

    +
    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ] +
    + +

    Returns (string | symbol)[]

    v6.0.0

    +
  • Returns the current max listener value for the EventEmitter which is either +set by emitter.setMaxListeners(n) or defaults to defaultMaxListeners.

    +

    Returns number

    v1.0.0

    +
  • Returns the number of listeners listening for the event named eventName. +If listener is provided, it will return how many times the listener is found +in the list of the listeners of the event.

    +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event being listened for

      +
    • Optionallistener: Function

      The event handler function

      +

    Returns number

    v3.2.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    });
    console.log(util.inspect(server.listeners('connection')));
    // Prints: [ [Function] ] +
    + +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

    Returns Function[]

    v0.1.26

    +
  • Alias for emitter.removeListener().

    +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v10.0.0

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "close"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "drain"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "error"
    • listener: ((err: Error) => void)

      The callback function

      +
        • (err): void
        • Parameters

          • err: Error

          Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "finish"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "pipe"
    • listener: ((src: Readable) => void)

      The callback function

      +
        • (src): void
        • Parameters

          • src: Readable

          Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "unpipe"
    • listener: ((src: Readable) => void)

      The callback function

      +
        • (src): void
        • Parameters

          • src: Readable

          Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: string | symbol
    • listener: ((...args: any[]) => void)

      The callback function

      +
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v0.1.101

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "close"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "drain"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "error"
    • listener: ((err: Error) => void)

      The callback function

      +
        • (err): void
        • Parameters

          • err: Error

          Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "finish"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "pipe"
    • listener: ((src: Readable) => void)

      The callback function

      +
        • (src): void
        • Parameters

          • src: Readable

          Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: "unpipe"
    • listener: ((src: Readable) => void)

      The callback function

      +
        • (src): void
        • Parameters

          • src: Readable

          Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: string | symbol
    • listener: ((...args: any[]) => void)

      The callback function

      +
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v0.3.0

    +
  • Type Parameters

    • T extends WritableStream

    Parameters

    • destination: T
    • Optionaloptions: {
          end?: boolean;
      }
      • Optionalend?: boolean

    Returns T

  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "close"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "drain"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "error"
    • listener: ((err: Error) => void)

      The callback function

      +
        • (err): void
        • Parameters

          • err: Error

          Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "finish"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "pipe"
    • listener: ((src: Readable) => void)

      The callback function

      +
        • (src): void
        • Parameters

          • src: Readable

          Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "unpipe"
    • listener: ((src: Readable) => void)

      The callback function

      +
        • (src): void
        • Parameters

          • src: Readable

          Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: string | symbol
    • listener: ((...args: any[]) => void)

      The callback function

      +
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "close"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "drain"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "error"
    • listener: ((err: Error) => void)

      The callback function

      +
        • (err): void
        • Parameters

          • err: Error

          Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "finish"
    • listener: (() => void)

      The callback function

      +
        • (): void
        • Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "pipe"
    • listener: ((src: Readable) => void)

      The callback function

      +
        • (src): void
        • Parameters

          • src: Readable

          Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "unpipe"
    • listener: ((src: Readable) => void)

      The callback function

      +
        • (src): void
        • Parameters

          • src: Readable

          Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: string | symbol
    • listener: ((...args: any[]) => void)

      The callback function

      +
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v6.0.0

    +
  • Returns a copy of the array of listeners for the event named eventName, +including any wrappers (such as those created by .once()).

    +
    import { EventEmitter } from 'node:events';
    const emitter = new EventEmitter();
    emitter.once('log', () => console.log('log once'));

    // Returns a new Array with a function `onceWrapper` which has a property
    // `listener` which contains the original listener bound above
    const listeners = emitter.rawListeners('log');
    const logFnWrapper = listeners[0];

    // Logs "log once" to the console and does not unbind the `once` event
    logFnWrapper.listener();

    // Logs "log once" to the console and removes the listener
    logFnWrapper();

    emitter.on('log', () => console.log('log persistently'));
    // Will return a new Array with a single function bound by `.on()` above
    const newListeners = emitter.rawListeners('log');

    // Logs "log persistently" twice
    newListeners[0]();
    emitter.emit('log'); +
    + +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

    Returns Function[]

    v9.4.0

    +
  • Removes all listeners, or those of the specified eventName.

    +

    It is bad practice to remove listeners added elsewhere in the code, +particularly when the EventEmitter instance was created by some other +component or module (e.g. sockets or file streams).

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • OptionaleventName: string | symbol

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "close"
    • listener: (() => void)
        • (): void
        • Returns void

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "drain"
    • listener: (() => void)
        • (): void
        • Returns void

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "error"
    • listener: ((err: Error) => void)
        • (err): void
        • Parameters

          • err: Error

          Returns void

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "finish"
    • listener: (() => void)
        • (): void
        • Returns void

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "pipe"
    • listener: ((src: Readable) => void)
        • (src): void
        • Parameters

          • src: Readable

          Returns void

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: "unpipe"
    • listener: ((src: Readable) => void)
        • (src): void
        • Parameters

          • src: Readable

          Returns void

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v0.1.26

    +
  • The writable.setDefaultEncoding() method sets the default encoding for a Writable stream.

    +

    Parameters

    • encoding: BufferEncoding

      The new default encoding

      +

    Returns this

    v0.11.15

    +
  • By default EventEmitters will print a warning if more than 10 listeners are +added for a particular event. This is a useful default that helps finding +memory leaks. The emitter.setMaxListeners() method allows the limit to be +modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • n: number

    Returns this

    v0.3.5

    +
  • The writable.uncork() method flushes all data buffered since cork was called.

    +

    When using writable.cork() and writable.uncork() to manage the buffering +of writes to a stream, defer calls to writable.uncork() using process.nextTick(). Doing so allows batching of all writable.write() calls that occur within a given Node.js event +loop phase.

    +
    stream.cork();
    stream.write('some ');
    stream.write('data ');
    process.nextTick(() => stream.uncork()); +
    + +

    If the writable.cork() method is called multiple times on a stream, the +same number of calls to writable.uncork() must be called to flush the buffered +data.

    +
    stream.cork();
    stream.write('some ');
    stream.cork();
    stream.write('data ');
    process.nextTick(() => {
    stream.uncork();
    // The data will not be flushed until uncork() is called a second time.
    stream.uncork();
    }); +
    + +

    See also: writable.cork().

    +

    Returns void

    v0.11.2

    +
  • The writable.write() method writes some data to the stream, and calls the +supplied callback once the data has been fully handled. If an error +occurs, the callback will be called with the error as its +first argument. The callback is called asynchronously and before 'error' is +emitted.

    +

    The return value is true if the internal buffer is less than the highWaterMark configured when the stream was created after admitting chunk. +If false is returned, further attempts to write data to the stream should +stop until the 'drain' event is emitted.

    +

    While a stream is not draining, calls to write() will buffer chunk, and +return false. Once all currently buffered chunks are drained (accepted for +delivery by the operating system), the 'drain' event will be emitted. +Once write() returns false, do not write more chunks +until the 'drain' event is emitted. While calling write() on a stream that +is not draining is allowed, Node.js will buffer all written chunks until +maximum memory usage occurs, at which point it will abort unconditionally. +Even before it aborts, high memory usage will cause poor garbage collector +performance and high RSS (which is not typically released back to the system, +even after the memory is no longer required). Since TCP sockets may never +drain if the remote peer does not read the data, writing a socket that is +not draining may lead to a remotely exploitable vulnerability.

    +

    Writing data while the stream is not draining is particularly +problematic for a Transform, because the Transform streams are paused +by default until they are piped or a 'data' or 'readable' event handler +is added.

    +

    If the data to be written can be generated or fetched on demand, it is +recommended to encapsulate the logic into a Readable and use pipe. However, if calling write() is preferred, it is +possible to respect backpressure and avoid memory issues using the 'drain' event:

    +
    function write(data, cb) {
    if (!stream.write(data)) {
    stream.once('drain', cb);
    } else {
    process.nextTick(cb);
    }
    }

    // Wait for cb to be called before doing any other write.
    write('hello', () => {
    console.log('Write completed, do more writes now.');
    }); +
    + +

    A Writable stream in object mode will always ignore the encoding argument.

    +

    Parameters

    • chunk: any

      Optional data to write. For streams not operating in object mode, chunk must be a {string}, {Buffer}, +{TypedArray} or {DataView}. For object mode streams, chunk may be any JavaScript value other than null.

      +
    • Optionalcallback: ((error: undefined | null | Error) => void)

      Callback for when this chunk of data is flushed.

      +
        • (error): void
        • Parameters

          • error: undefined | null | Error

          Returns void

    Returns boolean

    false if the stream wishes for the calling code to wait for the 'drain' event to be emitted before continuing to write additional data; otherwise true.

    +

    v0.9.4

    +
  • Parameters

    • chunk: any
    • encoding: BufferEncoding
    • Optionalcallback: ((error: undefined | null | Error) => void)
        • (error): void
        • Parameters

          • error: undefined | null | Error

          Returns void

    Returns boolean

  • Experimental

    Listens once to the abort event on the provided signal.

    +

    Listening to the abort event on abort signals is unsafe and may +lead to resource leaks since another third party with the signal can +call e.stopImmediatePropagation(). Unfortunately Node.js cannot change +this since it would violate the web standard. Additionally, the original +API makes it easy to forget to remove listeners.

    +

    This API allows safely using AbortSignals in Node.js APIs by solving these +two issues by listening to the event such that stopImmediatePropagation does +not prevent the listener from running.

    +

    Returns a disposable so that it may be unsubscribed from more easily.

    +
    import { addAbortListener } from 'node:events';

    function example(signal) {
    let disposable;
    try {
    signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
    disposable = addAbortListener(signal, (e) => {
    // Do something when signal is aborted.
    });
    } finally {
    disposable?.[Symbol.dispose]();
    }
    } +
    + +

    Parameters

    • signal: AbortSignal
    • resource: ((event: Event) => void)
        • (event): void
        • Parameters

          • event: Event

          Returns void

    Returns Disposable

    Disposable that removes the abort listener.

    +

    v20.5.0

    +
  • Experimental

    A utility method for creating a Writable from a web WritableStream.

    +

    Parameters

    • writableStream: WritableStream<any>
    • Optionaloptions: Pick<WritableOptions,
          | "signal"
          | "objectMode"
          | "highWaterMark"
          | "decodeStrings">

    Returns Writable

    v17.0.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +

    For EventEmitters this behaves exactly the same as calling .listeners on +the emitter.

    +

    For EventTargets this is the only way to get the event listeners for the +event target. This is useful for debugging and diagnostic purposes.

    +
    import { getEventListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    const listener = () => console.log('Events are fun');
    ee.on('foo', listener);
    console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
    }
    {
    const et = new EventTarget();
    const listener = () => console.log('Events are fun');
    et.addEventListener('foo', listener);
    console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget
    • name: string | symbol

    Returns Function[]

    v15.2.0, v14.17.0

    +
  • Returns the currently set max amount of listeners.

    +

    For EventEmitters this behaves exactly the same as calling .getMaxListeners on +the emitter.

    +

    For EventTargets this is the only way to get the max event listeners for the +event target. If the number of event handlers on a single EventTarget exceeds +the max set, the EventTarget will print a warning.

    +
    import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    console.log(getMaxListeners(ee)); // 10
    setMaxListeners(11, ee);
    console.log(getMaxListeners(ee)); // 11
    }
    {
    const et = new EventTarget();
    console.log(getMaxListeners(et)); // 10
    setMaxListeners(11, et);
    console.log(getMaxListeners(et)); // 11
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget

    Returns number

    v19.9.0

    +
  • A class method that returns the number of listeners for the given eventName registered on the given emitter.

    +
    import { EventEmitter, listenerCount } from 'node:events';

    const myEmitter = new EventEmitter();
    myEmitter.on('event', () => {});
    myEmitter.on('event', () => {});
    console.log(listenerCount(myEmitter, 'event'));
    // Prints: 2 +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>

      The emitter to query

      +
    • eventName: string | symbol

      The event name

      +

    Returns number

    v0.9.12

    +

    Since v3.2.0 - Use listenerCount instead.

    +
  • import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo')) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here +
    + +

    Returns an AsyncIterator that iterates eventName events. It will throw +if the EventEmitter emits 'error'. It removes all listeners when +exiting the loop. The value returned by each iteration is an array +composed of the emitted event arguments.

    +

    An AbortSignal can be used to cancel waiting on events:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ac = new AbortController();

    (async () => {
    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo', { signal: ac.signal })) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here
    })();

    process.nextTick(() => ac.abort()); +
    + +

    Use the close option to specify an array of event names that will end the iteration:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    ee.emit('close');
    });

    for await (const event of on(ee, 'foo', { close: ['close'] })) {
    console.log(event); // prints ['bar'] [42]
    }
    // the loop will exit after 'close' is emitted
    console.log('done'); // prints 'done' +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

    An AsyncIterator that iterates eventName events emitted by the emitter

    +

    v13.6.0, v12.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

  • Creates a Promise that is fulfilled when the EventEmitter emits the given +event or that is rejected if the EventEmitter emits 'error' while waiting. +The Promise will resolve with an array of all the arguments emitted to the +given event.

    +

    This method is intentionally generic and works with the web platform EventTarget interface, which has no special'error' event +semantics and does not listen to the 'error' event.

    +
    import { once, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    process.nextTick(() => {
    ee.emit('myevent', 42);
    });

    const [value] = await once(ee, 'myevent');
    console.log(value);

    const err = new Error('kaboom');
    process.nextTick(() => {
    ee.emit('error', err);
    });

    try {
    await once(ee, 'myevent');
    } catch (err) {
    console.error('error happened', err);
    } +
    + +

    The special handling of the 'error' event is only used when events.once() is used to wait for another event. If events.once() is used to wait for the +'error' event itself, then it is treated as any other kind of event without +special handling:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();

    once(ee, 'error')
    .then(([err]) => console.log('ok', err.message))
    .catch((err) => console.error('error', err.message));

    ee.emit('error', new Error('boom'));

    // Prints: ok boom +
    + +

    An AbortSignal can be used to cancel waiting for the event:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();
    const ac = new AbortController();

    async function foo(emitter, event, signal) {
    try {
    await once(emitter, event, { signal });
    console.log('event emitted!');
    } catch (error) {
    if (error.name === 'AbortError') {
    console.error('Waiting for the event was canceled!');
    } else {
    console.error('There was an error', error.message);
    }
    }
    }

    foo(ee, 'foo', ac.signal);
    ac.abort(); // Abort waiting for the event
    ee.emit('foo'); // Prints: Waiting for the event was canceled! +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

    v11.13.0, v10.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

  • import { setMaxListeners, EventEmitter } from 'node:events';

    const target = new EventTarget();
    const emitter = new EventEmitter();

    setMaxListeners(5, target, emitter); +
    + +

    Parameters

    • Optionaln: number

      A non-negative number. The maximum number of listeners per EventTarget event.

      +
    • Rest...eventTargets: (EventEmitter<DefaultEventMap> | EventTarget)[]

    Returns void

    v15.4.0

    +
  • Experimental

    A utility method for creating a web WritableStream from a Writable.

    +

    Parameters

    • streamWritable: Writable

    Returns WritableStream<any>

    v17.0.0

    +
diff --git a/docs/6.9/classes/HostAddress.html b/docs/6.9/classes/HostAddress.html new file mode 100644 index 0000000000..c08c18d1b5 --- /dev/null +++ b/docs/6.9/classes/HostAddress.html @@ -0,0 +1,12 @@ +HostAddress | mongodb

Class HostAddress

Constructors

Properties

host: undefined | string = undefined
isIPv6: boolean = false
port: undefined | number = undefined
socketPath: undefined | string = undefined

Methods

  • Returns {
        host: string;
        port: number;
    }

    • host: string
    • port: number
diff --git a/docs/6.9/classes/ListCollectionsCursor.html b/docs/6.9/classes/ListCollectionsCursor.html new file mode 100644 index 0000000000..c5457dd542 --- /dev/null +++ b/docs/6.9/classes/ListCollectionsCursor.html @@ -0,0 +1,510 @@ +ListCollectionsCursor | mongodb

Class ListCollectionsCursor<T>

Type Parameters

Hierarchy (view full)

Constructors

Properties

[asyncDispose]: (() => Promise<void>)

An alias for AbstractCursor.close|AbstractCursor.close().

+
filter: Document
parent: Db
captureRejections: boolean

Value: boolean

+

Change the default captureRejections option on all new EventEmitter objects.

+

v13.4.0, v12.16.0

+
captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

+

See how to write a custom rejection handler.

+

v13.4.0, v12.16.0

+
CLOSE: "close" = ...
defaultMaxListeners: number

By default, a maximum of 10 listeners can be registered for any single +event. This limit can be changed for individual EventEmitter instances +using the emitter.setMaxListeners(n) method. To change the default +for allEventEmitter instances, the events.defaultMaxListeners property +can be used. If this value is not a positive number, a RangeError is thrown.

+

Take caution when setting the events.defaultMaxListeners because the +change affects all EventEmitter instances, including those created before +the change is made. However, calling emitter.setMaxListeners(n) still has +precedence over events.defaultMaxListeners.

+

This is not a hard limit. The EventEmitter instance will allow +more listeners to be added but will output a trace warning to stderr indicating +that a "possible EventEmitter memory leak" has been detected. For any single +EventEmitter, the emitter.getMaxListeners() and emitter.setMaxListeners() methods can be used to +temporarily avoid this warning:

+
import { EventEmitter } from 'node:events';
const emitter = new EventEmitter();
emitter.setMaxListeners(emitter.getMaxListeners() + 1);
emitter.once('event', () => {
// do stuff
emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
}); +
+ +

The --trace-warnings command-line flag can be used to display the +stack trace for such warnings.

+

The emitted warning can be inspected with process.on('warning') and will +have the additional emitter, type, and count properties, referring to +the event emitter instance, the event's name and the number of attached +listeners, respectively. +Its name property is set to 'MaxListenersExceededWarning'.

+

v0.11.2

+
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

+

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted. Therefore, the process will still crash if no +regular 'error' listener is installed.

+

v13.6.0, v12.17.0

+

Accessors

  • get closed(): boolean
  • The cursor is closed and all remaining locally buffered documents have been iterated.

    +

    Returns boolean

  • get id(): undefined | Long
  • The cursor has no id until it receives a response from the initial cursor creating command.

    +

    It is non-zero for as long as the database has an open cursor.

    +

    The initiating command may receive a zero id if the entire result is in the firstBatch.

    +

    Returns undefined | Long

  • get killed(): boolean
  • A killCursors command was attempted on this cursor. +This is performed if the cursor id is non zero.

    +

    Returns boolean

Methods

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest...args: AnyRest

    Returns void

  • Add a cursor flag to the cursor

    +

    Parameters

    • flag:
          | "tailable"
          | "oplogReplay"
          | "noCursorTimeout"
          | "awaitData"
          | "partial"
          | "exhaust"

      The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial' -.

      +
    • value: boolean

      The flag boolean value.

      +

    Returns this

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns boolean

    v0.1.26

    +
  • Returns an array listing the events for which the emitter has registered +listeners. The values in the array are strings or Symbols.

    +
    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ] +
    + +

    Returns string[]

    v6.0.0

    +
  • Iterates over all the documents for this cursor using the iterator, callback pattern.

    +

    If the iterator returns false, iteration will stop.

    +

    Parameters

    • iterator: ((doc: T) => boolean | void)

      The iteration callback.

      +
        • (doc): boolean | void
        • Parameters

          • doc: T

          Returns boolean | void

    Returns Promise<void>

      +
    • Will be removed in a future release. Use for await...of instead.
    • +
    +
  • Returns the number of listeners listening for the event named eventName. +If listener is provided, it will return how many times the listener is found +in the list of the listeners of the event.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns number

    v3.2.0

    +
  • Map all documents using the provided function +If there is a transform set on the cursor, that will be called first and the result passed to +this function's transform.

    +

    Type Parameters

    • T = any

    Parameters

    • transform: ((doc: T) => T)

      The mapping transformation method.

      +
        • (doc): T
        • Parameters

          • doc: T

          Returns T

    Returns AbstractCursor<T, AbstractCursorEvents>

    Note Cursors use null internally to indicate that there are no more documents in the cursor. Providing a mapping +function that maps values to null will result in the cursor closing itself before it has finished iterating +all documents. This will not result in a memory leak, just surprising behavior. For example:

    +
    const cursor = collection.find({});
    cursor.map(() => null);

    const documents = await cursor.toArray();
    // documents is always [], regardless of how many documents are in the collection. +
    + +

    Other falsey values are allowed:

    +
    const cursor = collection.find({});
    cursor.map(() => '');

    const documents = await cursor.toArray();
    // documents is now an array of empty strings +
    + +

    Note for Typescript Users: adding a transform changes the return type of the iteration of this cursor, +it does not return a new instance of a cursor. This means when calling map, +you should always assign the result to a new variable in order to get a correctly typed cursor variable. +Take note of the following example:

    +
    const cursor: FindCursor<Document> = coll.find();
    const mappedCursor: FindCursor<number> = cursor.map(doc => Object.keys(doc).length);
    const keyCounts: number[] = await mappedCursor.toArray(); // cursor.toArray() still returns Document[] +
    + +
  • Set a maxTimeMS on the cursor query, allowing for hard timeout limits on queries (Only supported on MongoDB 2.6 or higher)

    +

    Parameters

    • value: number

      Number of milliseconds to wait before aborting the query.

      +

    Returns this

  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.1.101

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.3.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Returns a copy of the array of listeners for the event named eventName, +including any wrappers (such as those created by .once()).

    +
    import { EventEmitter } from 'node:events';
    const emitter = new EventEmitter();
    emitter.once('log', () => console.log('log once'));

    // Returns a new Array with a function `onceWrapper` which has a property
    // `listener` which contains the original listener bound above
    const listeners = emitter.rawListeners('log');
    const logFnWrapper = listeners[0];

    // Logs "log once" to the console and does not unbind the `once` event
    logFnWrapper.listener();

    // Logs "log once" to the console and removes the listener
    logFnWrapper();

    emitter.on('log', () => console.log('log persistently'));
    // Will return a new Array with a single function bound by `.on()` above
    const newListeners = emitter.rawListeners('log');

    // Logs "log persistently" twice
    newListeners[0]();
    emitter.emit('log'); +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns AbstractCursorEvents[EventKey][]

    v9.4.0

    +
  • Removes all listeners, or those of the specified eventName.

    +

    It is bad practice to remove listeners added elsewhere in the code, +particularly when the EventEmitter instance was created by some other +component or module (e.g. sockets or file streams).

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    • Optionalevent: string | symbol | EventKey

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Rewind this cursor to its uninitialized state. Any options that are present on the cursor will +remain in effect. Iterating this cursor will cause new queries to be sent to the server, even +if the resultant data has already been retrieved by this cursor.

    +

    Returns void

  • By default EventEmitters will print a warning if more than 10 listeners are +added for a particular event. This is a useful default that helps finding +memory leaks. The emitter.setMaxListeners() method allows the limit to be +modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • n: number

    Returns this

    v0.3.5

    +
  • Returns an array of documents. The caller is responsible for making sure that there +is enough memory to store the results. Note that the array only contains partial +results when this cursor had been previously accessed. In that case, +cursor.rewind() can be used to reset the cursor.

    +

    Returns Promise<T[]>

  • Experimental

    Listens once to the abort event on the provided signal.

    +

    Listening to the abort event on abort signals is unsafe and may +lead to resource leaks since another third party with the signal can +call e.stopImmediatePropagation(). Unfortunately Node.js cannot change +this since it would violate the web standard. Additionally, the original +API makes it easy to forget to remove listeners.

    +

    This API allows safely using AbortSignals in Node.js APIs by solving these +two issues by listening to the event such that stopImmediatePropagation does +not prevent the listener from running.

    +

    Returns a disposable so that it may be unsubscribed from more easily.

    +
    import { addAbortListener } from 'node:events';

    function example(signal) {
    let disposable;
    try {
    signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
    disposable = addAbortListener(signal, (e) => {
    // Do something when signal is aborted.
    });
    } finally {
    disposable?.[Symbol.dispose]();
    }
    } +
    + +

    Parameters

    • signal: AbortSignal
    • resource: ((event: Event) => void)
        • (event): void
        • Parameters

          • event: Event

          Returns void

    Returns Disposable

    Disposable that removes the abort listener.

    +

    v20.5.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +

    For EventEmitters this behaves exactly the same as calling .listeners on +the emitter.

    +

    For EventTargets this is the only way to get the event listeners for the +event target. This is useful for debugging and diagnostic purposes.

    +
    import { getEventListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    const listener = () => console.log('Events are fun');
    ee.on('foo', listener);
    console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
    }
    {
    const et = new EventTarget();
    const listener = () => console.log('Events are fun');
    et.addEventListener('foo', listener);
    console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget
    • name: string | symbol

    Returns Function[]

    v15.2.0, v14.17.0

    +
  • Returns the currently set max amount of listeners.

    +

    For EventEmitters this behaves exactly the same as calling .getMaxListeners on +the emitter.

    +

    For EventTargets this is the only way to get the max event listeners for the +event target. If the number of event handlers on a single EventTarget exceeds +the max set, the EventTarget will print a warning.

    +
    import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    console.log(getMaxListeners(ee)); // 10
    setMaxListeners(11, ee);
    console.log(getMaxListeners(ee)); // 11
    }
    {
    const et = new EventTarget();
    console.log(getMaxListeners(et)); // 10
    setMaxListeners(11, et);
    console.log(getMaxListeners(et)); // 11
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget

    Returns number

    v19.9.0

    +
  • A class method that returns the number of listeners for the given eventName registered on the given emitter.

    +
    import { EventEmitter, listenerCount } from 'node:events';

    const myEmitter = new EventEmitter();
    myEmitter.on('event', () => {});
    myEmitter.on('event', () => {});
    console.log(listenerCount(myEmitter, 'event'));
    // Prints: 2 +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>

      The emitter to query

      +
    • eventName: string | symbol

      The event name

      +

    Returns number

    v0.9.12

    +

    Since v3.2.0 - Use listenerCount instead.

    +
  • import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo')) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here +
    + +

    Returns an AsyncIterator that iterates eventName events. It will throw +if the EventEmitter emits 'error'. It removes all listeners when +exiting the loop. The value returned by each iteration is an array +composed of the emitted event arguments.

    +

    An AbortSignal can be used to cancel waiting on events:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ac = new AbortController();

    (async () => {
    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo', { signal: ac.signal })) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here
    })();

    process.nextTick(() => ac.abort()); +
    + +

    Use the close option to specify an array of event names that will end the iteration:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    ee.emit('close');
    });

    for await (const event of on(ee, 'foo', { close: ['close'] })) {
    console.log(event); // prints ['bar'] [42]
    }
    // the loop will exit after 'close' is emitted
    console.log('done'); // prints 'done' +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

    An AsyncIterator that iterates eventName events emitted by the emitter

    +

    v13.6.0, v12.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

  • Creates a Promise that is fulfilled when the EventEmitter emits the given +event or that is rejected if the EventEmitter emits 'error' while waiting. +The Promise will resolve with an array of all the arguments emitted to the +given event.

    +

    This method is intentionally generic and works with the web platform EventTarget interface, which has no special'error' event +semantics and does not listen to the 'error' event.

    +
    import { once, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    process.nextTick(() => {
    ee.emit('myevent', 42);
    });

    const [value] = await once(ee, 'myevent');
    console.log(value);

    const err = new Error('kaboom');
    process.nextTick(() => {
    ee.emit('error', err);
    });

    try {
    await once(ee, 'myevent');
    } catch (err) {
    console.error('error happened', err);
    } +
    + +

    The special handling of the 'error' event is only used when events.once() is used to wait for another event. If events.once() is used to wait for the +'error' event itself, then it is treated as any other kind of event without +special handling:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();

    once(ee, 'error')
    .then(([err]) => console.log('ok', err.message))
    .catch((err) => console.error('error', err.message));

    ee.emit('error', new Error('boom'));

    // Prints: ok boom +
    + +

    An AbortSignal can be used to cancel waiting for the event:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();
    const ac = new AbortController();

    async function foo(emitter, event, signal) {
    try {
    await once(emitter, event, { signal });
    console.log('event emitted!');
    } catch (error) {
    if (error.name === 'AbortError') {
    console.error('Waiting for the event was canceled!');
    } else {
    console.error('There was an error', error.message);
    }
    }
    }

    foo(ee, 'foo', ac.signal);
    ac.abort(); // Abort waiting for the event
    ee.emit('foo'); // Prints: Waiting for the event was canceled! +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

    v11.13.0, v10.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

  • import { setMaxListeners, EventEmitter } from 'node:events';

    const target = new EventTarget();
    const emitter = new EventEmitter();

    setMaxListeners(5, target, emitter); +
    + +

    Parameters

    • Optionaln: number

      A non-negative number. The maximum number of listeners per EventTarget event.

      +
    • Rest...eventTargets: (EventEmitter<DefaultEventMap> | EventTarget)[]

    Returns void

    v15.4.0

    +
diff --git a/docs/6.9/classes/ListIndexesCursor.html b/docs/6.9/classes/ListIndexesCursor.html new file mode 100644 index 0000000000..40c7d91d93 --- /dev/null +++ b/docs/6.9/classes/ListIndexesCursor.html @@ -0,0 +1,509 @@ +ListIndexesCursor | mongodb

Class ListIndexesCursor

Hierarchy (view full)

Constructors

Properties

[asyncDispose]: (() => Promise<void>)

An alias for AbstractCursor.close|AbstractCursor.close().

+
captureRejections: boolean

Value: boolean

+

Change the default captureRejections option on all new EventEmitter objects.

+

v13.4.0, v12.16.0

+
captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

+

See how to write a custom rejection handler.

+

v13.4.0, v12.16.0

+
CLOSE: "close" = ...
defaultMaxListeners: number

By default, a maximum of 10 listeners can be registered for any single +event. This limit can be changed for individual EventEmitter instances +using the emitter.setMaxListeners(n) method. To change the default +for allEventEmitter instances, the events.defaultMaxListeners property +can be used. If this value is not a positive number, a RangeError is thrown.

+

Take caution when setting the events.defaultMaxListeners because the +change affects all EventEmitter instances, including those created before +the change is made. However, calling emitter.setMaxListeners(n) still has +precedence over events.defaultMaxListeners.

+

This is not a hard limit. The EventEmitter instance will allow +more listeners to be added but will output a trace warning to stderr indicating +that a "possible EventEmitter memory leak" has been detected. For any single +EventEmitter, the emitter.getMaxListeners() and emitter.setMaxListeners() methods can be used to +temporarily avoid this warning:

+
import { EventEmitter } from 'node:events';
const emitter = new EventEmitter();
emitter.setMaxListeners(emitter.getMaxListeners() + 1);
emitter.once('event', () => {
// do stuff
emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
}); +
+ +

The --trace-warnings command-line flag can be used to display the +stack trace for such warnings.

+

The emitted warning can be inspected with process.on('warning') and will +have the additional emitter, type, and count properties, referring to +the event emitter instance, the event's name and the number of attached +listeners, respectively. +Its name property is set to 'MaxListenersExceededWarning'.

+

v0.11.2

+
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

+

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted. Therefore, the process will still crash if no +regular 'error' listener is installed.

+

v13.6.0, v12.17.0

+

Accessors

  • get closed(): boolean
  • The cursor is closed and all remaining locally buffered documents have been iterated.

    +

    Returns boolean

  • get id(): undefined | Long
  • The cursor has no id until it receives a response from the initial cursor creating command.

    +

    It is non-zero for as long as the database has an open cursor.

    +

    The initiating command may receive a zero id if the entire result is in the firstBatch.

    +

    Returns undefined | Long

  • get killed(): boolean
  • A killCursors command was attempted on this cursor. +This is performed if the cursor id is non zero.

    +

    Returns boolean

Methods

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest...args: AnyRest

    Returns void

  • Add a cursor flag to the cursor

    +

    Parameters

    • flag:
          | "tailable"
          | "oplogReplay"
          | "noCursorTimeout"
          | "awaitData"
          | "partial"
          | "exhaust"

      The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial' -.

      +
    • value: boolean

      The flag boolean value.

      +

    Returns this

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns boolean

    v0.1.26

    +
  • Returns an array listing the events for which the emitter has registered +listeners. The values in the array are strings or Symbols.

    +
    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ] +
    + +

    Returns string[]

    v6.0.0

    +
  • Iterates over all the documents for this cursor using the iterator, callback pattern.

    +

    If the iterator returns false, iteration will stop.

    +

    Parameters

    • iterator: ((doc: any) => boolean | void)

      The iteration callback.

      +
        • (doc): boolean | void
        • Parameters

          • doc: any

          Returns boolean | void

    Returns Promise<void>

      +
    • Will be removed in a future release. Use for await...of instead.
    • +
    +
  • Returns the number of listeners listening for the event named eventName. +If listener is provided, it will return how many times the listener is found +in the list of the listeners of the event.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns number

    v3.2.0

    +
  • Map all documents using the provided function +If there is a transform set on the cursor, that will be called first and the result passed to +this function's transform.

    +

    Type Parameters

    • T = any

    Parameters

    • transform: ((doc: any) => T)

      The mapping transformation method.

      +
        • (doc): T
        • Parameters

          • doc: any

          Returns T

    Returns AbstractCursor<T, AbstractCursorEvents>

    Note Cursors use null internally to indicate that there are no more documents in the cursor. Providing a mapping +function that maps values to null will result in the cursor closing itself before it has finished iterating +all documents. This will not result in a memory leak, just surprising behavior. For example:

    +
    const cursor = collection.find({});
    cursor.map(() => null);

    const documents = await cursor.toArray();
    // documents is always [], regardless of how many documents are in the collection. +
    + +

    Other falsey values are allowed:

    +
    const cursor = collection.find({});
    cursor.map(() => '');

    const documents = await cursor.toArray();
    // documents is now an array of empty strings +
    + +

    Note for Typescript Users: adding a transform changes the return type of the iteration of this cursor, +it does not return a new instance of a cursor. This means when calling map, +you should always assign the result to a new variable in order to get a correctly typed cursor variable. +Take note of the following example:

    +
    const cursor: FindCursor<Document> = coll.find();
    const mappedCursor: FindCursor<number> = cursor.map(doc => Object.keys(doc).length);
    const keyCounts: number[] = await mappedCursor.toArray(); // cursor.toArray() still returns Document[] +
    + +
  • Set a maxTimeMS on the cursor query, allowing for hard timeout limits on queries (Only supported on MongoDB 2.6 or higher)

    +

    Parameters

    • value: number

      Number of milliseconds to wait before aborting the query.

      +

    Returns this

  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.1.101

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.3.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Returns a copy of the array of listeners for the event named eventName, +including any wrappers (such as those created by .once()).

    +
    import { EventEmitter } from 'node:events';
    const emitter = new EventEmitter();
    emitter.once('log', () => console.log('log once'));

    // Returns a new Array with a function `onceWrapper` which has a property
    // `listener` which contains the original listener bound above
    const listeners = emitter.rawListeners('log');
    const logFnWrapper = listeners[0];

    // Logs "log once" to the console and does not unbind the `once` event
    logFnWrapper.listener();

    // Logs "log once" to the console and removes the listener
    logFnWrapper();

    emitter.on('log', () => console.log('log persistently'));
    // Will return a new Array with a single function bound by `.on()` above
    const newListeners = emitter.rawListeners('log');

    // Logs "log persistently" twice
    newListeners[0]();
    emitter.emit('log'); +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns AbstractCursorEvents[EventKey][]

    v9.4.0

    +
  • Removes all listeners, or those of the specified eventName.

    +

    It is bad practice to remove listeners added elsewhere in the code, +particularly when the EventEmitter instance was created by some other +component or module (e.g. sockets or file streams).

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    • Optionalevent: string | symbol | EventKey

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Rewind this cursor to its uninitialized state. Any options that are present on the cursor will +remain in effect. Iterating this cursor will cause new queries to be sent to the server, even +if the resultant data has already been retrieved by this cursor.

    +

    Returns void

  • By default EventEmitters will print a warning if more than 10 listeners are +added for a particular event. This is a useful default that helps finding +memory leaks. The emitter.setMaxListeners() method allows the limit to be +modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • n: number

    Returns this

    v0.3.5

    +
  • Returns an array of documents. The caller is responsible for making sure that there +is enough memory to store the results. Note that the array only contains partial +results when this cursor had been previously accessed. In that case, +cursor.rewind() can be used to reset the cursor.

    +

    Returns Promise<any[]>

  • Experimental

    Listens once to the abort event on the provided signal.

    +

    Listening to the abort event on abort signals is unsafe and may +lead to resource leaks since another third party with the signal can +call e.stopImmediatePropagation(). Unfortunately Node.js cannot change +this since it would violate the web standard. Additionally, the original +API makes it easy to forget to remove listeners.

    +

    This API allows safely using AbortSignals in Node.js APIs by solving these +two issues by listening to the event such that stopImmediatePropagation does +not prevent the listener from running.

    +

    Returns a disposable so that it may be unsubscribed from more easily.

    +
    import { addAbortListener } from 'node:events';

    function example(signal) {
    let disposable;
    try {
    signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
    disposable = addAbortListener(signal, (e) => {
    // Do something when signal is aborted.
    });
    } finally {
    disposable?.[Symbol.dispose]();
    }
    } +
    + +

    Parameters

    • signal: AbortSignal
    • resource: ((event: Event) => void)
        • (event): void
        • Parameters

          • event: Event

          Returns void

    Returns Disposable

    Disposable that removes the abort listener.

    +

    v20.5.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +

    For EventEmitters this behaves exactly the same as calling .listeners on +the emitter.

    +

    For EventTargets this is the only way to get the event listeners for the +event target. This is useful for debugging and diagnostic purposes.

    +
    import { getEventListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    const listener = () => console.log('Events are fun');
    ee.on('foo', listener);
    console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
    }
    {
    const et = new EventTarget();
    const listener = () => console.log('Events are fun');
    et.addEventListener('foo', listener);
    console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget
    • name: string | symbol

    Returns Function[]

    v15.2.0, v14.17.0

    +
  • Returns the currently set max amount of listeners.

    +

    For EventEmitters this behaves exactly the same as calling .getMaxListeners on +the emitter.

    +

    For EventTargets this is the only way to get the max event listeners for the +event target. If the number of event handlers on a single EventTarget exceeds +the max set, the EventTarget will print a warning.

    +
    import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    console.log(getMaxListeners(ee)); // 10
    setMaxListeners(11, ee);
    console.log(getMaxListeners(ee)); // 11
    }
    {
    const et = new EventTarget();
    console.log(getMaxListeners(et)); // 10
    setMaxListeners(11, et);
    console.log(getMaxListeners(et)); // 11
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget

    Returns number

    v19.9.0

    +
  • A class method that returns the number of listeners for the given eventName registered on the given emitter.

    +
    import { EventEmitter, listenerCount } from 'node:events';

    const myEmitter = new EventEmitter();
    myEmitter.on('event', () => {});
    myEmitter.on('event', () => {});
    console.log(listenerCount(myEmitter, 'event'));
    // Prints: 2 +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>

      The emitter to query

      +
    • eventName: string | symbol

      The event name

      +

    Returns number

    v0.9.12

    +

    Since v3.2.0 - Use listenerCount instead.

    +
  • import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo')) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here +
    + +

    Returns an AsyncIterator that iterates eventName events. It will throw +if the EventEmitter emits 'error'. It removes all listeners when +exiting the loop. The value returned by each iteration is an array +composed of the emitted event arguments.

    +

    An AbortSignal can be used to cancel waiting on events:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ac = new AbortController();

    (async () => {
    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo', { signal: ac.signal })) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here
    })();

    process.nextTick(() => ac.abort()); +
    + +

    Use the close option to specify an array of event names that will end the iteration:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    ee.emit('close');
    });

    for await (const event of on(ee, 'foo', { close: ['close'] })) {
    console.log(event); // prints ['bar'] [42]
    }
    // the loop will exit after 'close' is emitted
    console.log('done'); // prints 'done' +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

    An AsyncIterator that iterates eventName events emitted by the emitter

    +

    v13.6.0, v12.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

  • Creates a Promise that is fulfilled when the EventEmitter emits the given +event or that is rejected if the EventEmitter emits 'error' while waiting. +The Promise will resolve with an array of all the arguments emitted to the +given event.

    +

    This method is intentionally generic and works with the web platform EventTarget interface, which has no special'error' event +semantics and does not listen to the 'error' event.

    +
    import { once, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    process.nextTick(() => {
    ee.emit('myevent', 42);
    });

    const [value] = await once(ee, 'myevent');
    console.log(value);

    const err = new Error('kaboom');
    process.nextTick(() => {
    ee.emit('error', err);
    });

    try {
    await once(ee, 'myevent');
    } catch (err) {
    console.error('error happened', err);
    } +
    + +

    The special handling of the 'error' event is only used when events.once() is used to wait for another event. If events.once() is used to wait for the +'error' event itself, then it is treated as any other kind of event without +special handling:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();

    once(ee, 'error')
    .then(([err]) => console.log('ok', err.message))
    .catch((err) => console.error('error', err.message));

    ee.emit('error', new Error('boom'));

    // Prints: ok boom +
    + +

    An AbortSignal can be used to cancel waiting for the event:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();
    const ac = new AbortController();

    async function foo(emitter, event, signal) {
    try {
    await once(emitter, event, { signal });
    console.log('event emitted!');
    } catch (error) {
    if (error.name === 'AbortError') {
    console.error('Waiting for the event was canceled!');
    } else {
    console.error('There was an error', error.message);
    }
    }
    }

    foo(ee, 'foo', ac.signal);
    ac.abort(); // Abort waiting for the event
    ee.emit('foo'); // Prints: Waiting for the event was canceled! +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

    v11.13.0, v10.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

  • import { setMaxListeners, EventEmitter } from 'node:events';

    const target = new EventTarget();
    const emitter = new EventEmitter();

    setMaxListeners(5, target, emitter); +
    + +

    Parameters

    • Optionaln: number

      A non-negative number. The maximum number of listeners per EventTarget event.

      +
    • Rest...eventTargets: (EventEmitter<DefaultEventMap> | EventTarget)[]

    Returns void

    v15.4.0

    +
diff --git a/docs/6.9/classes/ListSearchIndexesCursor.html b/docs/6.9/classes/ListSearchIndexesCursor.html new file mode 100644 index 0000000000..8ea38dc40e --- /dev/null +++ b/docs/6.9/classes/ListSearchIndexesCursor.html @@ -0,0 +1,549 @@ +ListSearchIndexesCursor | mongodb

Class ListSearchIndexesCursor

Hierarchy (view full)

Properties

[asyncDispose]: (() => Promise<void>)

An alias for AbstractCursor.close|AbstractCursor.close().

+
pipeline: Document[]
captureRejections: boolean

Value: boolean

+

Change the default captureRejections option on all new EventEmitter objects.

+

v13.4.0, v12.16.0

+
captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

+

See how to write a custom rejection handler.

+

v13.4.0, v12.16.0

+
CLOSE: "close" = ...
defaultMaxListeners: number

By default, a maximum of 10 listeners can be registered for any single +event. This limit can be changed for individual EventEmitter instances +using the emitter.setMaxListeners(n) method. To change the default +for allEventEmitter instances, the events.defaultMaxListeners property +can be used. If this value is not a positive number, a RangeError is thrown.

+

Take caution when setting the events.defaultMaxListeners because the +change affects all EventEmitter instances, including those created before +the change is made. However, calling emitter.setMaxListeners(n) still has +precedence over events.defaultMaxListeners.

+

This is not a hard limit. The EventEmitter instance will allow +more listeners to be added but will output a trace warning to stderr indicating +that a "possible EventEmitter memory leak" has been detected. For any single +EventEmitter, the emitter.getMaxListeners() and emitter.setMaxListeners() methods can be used to +temporarily avoid this warning:

+
import { EventEmitter } from 'node:events';
const emitter = new EventEmitter();
emitter.setMaxListeners(emitter.getMaxListeners() + 1);
emitter.once('event', () => {
// do stuff
emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
}); +
+ +

The --trace-warnings command-line flag can be used to display the +stack trace for such warnings.

+

The emitted warning can be inspected with process.on('warning') and will +have the additional emitter, type, and count properties, referring to +the event emitter instance, the event's name and the number of attached +listeners, respectively. +Its name property is set to 'MaxListenersExceededWarning'.

+

v0.11.2

+
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

+

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted. Therefore, the process will still crash if no +regular 'error' listener is installed.

+

v13.6.0, v12.17.0

+

Accessors

  • get closed(): boolean
  • The cursor is closed and all remaining locally buffered documents have been iterated.

    +

    Returns boolean

  • get id(): undefined | Long
  • The cursor has no id until it receives a response from the initial cursor creating command.

    +

    It is non-zero for as long as the database has an open cursor.

    +

    The initiating command may receive a zero id if the entire result is in the firstBatch.

    +

    Returns undefined | Long

  • get killed(): boolean
  • A killCursors command was attempted on this cursor. +This is performed if the cursor id is non zero.

    +

    Returns boolean

Methods

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest...args: AnyRest

    Returns void

  • Add a cursor flag to the cursor

    +

    Parameters

    • flag:
          | "tailable"
          | "oplogReplay"
          | "noCursorTimeout"
          | "awaitData"
          | "partial"
          | "exhaust"

      The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial' -.

      +
    • value: boolean

      The flag boolean value.

      +

    Returns this

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns boolean

    v0.1.26

    +
  • Returns an array listing the events for which the emitter has registered +listeners. The values in the array are strings or Symbols.

    +
    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ] +
    + +

    Returns string[]

    v6.0.0

    +
  • Iterates over all the documents for this cursor using the iterator, callback pattern.

    +

    If the iterator returns false, iteration will stop.

    +

    Parameters

    • iterator: ((doc: {
          name: string;
      }) => boolean | void)

      The iteration callback.

      +
        • (doc): boolean | void
        • Parameters

          • doc: {
                name: string;
            }
            • name: string

          Returns boolean | void

    Returns Promise<void>

      +
    • Will be removed in a future release. Use for await...of instead.
    • +
    +
  • Returns the number of listeners listening for the event named eventName. +If listener is provided, it will return how many times the listener is found +in the list of the listeners of the event.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns number

    v3.2.0

    +
  • Map all documents using the provided function +If there is a transform set on the cursor, that will be called first and the result passed to +this function's transform.

    +

    Type Parameters

    • T

    Parameters

    • transform: ((doc: {
          name: string;
      }) => T)

      The mapping transformation method.

      +
        • (doc): T
        • Parameters

          • doc: {
                name: string;
            }
            • name: string

          Returns T

    Returns AggregationCursor<T>

    Note Cursors use null internally to indicate that there are no more documents in the cursor. Providing a mapping +function that maps values to null will result in the cursor closing itself before it has finished iterating +all documents. This will not result in a memory leak, just surprising behavior. For example:

    +
    const cursor = collection.find({});
    cursor.map(() => null);

    const documents = await cursor.toArray();
    // documents is always [], regardless of how many documents are in the collection. +
    + +

    Other falsey values are allowed:

    +
    const cursor = collection.find({});
    cursor.map(() => '');

    const documents = await cursor.toArray();
    // documents is now an array of empty strings +
    + +

    Note for Typescript Users: adding a transform changes the return type of the iteration of this cursor, +it does not return a new instance of a cursor. This means when calling map, +you should always assign the result to a new variable in order to get a correctly typed cursor variable. +Take note of the following example:

    +
    const cursor: FindCursor<Document> = coll.find();
    const mappedCursor: FindCursor<number> = cursor.map(doc => Object.keys(doc).length);
    const keyCounts: number[] = await mappedCursor.toArray(); // cursor.toArray() still returns Document[] +
    + +
  • Set a maxTimeMS on the cursor query, allowing for hard timeout limits on queries (Only supported on MongoDB 2.6 or higher)

    +

    Parameters

    • value: number

      Number of milliseconds to wait before aborting the query.

      +

    Returns this

  • Get the next available document from the cursor, returns null if no more documents are available.

    +

    Returns Promise<null | {
        name: string;
    }>

  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.1.101

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.3.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Add a project stage to the aggregation pipeline

    +

    Type Parameters

    Parameters

    Returns AggregationCursor<T>

    In order to strictly type this function you must provide an interface +that represents the effect of your projection on the result documents.

    +

    By default chaining a projection to your cursor changes the returned type to the generic Document type. +You should specify a parameterized type to have assertions on your final results.

    +
    // Best way
    const docs: AggregationCursor<{ a: number }> = cursor.project<{ a: number }>({ _id: 0, a: true });
    // Flexible way
    const docs: AggregationCursor<Document> = cursor.project({ _id: 0, a: true }); +
    + +
    const cursor: AggregationCursor<{ a: number; b: string }> = coll.aggregate([]);
    const projectCursor = cursor.project<{ a: number }>({ _id: 0, a: true });
    const aPropOnlyArray: {a: number}[] = await projectCursor.toArray();

    // or always use chaining and save the final cursor

    const cursor = coll.aggregate().project<{ a: string }>({
    _id: 0,
    a: { $convert: { input: '$a', to: 'string' }
    }}); +
    + +
  • Returns a copy of the array of listeners for the event named eventName, +including any wrappers (such as those created by .once()).

    +
    import { EventEmitter } from 'node:events';
    const emitter = new EventEmitter();
    emitter.once('log', () => console.log('log once'));

    // Returns a new Array with a function `onceWrapper` which has a property
    // `listener` which contains the original listener bound above
    const listeners = emitter.rawListeners('log');
    const logFnWrapper = listeners[0];

    // Logs "log once" to the console and does not unbind the `once` event
    logFnWrapper.listener();

    // Logs "log once" to the console and removes the listener
    logFnWrapper();

    emitter.on('log', () => console.log('log persistently'));
    // Will return a new Array with a single function bound by `.on()` above
    const newListeners = emitter.rawListeners('log');

    // Logs "log persistently" twice
    newListeners[0]();
    emitter.emit('log'); +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns AbstractCursorEvents[EventKey][]

    v9.4.0

    +
  • Removes all listeners, or those of the specified eventName.

    +

    It is bad practice to remove listeners added elsewhere in the code, +particularly when the EventEmitter instance was created by some other +component or module (e.g. sockets or file streams).

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    • Optionalevent: string | symbol | EventKey

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Rewind this cursor to its uninitialized state. Any options that are present on the cursor will +remain in effect. Iterating this cursor will cause new queries to be sent to the server, even +if the resultant data has already been retrieved by this cursor.

    +

    Returns void

  • By default EventEmitters will print a warning if more than 10 listeners are +added for a particular event. This is a useful default that helps finding +memory leaks. The emitter.setMaxListeners() method allows the limit to be +modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • n: number

    Returns this

    v0.3.5

    +
  • Returns an array of documents. The caller is responsible for making sure that there +is enough memory to store the results. Note that the array only contains partial +results when this cursor had been previously accessed. In that case, +cursor.rewind() can be used to reset the cursor.

    +

    Returns Promise<{
        name: string;
    }[]>

  • Experimental

    Listens once to the abort event on the provided signal.

    +

    Listening to the abort event on abort signals is unsafe and may +lead to resource leaks since another third party with the signal can +call e.stopImmediatePropagation(). Unfortunately Node.js cannot change +this since it would violate the web standard. Additionally, the original +API makes it easy to forget to remove listeners.

    +

    This API allows safely using AbortSignals in Node.js APIs by solving these +two issues by listening to the event such that stopImmediatePropagation does +not prevent the listener from running.

    +

    Returns a disposable so that it may be unsubscribed from more easily.

    +
    import { addAbortListener } from 'node:events';

    function example(signal) {
    let disposable;
    try {
    signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
    disposable = addAbortListener(signal, (e) => {
    // Do something when signal is aborted.
    });
    } finally {
    disposable?.[Symbol.dispose]();
    }
    } +
    + +

    Parameters

    • signal: AbortSignal
    • resource: ((event: Event) => void)
        • (event): void
        • Parameters

          • event: Event

          Returns void

    Returns Disposable

    Disposable that removes the abort listener.

    +

    v20.5.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +

    For EventEmitters this behaves exactly the same as calling .listeners on +the emitter.

    +

    For EventTargets this is the only way to get the event listeners for the +event target. This is useful for debugging and diagnostic purposes.

    +
    import { getEventListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    const listener = () => console.log('Events are fun');
    ee.on('foo', listener);
    console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
    }
    {
    const et = new EventTarget();
    const listener = () => console.log('Events are fun');
    et.addEventListener('foo', listener);
    console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget
    • name: string | symbol

    Returns Function[]

    v15.2.0, v14.17.0

    +
  • Returns the currently set max amount of listeners.

    +

    For EventEmitters this behaves exactly the same as calling .getMaxListeners on +the emitter.

    +

    For EventTargets this is the only way to get the max event listeners for the +event target. If the number of event handlers on a single EventTarget exceeds +the max set, the EventTarget will print a warning.

    +
    import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    console.log(getMaxListeners(ee)); // 10
    setMaxListeners(11, ee);
    console.log(getMaxListeners(ee)); // 11
    }
    {
    const et = new EventTarget();
    console.log(getMaxListeners(et)); // 10
    setMaxListeners(11, et);
    console.log(getMaxListeners(et)); // 11
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget

    Returns number

    v19.9.0

    +
  • A class method that returns the number of listeners for the given eventName registered on the given emitter.

    +
    import { EventEmitter, listenerCount } from 'node:events';

    const myEmitter = new EventEmitter();
    myEmitter.on('event', () => {});
    myEmitter.on('event', () => {});
    console.log(listenerCount(myEmitter, 'event'));
    // Prints: 2 +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>

      The emitter to query

      +
    • eventName: string | symbol

      The event name

      +

    Returns number

    v0.9.12

    +

    Since v3.2.0 - Use listenerCount instead.

    +
  • import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo')) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here +
    + +

    Returns an AsyncIterator that iterates eventName events. It will throw +if the EventEmitter emits 'error'. It removes all listeners when +exiting the loop. The value returned by each iteration is an array +composed of the emitted event arguments.

    +

    An AbortSignal can be used to cancel waiting on events:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ac = new AbortController();

    (async () => {
    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo', { signal: ac.signal })) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here
    })();

    process.nextTick(() => ac.abort()); +
    + +

    Use the close option to specify an array of event names that will end the iteration:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    ee.emit('close');
    });

    for await (const event of on(ee, 'foo', { close: ['close'] })) {
    console.log(event); // prints ['bar'] [42]
    }
    // the loop will exit after 'close' is emitted
    console.log('done'); // prints 'done' +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

    An AsyncIterator that iterates eventName events emitted by the emitter

    +

    v13.6.0, v12.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

  • Creates a Promise that is fulfilled when the EventEmitter emits the given +event or that is rejected if the EventEmitter emits 'error' while waiting. +The Promise will resolve with an array of all the arguments emitted to the +given event.

    +

    This method is intentionally generic and works with the web platform EventTarget interface, which has no special'error' event +semantics and does not listen to the 'error' event.

    +
    import { once, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    process.nextTick(() => {
    ee.emit('myevent', 42);
    });

    const [value] = await once(ee, 'myevent');
    console.log(value);

    const err = new Error('kaboom');
    process.nextTick(() => {
    ee.emit('error', err);
    });

    try {
    await once(ee, 'myevent');
    } catch (err) {
    console.error('error happened', err);
    } +
    + +

    The special handling of the 'error' event is only used when events.once() is used to wait for another event. If events.once() is used to wait for the +'error' event itself, then it is treated as any other kind of event without +special handling:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();

    once(ee, 'error')
    .then(([err]) => console.log('ok', err.message))
    .catch((err) => console.error('error', err.message));

    ee.emit('error', new Error('boom'));

    // Prints: ok boom +
    + +

    An AbortSignal can be used to cancel waiting for the event:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();
    const ac = new AbortController();

    async function foo(emitter, event, signal) {
    try {
    await once(emitter, event, { signal });
    console.log('event emitted!');
    } catch (error) {
    if (error.name === 'AbortError') {
    console.error('Waiting for the event was canceled!');
    } else {
    console.error('There was an error', error.message);
    }
    }
    }

    foo(ee, 'foo', ac.signal);
    ac.abort(); // Abort waiting for the event
    ee.emit('foo'); // Prints: Waiting for the event was canceled! +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

    v11.13.0, v10.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

  • import { setMaxListeners, EventEmitter } from 'node:events';

    const target = new EventTarget();
    const emitter = new EventEmitter();

    setMaxListeners(5, target, emitter); +
    + +

    Parameters

    • Optionaln: number

      A non-negative number. The maximum number of listeners per EventTarget event.

      +
    • Rest...eventTargets: (EventEmitter<DefaultEventMap> | EventTarget)[]

    Returns void

    v15.4.0

    +
diff --git a/docs/6.9/classes/MongoAPIError.html b/docs/6.9/classes/MongoAPIError.html new file mode 100644 index 0000000000..0364e3e993 --- /dev/null +++ b/docs/6.9/classes/MongoAPIError.html @@ -0,0 +1,29 @@ +MongoAPIError | mongodb

Class MongoAPIError

An error generated when the driver API is used incorrectly

+

Hierarchy (view full)

Constructors

  • Do not use this constructor!

    +

    Meant for internal use only.

    +

    Parameters

    • message: string
    • Optionaloptions: {
          cause?: Error;
      }
      • Optionalcause?: Error

    Returns MongoAPIError

    This class is only meant to be constructed within the driver. This constructor is +not subject to semantic versioning compatibility guarantees and may change at any time.

    +

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoAWSError.html b/docs/6.9/classes/MongoAWSError.html new file mode 100644 index 0000000000..d21b6df8c7 --- /dev/null +++ b/docs/6.9/classes/MongoAWSError.html @@ -0,0 +1,30 @@ +MongoAWSError | mongodb

Class MongoAWSError

A error generated when the user attempts to authenticate +via AWS, but fails

+

Hierarchy (view full)

Constructors

  • Do not use this constructor!

    +

    Meant for internal use only.

    +

    Parameters

    • message: string
    • Optionaloptions: {
          cause?: Error;
      }
      • Optionalcause?: Error

    Returns MongoAWSError

    This class is only meant to be constructed within the driver. This constructor is +not subject to semantic versioning compatibility guarantees and may change at any time.

    +

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoAzureError.html b/docs/6.9/classes/MongoAzureError.html new file mode 100644 index 0000000000..d621d2d655 --- /dev/null +++ b/docs/6.9/classes/MongoAzureError.html @@ -0,0 +1,30 @@ +MongoAzureError | mongodb

Class MongoAzureError

A error generated when the user attempts to authenticate +via Azure, but fails.

+

Hierarchy (view full)

Constructors

  • Do not use this constructor!

    +

    Meant for internal use only.

    +

    Parameters

    • message: string

    Returns MongoAzureError

    This class is only meant to be constructed within the driver. This constructor is +not subject to semantic versioning compatibility guarantees and may change at any time.

    +

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoBatchReExecutionError.html b/docs/6.9/classes/MongoBatchReExecutionError.html new file mode 100644 index 0000000000..c7bd632d53 --- /dev/null +++ b/docs/6.9/classes/MongoBatchReExecutionError.html @@ -0,0 +1,30 @@ +MongoBatchReExecutionError | mongodb

Class MongoBatchReExecutionError

An error generated when a batch command is re-executed after one of the commands in the batch +has failed

+

Hierarchy (view full)

Constructors

  • Do not use this constructor!

    +

    Meant for internal use only.

    +

    Parameters

    • message: string = 'This batch has already been executed, create new batch to execute'

    Returns MongoBatchReExecutionError

    This class is only meant to be constructed within the driver. This constructor is +not subject to semantic versioning compatibility guarantees and may change at any time.

    +

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoBulkWriteError.html b/docs/6.9/classes/MongoBulkWriteError.html new file mode 100644 index 0000000000..5616e9d4cc --- /dev/null +++ b/docs/6.9/classes/MongoBulkWriteError.html @@ -0,0 +1,52 @@ +MongoBulkWriteError | mongodb

Class MongoBulkWriteError

An error indicating an unsuccessful Bulk Write

+

Hierarchy (view full)

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
codeName?: string
connectionGeneration?: number
errInfo?: Document
errorResponse: ErrorDescription

Raw error result document returned by server.

+
message: string
ok?: number
stack?: string
topologyVersion?: TopologyVersion
writeConcernError?: Document
writeErrors: OneOrMore<WriteError> = []
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get insertedIds(): {
        [key: number]: any;
    }
  • Inserted document generated Id's, hash key is the index of the originating operation

    +

    Returns {
        [key: number]: any;
    }

    • [key: number]: any
  • get matchedCount(): number
  • Number of documents matched for update.

    +

    Returns number

  • get upsertedIds(): {
        [key: number]: any;
    }
  • Upserted document generated Id's, hash key is the index of the originating operation

    +

    Returns {
        [key: number]: any;
    }

    • [key: number]: any

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoChangeStreamError.html b/docs/6.9/classes/MongoChangeStreamError.html new file mode 100644 index 0000000000..7dec4a8294 --- /dev/null +++ b/docs/6.9/classes/MongoChangeStreamError.html @@ -0,0 +1,29 @@ +MongoChangeStreamError | mongodb

Class MongoChangeStreamError

An error generated when a ChangeStream operation fails to execute.

+

Hierarchy (view full)

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoClient.html b/docs/6.9/classes/MongoClient.html new file mode 100644 index 0000000000..9af0507f26 --- /dev/null +++ b/docs/6.9/classes/MongoClient.html @@ -0,0 +1,481 @@ +MongoClient | mongodb

Class MongoClient

The MongoClient class is a class that allows for making Connections to MongoDB.

+

The programmatically provided options take precedence over the URI options.

+
import { MongoClient } from 'mongodb';

// Enable command monitoring for debugging
const client = new MongoClient('mongodb://localhost:27017', { monitorCommands: true });

client.on('commandStarted', started => console.log(started));
client.db().collection('pets');
await client.insertOne({ name: 'spot', kind: 'dog' }); +
+ +

Hierarchy (view full)

Implements

Constructors

Properties

[asyncDispose]: (() => Promise<void>)

An alias for MongoClient.close().

+
captureRejections: boolean

Value: boolean

+

Change the default captureRejections option on all new EventEmitter objects.

+

v13.4.0, v12.16.0

+
captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

+

See how to write a custom rejection handler.

+

v13.4.0, v12.16.0

+
defaultMaxListeners: number

By default, a maximum of 10 listeners can be registered for any single +event. This limit can be changed for individual EventEmitter instances +using the emitter.setMaxListeners(n) method. To change the default +for allEventEmitter instances, the events.defaultMaxListeners property +can be used. If this value is not a positive number, a RangeError is thrown.

+

Take caution when setting the events.defaultMaxListeners because the +change affects all EventEmitter instances, including those created before +the change is made. However, calling emitter.setMaxListeners(n) still has +precedence over events.defaultMaxListeners.

+

This is not a hard limit. The EventEmitter instance will allow +more listeners to be added but will output a trace warning to stderr indicating +that a "possible EventEmitter memory leak" has been detected. For any single +EventEmitter, the emitter.getMaxListeners() and emitter.setMaxListeners() methods can be used to +temporarily avoid this warning:

+
import { EventEmitter } from 'node:events';
const emitter = new EventEmitter();
emitter.setMaxListeners(emitter.getMaxListeners() + 1);
emitter.once('event', () => {
// do stuff
emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
}); +
+ +

The --trace-warnings command-line flag can be used to display the +stack trace for such warnings.

+

The emitted warning can be inspected with process.on('warning') and will +have the additional emitter, type, and count properties, referring to +the event emitter instance, the event's name and the number of attached +listeners, respectively. +Its name property is set to 'MaxListenersExceededWarning'.

+

v0.11.2

+
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

+

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted. Therefore, the process will still crash if no +regular 'error' listener is installed.

+

v13.6.0, v12.17.0

+

Accessors

Methods

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest...args: AnyRest

    Returns void

  • Alias for emitter.on(eventName, listener).

    +

    Type Parameters

    • EventKey extends
          | "error"
          | "timeout"
          | "close"
          | "open"
          | "serverOpening"
          | "serverClosed"
          | "serverDescriptionChanged"
          | "topologyOpening"
          | "topologyClosed"
          | "topologyDescriptionChanged"
          | "connectionPoolCreated"
          | "connectionPoolClosed"
          | "connectionPoolCleared"
          | "connectionPoolReady"
          | "connectionCreated"
          | "connectionReady"
          | "connectionClosed"
          | "connectionCheckOutStarted"
          | "connectionCheckOutFailed"
          | "connectionCheckedOut"
          | "connectionCheckedIn"
          | "commandStarted"
          | "commandSucceeded"
          | "commandFailed"
          | "serverHeartbeatStarted"
          | "serverHeartbeatSucceeded"
          | "serverHeartbeatFailed"

    Parameters

    Returns this

    v0.1.26

    +
  • Alias for emitter.on(eventName, listener).

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Alias for emitter.on(eventName, listener).

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Cleans up client-side resources used by the MongoCLient and . This includes:

    +
      +
    • Closes all open, unused connections (see note).
    • +
    • Ends all in-use sessions with ClientSession.endSession().
    • +
    • Ends all unused sessions server-side.
    • +
    • Cleans up any resources being used for auto encryption if auto encryption is enabled.
    • +
    +

    Parameters

    • force: boolean = false

      Force close, emitting no events

      +

    Returns Promise<void>

    Any in-progress operations are not killed and any connections used by in progress operations +will be cleaned up lazily as operations finish.

    +
  • Create a new Db instance sharing the current socket connections.

    +

    Parameters

    • OptionaldbName: string

      The name of the database we want to use. If not provided, use database name from connection string.

      +
    • Optionaloptions: DbOptions

      Optional settings for Db construction

      +

    Returns Db

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Type Parameters

    • EventKey extends
          | "error"
          | "timeout"
          | "close"
          | "open"
          | "serverOpening"
          | "serverClosed"
          | "serverDescriptionChanged"
          | "topologyOpening"
          | "topologyClosed"
          | "topologyDescriptionChanged"
          | "connectionPoolCreated"
          | "connectionPoolClosed"
          | "connectionPoolCleared"
          | "connectionPoolReady"
          | "connectionCreated"
          | "connectionReady"
          | "connectionClosed"
          | "connectionCheckOutStarted"
          | "connectionCheckOutFailed"
          | "connectionCheckedOut"
          | "connectionCheckedIn"
          | "commandStarted"
          | "commandSucceeded"
          | "commandFailed"
          | "serverHeartbeatStarted"
          | "serverHeartbeatSucceeded"
          | "serverHeartbeatFailed"

    Parameters

    Returns boolean

    v0.1.26

    +
  • Returns an array listing the events for which the emitter has registered +listeners. The values in the array are strings or Symbols.

    +
    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ] +
    + +

    Returns string[]

    v6.0.0

    +
  • Returns the number of listeners listening for the event named eventName. +If listener is provided, it will return how many times the listener is found +in the list of the listeners of the event.

    +

    Type Parameters

    • EventKey extends
          | "error"
          | "timeout"
          | "close"
          | "open"
          | "serverOpening"
          | "serverClosed"
          | "serverDescriptionChanged"
          | "topologyOpening"
          | "topologyClosed"
          | "topologyDescriptionChanged"
          | "connectionPoolCreated"
          | "connectionPoolClosed"
          | "connectionPoolCleared"
          | "connectionPoolReady"
          | "connectionCreated"
          | "connectionReady"
          | "connectionClosed"
          | "connectionCheckOutStarted"
          | "connectionCheckOutFailed"
          | "connectionCheckedOut"
          | "connectionCheckedIn"
          | "commandStarted"
          | "commandSucceeded"
          | "commandFailed"
          | "serverHeartbeatStarted"
          | "serverHeartbeatSucceeded"
          | "serverHeartbeatFailed"

    Parameters

    Returns number

    v3.2.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    });
    console.log(util.inspect(server.listeners('connection')));
    // Prints: [ [Function] ] +
    + +

    Type Parameters

    • EventKey extends
          | "error"
          | "timeout"
          | "close"
          | "open"
          | "serverOpening"
          | "serverClosed"
          | "serverDescriptionChanged"
          | "topologyOpening"
          | "topologyClosed"
          | "topologyDescriptionChanged"
          | "connectionPoolCreated"
          | "connectionPoolClosed"
          | "connectionPoolCleared"
          | "connectionPoolReady"
          | "connectionCreated"
          | "connectionReady"
          | "connectionClosed"
          | "connectionCheckOutStarted"
          | "connectionCheckOutFailed"
          | "connectionCheckedOut"
          | "connectionCheckedIn"
          | "commandStarted"
          | "commandSucceeded"
          | "commandFailed"
          | "serverHeartbeatStarted"
          | "serverHeartbeatSucceeded"
          | "serverHeartbeatFailed"

    Parameters

    Returns MongoClientEvents[EventKey][]

    v0.1.26

    +
  • Alias for emitter.removeListener().

    +

    Type Parameters

    • EventKey extends
          | "error"
          | "timeout"
          | "close"
          | "open"
          | "serverOpening"
          | "serverClosed"
          | "serverDescriptionChanged"
          | "topologyOpening"
          | "topologyClosed"
          | "topologyDescriptionChanged"
          | "connectionPoolCreated"
          | "connectionPoolClosed"
          | "connectionPoolCleared"
          | "connectionPoolReady"
          | "connectionCreated"
          | "connectionReady"
          | "connectionClosed"
          | "connectionCheckOutStarted"
          | "connectionCheckOutFailed"
          | "connectionCheckedOut"
          | "connectionCheckedIn"
          | "commandStarted"
          | "commandSucceeded"
          | "commandFailed"
          | "serverHeartbeatStarted"
          | "serverHeartbeatSucceeded"
          | "serverHeartbeatFailed"

    Parameters

    Returns this

    v10.0.0

    +
  • Alias for emitter.removeListener().

    +

    Parameters

    Returns this

    v10.0.0

    +
  • Alias for emitter.removeListener().

    +

    Parameters

    Returns this

    v10.0.0

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends
          | "error"
          | "timeout"
          | "close"
          | "open"
          | "serverOpening"
          | "serverClosed"
          | "serverDescriptionChanged"
          | "topologyOpening"
          | "topologyClosed"
          | "topologyDescriptionChanged"
          | "connectionPoolCreated"
          | "connectionPoolClosed"
          | "connectionPoolCleared"
          | "connectionPoolReady"
          | "connectionCreated"
          | "connectionReady"
          | "connectionClosed"
          | "connectionCheckOutStarted"
          | "connectionCheckOutFailed"
          | "connectionCheckedOut"
          | "connectionCheckedIn"
          | "commandStarted"
          | "commandSucceeded"
          | "commandFailed"
          | "serverHeartbeatStarted"
          | "serverHeartbeatSucceeded"
          | "serverHeartbeatFailed"

    Parameters

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.1.101

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends
          | "error"
          | "timeout"
          | "close"
          | "open"
          | "serverOpening"
          | "serverClosed"
          | "serverDescriptionChanged"
          | "topologyOpening"
          | "topologyClosed"
          | "topologyDescriptionChanged"
          | "connectionPoolCreated"
          | "connectionPoolClosed"
          | "connectionPoolCleared"
          | "connectionPoolReady"
          | "connectionCreated"
          | "connectionReady"
          | "connectionClosed"
          | "connectionCheckOutStarted"
          | "connectionCheckOutFailed"
          | "connectionCheckedOut"
          | "connectionCheckedIn"
          | "commandStarted"
          | "commandSucceeded"
          | "commandFailed"
          | "serverHeartbeatStarted"
          | "serverHeartbeatSucceeded"
          | "serverHeartbeatFailed"

    Parameters

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.3.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends
          | "error"
          | "timeout"
          | "close"
          | "open"
          | "serverOpening"
          | "serverClosed"
          | "serverDescriptionChanged"
          | "topologyOpening"
          | "topologyClosed"
          | "topologyDescriptionChanged"
          | "connectionPoolCreated"
          | "connectionPoolClosed"
          | "connectionPoolCleared"
          | "connectionPoolReady"
          | "connectionCreated"
          | "connectionReady"
          | "connectionClosed"
          | "connectionCheckOutStarted"
          | "connectionCheckOutFailed"
          | "connectionCheckedOut"
          | "connectionCheckedIn"
          | "commandStarted"
          | "commandSucceeded"
          | "commandFailed"
          | "serverHeartbeatStarted"
          | "serverHeartbeatSucceeded"
          | "serverHeartbeatFailed"

    Parameters

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends
          | "error"
          | "timeout"
          | "close"
          | "open"
          | "serverOpening"
          | "serverClosed"
          | "serverDescriptionChanged"
          | "topologyOpening"
          | "topologyClosed"
          | "topologyDescriptionChanged"
          | "connectionPoolCreated"
          | "connectionPoolClosed"
          | "connectionPoolCleared"
          | "connectionPoolReady"
          | "connectionCreated"
          | "connectionReady"
          | "connectionClosed"
          | "connectionCheckOutStarted"
          | "connectionCheckOutFailed"
          | "connectionCheckedOut"
          | "connectionCheckedIn"
          | "commandStarted"
          | "commandSucceeded"
          | "commandFailed"
          | "serverHeartbeatStarted"
          | "serverHeartbeatSucceeded"
          | "serverHeartbeatFailed"

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Returns a copy of the array of listeners for the event named eventName, +including any wrappers (such as those created by .once()).

    +
    import { EventEmitter } from 'node:events';
    const emitter = new EventEmitter();
    emitter.once('log', () => console.log('log once'));

    // Returns a new Array with a function `onceWrapper` which has a property
    // `listener` which contains the original listener bound above
    const listeners = emitter.rawListeners('log');
    const logFnWrapper = listeners[0];

    // Logs "log once" to the console and does not unbind the `once` event
    logFnWrapper.listener();

    // Logs "log once" to the console and removes the listener
    logFnWrapper();

    emitter.on('log', () => console.log('log persistently'));
    // Will return a new Array with a single function bound by `.on()` above
    const newListeners = emitter.rawListeners('log');

    // Logs "log persistently" twice
    newListeners[0]();
    emitter.emit('log'); +
    + +

    Type Parameters

    • EventKey extends
          | "error"
          | "timeout"
          | "close"
          | "open"
          | "serverOpening"
          | "serverClosed"
          | "serverDescriptionChanged"
          | "topologyOpening"
          | "topologyClosed"
          | "topologyDescriptionChanged"
          | "connectionPoolCreated"
          | "connectionPoolClosed"
          | "connectionPoolCleared"
          | "connectionPoolReady"
          | "connectionCreated"
          | "connectionReady"
          | "connectionClosed"
          | "connectionCheckOutStarted"
          | "connectionCheckOutFailed"
          | "connectionCheckedOut"
          | "connectionCheckedIn"
          | "commandStarted"
          | "commandSucceeded"
          | "commandFailed"
          | "serverHeartbeatStarted"
          | "serverHeartbeatSucceeded"
          | "serverHeartbeatFailed"

    Parameters

    Returns MongoClientEvents[EventKey][]

    v9.4.0

    +
  • Removes all listeners, or those of the specified eventName.

    +

    It is bad practice to remove listeners added elsewhere in the code, +particularly when the EventEmitter instance was created by some other +component or module (e.g. sockets or file streams).

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends
          | "error"
          | "timeout"
          | "close"
          | "open"
          | "serverOpening"
          | "serverClosed"
          | "serverDescriptionChanged"
          | "topologyOpening"
          | "topologyClosed"
          | "topologyDescriptionChanged"
          | "connectionPoolCreated"
          | "connectionPoolClosed"
          | "connectionPoolCleared"
          | "connectionPoolReady"
          | "connectionCreated"
          | "connectionReady"
          | "connectionClosed"
          | "connectionCheckOutStarted"
          | "connectionCheckOutFailed"
          | "connectionCheckedOut"
          | "connectionCheckedIn"
          | "commandStarted"
          | "commandSucceeded"
          | "commandFailed"
          | "serverHeartbeatStarted"
          | "serverHeartbeatSucceeded"
          | "serverHeartbeatFailed"

    Parameters

    • Optionalevent: string | symbol | EventKey

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends
          | "error"
          | "timeout"
          | "close"
          | "open"
          | "serverOpening"
          | "serverClosed"
          | "serverDescriptionChanged"
          | "topologyOpening"
          | "topologyClosed"
          | "topologyDescriptionChanged"
          | "connectionPoolCreated"
          | "connectionPoolClosed"
          | "connectionPoolCleared"
          | "connectionPoolReady"
          | "connectionCreated"
          | "connectionReady"
          | "connectionClosed"
          | "connectionCheckOutStarted"
          | "connectionCheckOutFailed"
          | "connectionCheckedOut"
          | "connectionCheckedIn"
          | "commandStarted"
          | "commandSucceeded"
          | "commandFailed"
          | "serverHeartbeatStarted"
          | "serverHeartbeatSucceeded"
          | "serverHeartbeatFailed"

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • By default EventEmitters will print a warning if more than 10 listeners are +added for a particular event. This is a useful default that helps finding +memory leaks. The emitter.setMaxListeners() method allows the limit to be +modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • n: number

    Returns this

    v0.3.5

    +
  • Creates a new ClientSession. When using the returned session in an operation +a corresponding ServerSession will be created.

    +

    Parameters

    Returns ClientSession

    A ClientSession instance may only be passed to operations being performed on the same +MongoClient it was started from.

    +
  • Create a new Change Stream, watching for new changes (insertions, updates, +replacements, deletions, and invalidations) in this cluster. Will ignore all +changes to system collections, as well as the local, admin, and config databases.

    +

    Type Parameters

    Parameters

    • pipeline: Document[] = []

      An array of pipeline stages through which to pass change stream documents. This allows for filtering (using $match) and manipulating the change stream documents.

      +
    • options: ChangeStreamOptions = {}

      Optional settings for the command

      +

    Returns ChangeStream<TSchema, TChange>

    watch() accepts two generic arguments for distinct use cases:

    +
      +
    • The first is to provide the schema that may be defined for all the data within the current cluster
    • +
    • The second is to override the shape of the change stream document entirely, if it is not provided the type will default to ChangeStreamDocument of the first argument
    • +
    +
  • A convenience method for creating and handling the clean up of a ClientSession. +The session will always be ended when the executor finishes.

    +

    Type Parameters

    • T = any

    Parameters

    • executor: WithSessionCallback<T>

      An executor function that all operations using the provided session must be invoked in

      +

    Returns Promise<T>

  • Type Parameters

    • T = any

    Parameters

    Returns Promise<T>

  • Experimental

    Listens once to the abort event on the provided signal.

    +

    Listening to the abort event on abort signals is unsafe and may +lead to resource leaks since another third party with the signal can +call e.stopImmediatePropagation(). Unfortunately Node.js cannot change +this since it would violate the web standard. Additionally, the original +API makes it easy to forget to remove listeners.

    +

    This API allows safely using AbortSignals in Node.js APIs by solving these +two issues by listening to the event such that stopImmediatePropagation does +not prevent the listener from running.

    +

    Returns a disposable so that it may be unsubscribed from more easily.

    +
    import { addAbortListener } from 'node:events';

    function example(signal) {
    let disposable;
    try {
    signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
    disposable = addAbortListener(signal, (e) => {
    // Do something when signal is aborted.
    });
    } finally {
    disposable?.[Symbol.dispose]();
    }
    } +
    + +

    Parameters

    • signal: AbortSignal
    • resource: ((event: Event) => void)
        • (event): void
        • Parameters

          • event: Event

          Returns void

    Returns Disposable

    Disposable that removes the abort listener.

    +

    v20.5.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +

    For EventEmitters this behaves exactly the same as calling .listeners on +the emitter.

    +

    For EventTargets this is the only way to get the event listeners for the +event target. This is useful for debugging and diagnostic purposes.

    +
    import { getEventListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    const listener = () => console.log('Events are fun');
    ee.on('foo', listener);
    console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
    }
    {
    const et = new EventTarget();
    const listener = () => console.log('Events are fun');
    et.addEventListener('foo', listener);
    console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget
    • name: string | symbol

    Returns Function[]

    v15.2.0, v14.17.0

    +
  • Returns the currently set max amount of listeners.

    +

    For EventEmitters this behaves exactly the same as calling .getMaxListeners on +the emitter.

    +

    For EventTargets this is the only way to get the max event listeners for the +event target. If the number of event handlers on a single EventTarget exceeds +the max set, the EventTarget will print a warning.

    +
    import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    console.log(getMaxListeners(ee)); // 10
    setMaxListeners(11, ee);
    console.log(getMaxListeners(ee)); // 11
    }
    {
    const et = new EventTarget();
    console.log(getMaxListeners(et)); // 10
    setMaxListeners(11, et);
    console.log(getMaxListeners(et)); // 11
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget

    Returns number

    v19.9.0

    +
  • A class method that returns the number of listeners for the given eventName registered on the given emitter.

    +
    import { EventEmitter, listenerCount } from 'node:events';

    const myEmitter = new EventEmitter();
    myEmitter.on('event', () => {});
    myEmitter.on('event', () => {});
    console.log(listenerCount(myEmitter, 'event'));
    // Prints: 2 +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>

      The emitter to query

      +
    • eventName: string | symbol

      The event name

      +

    Returns number

    v0.9.12

    +

    Since v3.2.0 - Use listenerCount instead.

    +
  • import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo')) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here +
    + +

    Returns an AsyncIterator that iterates eventName events. It will throw +if the EventEmitter emits 'error'. It removes all listeners when +exiting the loop. The value returned by each iteration is an array +composed of the emitted event arguments.

    +

    An AbortSignal can be used to cancel waiting on events:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ac = new AbortController();

    (async () => {
    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo', { signal: ac.signal })) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here
    })();

    process.nextTick(() => ac.abort()); +
    + +

    Use the close option to specify an array of event names that will end the iteration:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    ee.emit('close');
    });

    for await (const event of on(ee, 'foo', { close: ['close'] })) {
    console.log(event); // prints ['bar'] [42]
    }
    // the loop will exit after 'close' is emitted
    console.log('done'); // prints 'done' +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

    An AsyncIterator that iterates eventName events emitted by the emitter

    +

    v13.6.0, v12.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

  • Creates a Promise that is fulfilled when the EventEmitter emits the given +event or that is rejected if the EventEmitter emits 'error' while waiting. +The Promise will resolve with an array of all the arguments emitted to the +given event.

    +

    This method is intentionally generic and works with the web platform EventTarget interface, which has no special'error' event +semantics and does not listen to the 'error' event.

    +
    import { once, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    process.nextTick(() => {
    ee.emit('myevent', 42);
    });

    const [value] = await once(ee, 'myevent');
    console.log(value);

    const err = new Error('kaboom');
    process.nextTick(() => {
    ee.emit('error', err);
    });

    try {
    await once(ee, 'myevent');
    } catch (err) {
    console.error('error happened', err);
    } +
    + +

    The special handling of the 'error' event is only used when events.once() is used to wait for another event. If events.once() is used to wait for the +'error' event itself, then it is treated as any other kind of event without +special handling:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();

    once(ee, 'error')
    .then(([err]) => console.log('ok', err.message))
    .catch((err) => console.error('error', err.message));

    ee.emit('error', new Error('boom'));

    // Prints: ok boom +
    + +

    An AbortSignal can be used to cancel waiting for the event:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();
    const ac = new AbortController();

    async function foo(emitter, event, signal) {
    try {
    await once(emitter, event, { signal });
    console.log('event emitted!');
    } catch (error) {
    if (error.name === 'AbortError') {
    console.error('Waiting for the event was canceled!');
    } else {
    console.error('There was an error', error.message);
    }
    }
    }

    foo(ee, 'foo', ac.signal);
    ac.abort(); // Abort waiting for the event
    ee.emit('foo'); // Prints: Waiting for the event was canceled! +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

    v11.13.0, v10.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

  • import { setMaxListeners, EventEmitter } from 'node:events';

    const target = new EventTarget();
    const emitter = new EventEmitter();

    setMaxListeners(5, target, emitter); +
    + +

    Parameters

    • Optionaln: number

      A non-negative number. The maximum number of listeners per EventTarget event.

      +
    • Rest...eventTargets: (EventEmitter<DefaultEventMap> | EventTarget)[]

    Returns void

    v15.4.0

    +
diff --git a/docs/6.9/classes/MongoCompatibilityError.html b/docs/6.9/classes/MongoCompatibilityError.html new file mode 100644 index 0000000000..ddba13bdc6 --- /dev/null +++ b/docs/6.9/classes/MongoCompatibilityError.html @@ -0,0 +1,30 @@ +MongoCompatibilityError | mongodb

Class MongoCompatibilityError

An error generated when a feature that is not enabled or allowed for the current server +configuration is used

+

Hierarchy (view full)

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoCredentials.html b/docs/6.9/classes/MongoCredentials.html new file mode 100644 index 0000000000..3de561d930 --- /dev/null +++ b/docs/6.9/classes/MongoCredentials.html @@ -0,0 +1,21 @@ +MongoCredentials | mongodb

Class MongoCredentials

A representation of the credentials used by MongoDB

+

Constructors

Properties

mechanism: AuthMechanism

The method used to authenticate

+
mechanismProperties: AuthMechanismProperties

Special properties used by some types of auth mechanisms

+
password: string

The password used for authentication

+
source: string

The database that the user should authenticate against

+
username: string

The username used for authentication

+

Methods

diff --git a/docs/6.9/classes/MongoCryptAzureKMSRequestError.html b/docs/6.9/classes/MongoCryptAzureKMSRequestError.html new file mode 100644 index 0000000000..59655e74a8 --- /dev/null +++ b/docs/6.9/classes/MongoCryptAzureKMSRequestError.html @@ -0,0 +1,31 @@ +MongoCryptAzureKMSRequestError | mongodb

Class MongoCryptAzureKMSRequestError

An error indicating that mongodb-client-encryption failed to auto-refresh Azure KMS credentials.

+

Hierarchy (view full)

Constructors

Properties

body?: Document

The body of the http response that failed, if present.

+
cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoCryptCreateDataKeyError.html b/docs/6.9/classes/MongoCryptCreateDataKeyError.html new file mode 100644 index 0000000000..90275a0026 --- /dev/null +++ b/docs/6.9/classes/MongoCryptCreateDataKeyError.html @@ -0,0 +1,30 @@ +MongoCryptCreateDataKeyError | mongodb

Class MongoCryptCreateDataKeyError

An error indicating that ClientEncryption.createEncryptedCollection() failed to create data keys

+

Hierarchy (view full)

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
encryptedFields: Document
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoCryptCreateEncryptedCollectionError.html b/docs/6.9/classes/MongoCryptCreateEncryptedCollectionError.html new file mode 100644 index 0000000000..6b7bef96ec --- /dev/null +++ b/docs/6.9/classes/MongoCryptCreateEncryptedCollectionError.html @@ -0,0 +1,30 @@ +MongoCryptCreateEncryptedCollectionError | mongodb

Class MongoCryptCreateEncryptedCollectionError

An error indicating that ClientEncryption.createEncryptedCollection() failed to create a collection

+

Hierarchy (view full)

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
encryptedFields: Document
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoCryptError.html b/docs/6.9/classes/MongoCryptError.html new file mode 100644 index 0000000000..6dbcefb292 --- /dev/null +++ b/docs/6.9/classes/MongoCryptError.html @@ -0,0 +1,29 @@ +MongoCryptError | mongodb

Class MongoCryptError

An error indicating that something went wrong specifically with MongoDB Client Encryption

+

Hierarchy (view full)

Constructors

  • Do not use this constructor!

    +

    Meant for internal use only.

    +

    Parameters

    • message: string
    • options: {
          cause?: Error;
      } = {}
      • Optionalcause?: Error

    Returns MongoCryptError

    This class is only meant to be constructed within the driver. This constructor is +not subject to semantic versioning compatibility guarantees and may change at any time.

    +

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoCryptInvalidArgumentError.html b/docs/6.9/classes/MongoCryptInvalidArgumentError.html new file mode 100644 index 0000000000..6ad359e789 --- /dev/null +++ b/docs/6.9/classes/MongoCryptInvalidArgumentError.html @@ -0,0 +1,29 @@ +MongoCryptInvalidArgumentError | mongodb

Class MongoCryptInvalidArgumentError

An error indicating an invalid argument was provided to an encryption API.

+

Hierarchy (view full)

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoCryptKMSRequestNetworkTimeoutError.html b/docs/6.9/classes/MongoCryptKMSRequestNetworkTimeoutError.html new file mode 100644 index 0000000000..1eb27fadd0 --- /dev/null +++ b/docs/6.9/classes/MongoCryptKMSRequestNetworkTimeoutError.html @@ -0,0 +1,28 @@ +MongoCryptKMSRequestNetworkTimeoutError | mongodb

Class MongoCryptKMSRequestNetworkTimeoutError

Hierarchy (view full)

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoCursorExhaustedError.html b/docs/6.9/classes/MongoCursorExhaustedError.html new file mode 100644 index 0000000000..20069a9bb7 --- /dev/null +++ b/docs/6.9/classes/MongoCursorExhaustedError.html @@ -0,0 +1,29 @@ +MongoCursorExhaustedError | mongodb

Class MongoCursorExhaustedError

An error thrown when an attempt is made to read from a cursor that has been exhausted

+

Hierarchy (view full)

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoCursorInUseError.html b/docs/6.9/classes/MongoCursorInUseError.html new file mode 100644 index 0000000000..dd21cdb429 --- /dev/null +++ b/docs/6.9/classes/MongoCursorInUseError.html @@ -0,0 +1,30 @@ +MongoCursorInUseError | mongodb

Class MongoCursorInUseError

An error thrown when the user attempts to add options to a cursor that has already been +initialized

+

Hierarchy (view full)

Constructors

  • Do not use this constructor!

    +

    Meant for internal use only.

    +

    Parameters

    • message: string = 'Cursor is already initialized'

    Returns MongoCursorInUseError

    This class is only meant to be constructed within the driver. This constructor is +not subject to semantic versioning compatibility guarantees and may change at any time.

    +

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoDBCollectionNamespace.html b/docs/6.9/classes/MongoDBCollectionNamespace.html new file mode 100644 index 0000000000..22287a1959 --- /dev/null +++ b/docs/6.9/classes/MongoDBCollectionNamespace.html @@ -0,0 +1,12 @@ +MongoDBCollectionNamespace | mongodb

Class MongoDBCollectionNamespace

A class representing a collection's namespace. This class enforces (through Typescript) that +the collection portion of the namespace is defined and should only be +used in scenarios where this can be guaranteed.

+

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

collection: string

collection name

+
db: string

database name

+

Methods

diff --git a/docs/6.9/classes/MongoDBNamespace.html b/docs/6.9/classes/MongoDBNamespace.html new file mode 100644 index 0000000000..5a5cce734a --- /dev/null +++ b/docs/6.9/classes/MongoDBNamespace.html @@ -0,0 +1,12 @@ +MongoDBNamespace | mongodb

Class MongoDBNamespace

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

collection?: string

collection name

+
db: string

database name

+

Methods

diff --git a/docs/6.9/classes/MongoDecompressionError.html b/docs/6.9/classes/MongoDecompressionError.html new file mode 100644 index 0000000000..5125059e1f --- /dev/null +++ b/docs/6.9/classes/MongoDecompressionError.html @@ -0,0 +1,30 @@ +MongoDecompressionError | mongodb

Class MongoDecompressionError

An error generated when the driver fails to decompress +data received from the server.

+

Hierarchy (view full)

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoDriverError.html b/docs/6.9/classes/MongoDriverError.html new file mode 100644 index 0000000000..2565a99542 --- /dev/null +++ b/docs/6.9/classes/MongoDriverError.html @@ -0,0 +1,29 @@ +MongoDriverError | mongodb

Class MongoDriverError

An error generated by the driver

+

Hierarchy (view full)

Constructors

  • Do not use this constructor!

    +

    Meant for internal use only.

    +

    Parameters

    • message: string
    • Optionaloptions: {
          cause?: Error;
      }
      • Optionalcause?: Error

    Returns MongoDriverError

    This class is only meant to be constructed within the driver. This constructor is +not subject to semantic versioning compatibility guarantees and may change at any time.

    +

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoError.html b/docs/6.9/classes/MongoError.html new file mode 100644 index 0000000000..e165b30113 --- /dev/null +++ b/docs/6.9/classes/MongoError.html @@ -0,0 +1,28 @@ +MongoError | mongodb

Class MongoError

Hierarchy (view full)

Constructors

  • Do not use this constructor!

    +

    Meant for internal use only.

    +

    Parameters

    • message: string
    • Optionaloptions: {
          cause?: Error;
      }
      • Optionalcause?: Error

    Returns MongoError

    This class is only meant to be constructed within the driver. This constructor is +not subject to semantic versioning compatibility guarantees and may change at any time.

    +

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

Methods

  • Parameters

    • label: string

    Returns void

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoExpiredSessionError.html b/docs/6.9/classes/MongoExpiredSessionError.html new file mode 100644 index 0000000000..2bb9cae9f0 --- /dev/null +++ b/docs/6.9/classes/MongoExpiredSessionError.html @@ -0,0 +1,30 @@ +MongoExpiredSessionError | mongodb

Class MongoExpiredSessionError

An error generated when the user attempts to operate +on a session that has expired or has been closed.

+

Hierarchy (view full)

Constructors

  • Do not use this constructor!

    +

    Meant for internal use only.

    +

    Parameters

    • message: string = 'Cannot use a session that has ended'

    Returns MongoExpiredSessionError

    This class is only meant to be constructed within the driver. This constructor is +not subject to semantic versioning compatibility guarantees and may change at any time.

    +

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoGCPError.html b/docs/6.9/classes/MongoGCPError.html new file mode 100644 index 0000000000..b8ca411435 --- /dev/null +++ b/docs/6.9/classes/MongoGCPError.html @@ -0,0 +1,30 @@ +MongoGCPError | mongodb

Class MongoGCPError

A error generated when the user attempts to authenticate +via GCP, but fails.

+

Hierarchy (view full)

Constructors

  • Do not use this constructor!

    +

    Meant for internal use only.

    +

    Parameters

    • message: string

    Returns MongoGCPError

    This class is only meant to be constructed within the driver. This constructor is +not subject to semantic versioning compatibility guarantees and may change at any time.

    +

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoGridFSChunkError.html b/docs/6.9/classes/MongoGridFSChunkError.html new file mode 100644 index 0000000000..fb29e14e56 --- /dev/null +++ b/docs/6.9/classes/MongoGridFSChunkError.html @@ -0,0 +1,30 @@ +MongoGridFSChunkError | mongodb

Class MongoGridFSChunkError

An error generated when a malformed or invalid chunk is +encountered when reading from a GridFSStream.

+

Hierarchy (view full)

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoGridFSStreamError.html b/docs/6.9/classes/MongoGridFSStreamError.html new file mode 100644 index 0000000000..a2c81b4369 --- /dev/null +++ b/docs/6.9/classes/MongoGridFSStreamError.html @@ -0,0 +1,29 @@ +MongoGridFSStreamError | mongodb

Class MongoGridFSStreamError

An error generated when a GridFSStream operation fails to execute.

+

Hierarchy (view full)

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoInvalidArgumentError.html b/docs/6.9/classes/MongoInvalidArgumentError.html new file mode 100644 index 0000000000..ebc6c5074e --- /dev/null +++ b/docs/6.9/classes/MongoInvalidArgumentError.html @@ -0,0 +1,30 @@ +MongoInvalidArgumentError | mongodb

Class MongoInvalidArgumentError

An error generated when the user supplies malformed or unexpected arguments +or when a required argument or field is not provided.

+

Hierarchy (view full)

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoKerberosError.html b/docs/6.9/classes/MongoKerberosError.html new file mode 100644 index 0000000000..7c303c76ea --- /dev/null +++ b/docs/6.9/classes/MongoKerberosError.html @@ -0,0 +1,30 @@ +MongoKerberosError | mongodb

Class MongoKerberosError

A error generated when the user attempts to authenticate +via Kerberos, but fails to connect to the Kerberos client.

+

Hierarchy (view full)

Constructors

  • Do not use this constructor!

    +

    Meant for internal use only.

    +

    Parameters

    • message: string

    Returns MongoKerberosError

    This class is only meant to be constructed within the driver. This constructor is +not subject to semantic versioning compatibility guarantees and may change at any time.

    +

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoMissingCredentialsError.html b/docs/6.9/classes/MongoMissingCredentialsError.html new file mode 100644 index 0000000000..fc34225d1f --- /dev/null +++ b/docs/6.9/classes/MongoMissingCredentialsError.html @@ -0,0 +1,30 @@ +MongoMissingCredentialsError | mongodb

Class MongoMissingCredentialsError

An error generated when the user fails to provide authentication credentials before attempting +to connect to a mongo server instance.

+

Hierarchy (view full)

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoMissingDependencyError.html b/docs/6.9/classes/MongoMissingDependencyError.html new file mode 100644 index 0000000000..c7863945bd --- /dev/null +++ b/docs/6.9/classes/MongoMissingDependencyError.html @@ -0,0 +1,31 @@ +MongoMissingDependencyError | mongodb

Class MongoMissingDependencyError

An error generated when a required module or dependency is not present in the local environment

+

Hierarchy (view full)

Constructors

  • Do not use this constructor!

    +

    Meant for internal use only.

    +

    Parameters

    • message: string
    • options: {
          cause: Error;
          dependencyName: string;
      }
      • cause: Error
      • dependencyName: string

    Returns MongoMissingDependencyError

    This class is only meant to be constructed within the driver. This constructor is +not subject to semantic versioning compatibility guarantees and may change at any time.

    +

Properties

cause: Error

This property is assigned in the Error constructor.

+
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
dependencyName: string
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoNetworkError.html b/docs/6.9/classes/MongoNetworkError.html new file mode 100644 index 0000000000..2a3c3e9104 --- /dev/null +++ b/docs/6.9/classes/MongoNetworkError.html @@ -0,0 +1,29 @@ +MongoNetworkError | mongodb

Class MongoNetworkError

An error indicating an issue with the network, including TCP errors and timeouts.

+

Hierarchy (view full)

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoNetworkTimeoutError.html b/docs/6.9/classes/MongoNetworkTimeoutError.html new file mode 100644 index 0000000000..08858f4b8c --- /dev/null +++ b/docs/6.9/classes/MongoNetworkTimeoutError.html @@ -0,0 +1,29 @@ +MongoNetworkTimeoutError | mongodb

Class MongoNetworkTimeoutError

An error indicating a network timeout occurred

+

Hierarchy (view full)

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoNotConnectedError.html b/docs/6.9/classes/MongoNotConnectedError.html new file mode 100644 index 0000000000..ba4c2c2749 --- /dev/null +++ b/docs/6.9/classes/MongoNotConnectedError.html @@ -0,0 +1,30 @@ +MongoNotConnectedError | mongodb

Class MongoNotConnectedError

An error thrown when the user attempts to operate on a database or collection through a MongoClient +that has not yet successfully called the "connect" method

+

Hierarchy (view full)

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoOIDCError.html b/docs/6.9/classes/MongoOIDCError.html new file mode 100644 index 0000000000..e03d61836c --- /dev/null +++ b/docs/6.9/classes/MongoOIDCError.html @@ -0,0 +1,30 @@ +MongoOIDCError | mongodb

Class MongoOIDCError

A error generated when the user attempts to authenticate +via OIDC callbacks, but fails.

+

Hierarchy (view full)

Constructors

  • Do not use this constructor!

    +

    Meant for internal use only.

    +

    Parameters

    • message: string

    Returns MongoOIDCError

    This class is only meant to be constructed within the driver. This constructor is +not subject to semantic versioning compatibility guarantees and may change at any time.

    +

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoParseError.html b/docs/6.9/classes/MongoParseError.html new file mode 100644 index 0000000000..0258dcfb03 --- /dev/null +++ b/docs/6.9/classes/MongoParseError.html @@ -0,0 +1,29 @@ +MongoParseError | mongodb

Class MongoParseError

An error used when attempting to parse a value (like a connection string)

+

Hierarchy (view full)

Constructors

  • Do not use this constructor!

    +

    Meant for internal use only.

    +

    Parameters

    • message: string

    Returns MongoParseError

    This class is only meant to be constructed within the driver. This constructor is +not subject to semantic versioning compatibility guarantees and may change at any time.

    +

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoRuntimeError.html b/docs/6.9/classes/MongoRuntimeError.html new file mode 100644 index 0000000000..9d7a0d6fcc --- /dev/null +++ b/docs/6.9/classes/MongoRuntimeError.html @@ -0,0 +1,30 @@ +MongoRuntimeError | mongodb

Class MongoRuntimeError

An error generated when the driver encounters unexpected input +or reaches an unexpected/invalid internal state

+

Hierarchy (view full)

Constructors

  • Do not use this constructor!

    +

    Meant for internal use only.

    +

    Parameters

    • message: string
    • Optionaloptions: {
          cause?: Error;
      }
      • Optionalcause?: Error

    Returns MongoRuntimeError

    This class is only meant to be constructed within the driver. This constructor is +not subject to semantic versioning compatibility guarantees and may change at any time.

    +

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoServerClosedError.html b/docs/6.9/classes/MongoServerClosedError.html new file mode 100644 index 0000000000..3a4d14ffb1 --- /dev/null +++ b/docs/6.9/classes/MongoServerClosedError.html @@ -0,0 +1,30 @@ +MongoServerClosedError | mongodb

Class MongoServerClosedError

An error generated when an attempt is made to operate +on a closed/closing server.

+

Hierarchy (view full)

Constructors

  • Do not use this constructor!

    +

    Meant for internal use only.

    +

    Parameters

    • message: string = 'Server is closed'

    Returns MongoServerClosedError

    This class is only meant to be constructed within the driver. This constructor is +not subject to semantic versioning compatibility guarantees and may change at any time.

    +

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoServerError.html b/docs/6.9/classes/MongoServerError.html new file mode 100644 index 0000000000..99653ad18b --- /dev/null +++ b/docs/6.9/classes/MongoServerError.html @@ -0,0 +1,35 @@ +MongoServerError | mongodb

Class MongoServerError

An error coming from the mongo server

+

Hierarchy (view full)

Indexable

  • [key: string]: any

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
codeName?: string
connectionGeneration?: number
errInfo?: Document
errorResponse: ErrorDescription

Raw error result document returned by server.

+
message: string
ok?: number
stack?: string
topologyVersion?: TopologyVersion
writeConcernError?: Document
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoServerSelectionError.html b/docs/6.9/classes/MongoServerSelectionError.html new file mode 100644 index 0000000000..c2415c0436 --- /dev/null +++ b/docs/6.9/classes/MongoServerSelectionError.html @@ -0,0 +1,31 @@ +MongoServerSelectionError | mongodb

Class MongoServerSelectionError

An error signifying a client-side server selection error

+

Hierarchy (view full)

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string

An optional reason context, such as an error saved during flow of monitoring and selecting servers

+
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoSystemError.html b/docs/6.9/classes/MongoSystemError.html new file mode 100644 index 0000000000..2fcf3106d8 --- /dev/null +++ b/docs/6.9/classes/MongoSystemError.html @@ -0,0 +1,31 @@ +MongoSystemError | mongodb

Class MongoSystemError

An error signifying a general system issue

+

Hierarchy (view full)

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string

An optional reason context, such as an error saved during flow of monitoring and selecting servers

+
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoTailableCursorError.html b/docs/6.9/classes/MongoTailableCursorError.html new file mode 100644 index 0000000000..3ed27a9b51 --- /dev/null +++ b/docs/6.9/classes/MongoTailableCursorError.html @@ -0,0 +1,29 @@ +MongoTailableCursorError | mongodb

Class MongoTailableCursorError

An error thrown when the user calls a function or method not supported on a tailable cursor

+

Hierarchy (view full)

Constructors

  • Do not use this constructor!

    +

    Meant for internal use only.

    +

    Parameters

    • message: string = 'Tailable cursor does not support this operation'

    Returns MongoTailableCursorError

    This class is only meant to be constructed within the driver. This constructor is +not subject to semantic versioning compatibility guarantees and may change at any time.

    +

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoTopologyClosedError.html b/docs/6.9/classes/MongoTopologyClosedError.html new file mode 100644 index 0000000000..82ef1eabbf --- /dev/null +++ b/docs/6.9/classes/MongoTopologyClosedError.html @@ -0,0 +1,30 @@ +MongoTopologyClosedError | mongodb

Class MongoTopologyClosedError

An error generated when an attempt is made to operate on a +dropped, or otherwise unavailable, database.

+

Hierarchy (view full)

Constructors

  • Do not use this constructor!

    +

    Meant for internal use only.

    +

    Parameters

    • message: string = 'Topology is closed'

    Returns MongoTopologyClosedError

    This class is only meant to be constructed within the driver. This constructor is +not subject to semantic versioning compatibility guarantees and may change at any time.

    +

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoTransactionError.html b/docs/6.9/classes/MongoTransactionError.html new file mode 100644 index 0000000000..f130c0d4c7 --- /dev/null +++ b/docs/6.9/classes/MongoTransactionError.html @@ -0,0 +1,30 @@ +MongoTransactionError | mongodb

Class MongoTransactionError

An error generated when the user makes a mistake in the usage of transactions. +(e.g. attempting to commit a transaction with a readPreference other than primary)

+

Hierarchy (view full)

Constructors

  • Do not use this constructor!

    +

    Meant for internal use only.

    +

    Parameters

    • message: string

    Returns MongoTransactionError

    This class is only meant to be constructed within the driver. This constructor is +not subject to semantic versioning compatibility guarantees and may change at any time.

    +

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoUnexpectedServerResponseError.html b/docs/6.9/classes/MongoUnexpectedServerResponseError.html new file mode 100644 index 0000000000..40a49fbf1a --- /dev/null +++ b/docs/6.9/classes/MongoUnexpectedServerResponseError.html @@ -0,0 +1,37 @@ +MongoUnexpectedServerResponseError | mongodb

Class MongoUnexpectedServerResponseError

An error generated when a parsable unexpected response comes from the server. +This is generally an error where the driver in a state expecting a certain behavior to occur in +the next message from MongoDB but it receives something else. +This error does not represent an issue with wire message formatting.

+

When an operation fails, it is the driver's job to retry it. It must perform serverSelection +again to make sure that it attempts the operation against a server in a good state. If server +selection returns a server that does not support retryable operations, this error is used. +This scenario is unlikely as retryable support would also have been determined on the first attempt +but it is possible the state change could report a selectable server that does not support retries.

+

Hierarchy (view full)

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/MongoWriteConcernError.html b/docs/6.9/classes/MongoWriteConcernError.html new file mode 100644 index 0000000000..8171f2acd4 --- /dev/null +++ b/docs/6.9/classes/MongoWriteConcernError.html @@ -0,0 +1,37 @@ +MongoWriteConcernError | mongodb

Class MongoWriteConcernError

An error thrown when the server reports a writeConcernError

+

Hierarchy (view full)

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

+
codeName?: string
connectionGeneration?: number
errInfo?: Document
errorResponse: ErrorDescription

Raw error result document returned by server.

+
message: string
ok?: number
result: Document

The result document

+
stack?: string
topologyVersion?: TopologyVersion
writeConcernError?: Document
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

+
stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    +

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    +

    Parameters

    • label: string

      The error label to check for

      +

    Returns boolean

    returns true if the error has the provided error label

    +
  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

diff --git a/docs/6.9/classes/OrderedBulkOperation.html b/docs/6.9/classes/OrderedBulkOperation.html new file mode 100644 index 0000000000..25b56bb5d7 --- /dev/null +++ b/docs/6.9/classes/OrderedBulkOperation.html @@ -0,0 +1,22 @@ +OrderedBulkOperation | mongodb

Class OrderedBulkOperation

Hierarchy (view full)

Properties

isOrdered: boolean
operationId?: number

Accessors

Methods

  • Builds a find operation for an update/updateOne/delete/deleteOne/replaceOne. +Returns a builder object used to complete the definition of the operation.

    +

    Parameters

    Returns FindOperators

    const bulkOp = collection.initializeOrderedBulkOp();

    // Add an updateOne to the bulkOp
    bulkOp.find({ a: 1 }).updateOne({ $set: { b: 2 } });

    // Add an updateMany to the bulkOp
    bulkOp.find({ c: 3 }).update({ $set: { d: 4 } });

    // Add an upsert
    bulkOp.find({ e: 5 }).upsert().updateOne({ $set: { f: 6 } });

    // Add a deletion
    bulkOp.find({ g: 7 }).deleteOne();

    // Add a multi deletion
    bulkOp.find({ h: 8 }).delete();

    // Add a replaceOne
    bulkOp.find({ i: 9 }).replaceOne({writeConcern: { j: 10 }});

    // Update using a pipeline (requires Mongodb 4.2 or higher)
    bulk.find({ k: 11, y: { $exists: true }, z: { $exists: true } }).updateOne([
    { $set: { total: { $sum: [ '$y', '$z' ] } } }
    ]);

    // All of the ops will now be executed
    await bulkOp.execute(); +
    + +
diff --git a/docs/6.9/classes/ReadConcern.html b/docs/6.9/classes/ReadConcern.html new file mode 100644 index 0000000000..b1078170e2 --- /dev/null +++ b/docs/6.9/classes/ReadConcern.html @@ -0,0 +1,15 @@ +ReadConcern | mongodb

Class ReadConcern

The MongoDB ReadConcern, which allows for control of the consistency and isolation properties +of the data read from replica sets and replica set shards.

+

Constructors

Properties

Accessors

Methods

Constructors

Properties

level: string

Accessors

Methods

diff --git a/docs/6.9/classes/ReadPreference.html b/docs/6.9/classes/ReadPreference.html new file mode 100644 index 0000000000..7db089fd07 --- /dev/null +++ b/docs/6.9/classes/ReadPreference.html @@ -0,0 +1,44 @@ +ReadPreference | mongodb

Class ReadPreference

The ReadPreference class is a class that represents a MongoDB ReadPreference and is +used to construct connections.

+

Constructors

Properties

hedge?: HedgeOptions
maxStalenessSeconds?: number
minWireVersion?: number
tags?: TagSet[]
nearest: ReadPreference = ...
NEAREST: "nearest" = ReadPreferenceMode.nearest
primary: ReadPreference = ...
PRIMARY: "primary" = ReadPreferenceMode.primary
PRIMARY_PREFERRED: "primaryPreferred" = ReadPreferenceMode.primaryPreferred
primaryPreferred: ReadPreference = ...
secondary: ReadPreference = ...
SECONDARY: "secondary" = ReadPreferenceMode.secondary
SECONDARY_PREFERRED: "secondaryPreferred" = ReadPreferenceMode.secondaryPreferred
secondaryPreferred: ReadPreference = ...

Accessors

Methods

  • Check if the two ReadPreferences are equivalent

    +

    Parameters

    • readPreference: ReadPreference

      The read preference with which to check equality

      +

    Returns boolean

  • Validate if a mode is legal

    +

    Parameters

    • Optionalmode: string

      The string representing the read preference mode.

      +

    Returns boolean

  • Validate if a mode is legal

    +

    Parameters

    • mode: string

      The string representing the read preference mode.

      +

    Returns boolean

diff --git a/docs/6.9/classes/RunCommandCursor.html b/docs/6.9/classes/RunCommandCursor.html new file mode 100644 index 0000000000..58d9708089 --- /dev/null +++ b/docs/6.9/classes/RunCommandCursor.html @@ -0,0 +1,512 @@ +RunCommandCursor | mongodb

Class RunCommandCursor

Hierarchy (view full)

Properties

[asyncDispose]: (() => Promise<void>)

An alias for AbstractCursor.close|AbstractCursor.close().

+
command: Readonly<Record<string, any>>
getMoreOptions: {
    batchSize?: number;
    comment?: any;
    maxAwaitTimeMS?: number;
} = {}
captureRejections: boolean

Value: boolean

+

Change the default captureRejections option on all new EventEmitter objects.

+

v13.4.0, v12.16.0

+
captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

+

See how to write a custom rejection handler.

+

v13.4.0, v12.16.0

+
CLOSE: "close" = ...
defaultMaxListeners: number

By default, a maximum of 10 listeners can be registered for any single +event. This limit can be changed for individual EventEmitter instances +using the emitter.setMaxListeners(n) method. To change the default +for allEventEmitter instances, the events.defaultMaxListeners property +can be used. If this value is not a positive number, a RangeError is thrown.

+

Take caution when setting the events.defaultMaxListeners because the +change affects all EventEmitter instances, including those created before +the change is made. However, calling emitter.setMaxListeners(n) still has +precedence over events.defaultMaxListeners.

+

This is not a hard limit. The EventEmitter instance will allow +more listeners to be added but will output a trace warning to stderr indicating +that a "possible EventEmitter memory leak" has been detected. For any single +EventEmitter, the emitter.getMaxListeners() and emitter.setMaxListeners() methods can be used to +temporarily avoid this warning:

+
import { EventEmitter } from 'node:events';
const emitter = new EventEmitter();
emitter.setMaxListeners(emitter.getMaxListeners() + 1);
emitter.once('event', () => {
// do stuff
emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
}); +
+ +

The --trace-warnings command-line flag can be used to display the +stack trace for such warnings.

+

The emitted warning can be inspected with process.on('warning') and will +have the additional emitter, type, and count properties, referring to +the event emitter instance, the event's name and the number of attached +listeners, respectively. +Its name property is set to 'MaxListenersExceededWarning'.

+

v0.11.2

+
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

+

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted. Therefore, the process will still crash if no +regular 'error' listener is installed.

+

v13.6.0, v12.17.0

+

Accessors

  • get closed(): boolean
  • The cursor is closed and all remaining locally buffered documents have been iterated.

    +

    Returns boolean

  • get id(): undefined | Long
  • The cursor has no id until it receives a response from the initial cursor creating command.

    +

    It is non-zero for as long as the database has an open cursor.

    +

    The initiating command may receive a zero id if the entire result is in the firstBatch.

    +

    Returns undefined | Long

  • get killed(): boolean
  • A killCursors command was attempted on this cursor. +This is performed if the cursor id is non zero.

    +

    Returns boolean

Methods

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest...args: AnyRest

    Returns void

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns boolean

    v0.1.26

    +
  • Returns an array listing the events for which the emitter has registered +listeners. The values in the array are strings or Symbols.

    +
    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ] +
    + +

    Returns string[]

    v6.0.0

    +
  • Iterates over all the documents for this cursor using the iterator, callback pattern.

    +

    If the iterator returns false, iteration will stop.

    +

    Parameters

    • iterator: ((doc: any) => boolean | void)

      The iteration callback.

      +
        • (doc): boolean | void
        • Parameters

          • doc: any

          Returns boolean | void

    Returns Promise<void>

      +
    • Will be removed in a future release. Use for await...of instead.
    • +
    +
  • Returns the number of listeners listening for the event named eventName. +If listener is provided, it will return how many times the listener is found +in the list of the listeners of the event.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns number

    v3.2.0

    +
  • Map all documents using the provided function +If there is a transform set on the cursor, that will be called first and the result passed to +this function's transform.

    +

    Type Parameters

    • T = any

    Parameters

    • transform: ((doc: any) => T)

      The mapping transformation method.

      +
        • (doc): T
        • Parameters

          • doc: any

          Returns T

    Returns AbstractCursor<T, AbstractCursorEvents>

    Note Cursors use null internally to indicate that there are no more documents in the cursor. Providing a mapping +function that maps values to null will result in the cursor closing itself before it has finished iterating +all documents. This will not result in a memory leak, just surprising behavior. For example:

    +
    const cursor = collection.find({});
    cursor.map(() => null);

    const documents = await cursor.toArray();
    // documents is always [], regardless of how many documents are in the collection. +
    + +

    Other falsey values are allowed:

    +
    const cursor = collection.find({});
    cursor.map(() => '');

    const documents = await cursor.toArray();
    // documents is now an array of empty strings +
    + +

    Note for Typescript Users: adding a transform changes the return type of the iteration of this cursor, +it does not return a new instance of a cursor. This means when calling map, +you should always assign the result to a new variable in order to get a correctly typed cursor variable. +Take note of the following example:

    +
    const cursor: FindCursor<Document> = coll.find();
    const mappedCursor: FindCursor<number> = cursor.map(doc => Object.keys(doc).length);
    const keyCounts: number[] = await mappedCursor.toArray(); // cursor.toArray() still returns Document[] +
    + +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.1.101

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.3.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Returns a copy of the array of listeners for the event named eventName, +including any wrappers (such as those created by .once()).

    +
    import { EventEmitter } from 'node:events';
    const emitter = new EventEmitter();
    emitter.once('log', () => console.log('log once'));

    // Returns a new Array with a function `onceWrapper` which has a property
    // `listener` which contains the original listener bound above
    const listeners = emitter.rawListeners('log');
    const logFnWrapper = listeners[0];

    // Logs "log once" to the console and does not unbind the `once` event
    logFnWrapper.listener();

    // Logs "log once" to the console and removes the listener
    logFnWrapper();

    emitter.on('log', () => console.log('log persistently'));
    // Will return a new Array with a single function bound by `.on()` above
    const newListeners = emitter.rawListeners('log');

    // Logs "log persistently" twice
    newListeners[0]();
    emitter.emit('log'); +
    + +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns AbstractCursorEvents[EventKey][]

    v9.4.0

    +
  • Removes all listeners, or those of the specified eventName.

    +

    It is bad practice to remove listeners added elsewhere in the code, +particularly when the EventEmitter instance was created by some other +component or module (e.g. sockets or file streams).

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    • Optionalevent: string | symbol | EventKey

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends "close"

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Rewind this cursor to its uninitialized state. Any options that are present on the cursor will +remain in effect. Iterating this cursor will cause new queries to be sent to the server, even +if the resultant data has already been retrieved by this cursor.

    +

    Returns void

  • By default EventEmitters will print a warning if more than 10 listeners are +added for a particular event. This is a useful default that helps finding +memory leaks. The emitter.setMaxListeners() method allows the limit to be +modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • n: number

    Returns this

    v0.3.5

    +
  • Controls the getMore.maxTimeMS field. Only valid when cursor is tailable await

    +

    Parameters

    • maxTimeMS: number

      the number of milliseconds to wait for new data

      +

    Returns this

  • Returns an array of documents. The caller is responsible for making sure that there +is enough memory to store the results. Note that the array only contains partial +results when this cursor had been previously accessed. In that case, +cursor.rewind() can be used to reset the cursor.

    +

    Returns Promise<any[]>

  • Experimental

    Listens once to the abort event on the provided signal.

    +

    Listening to the abort event on abort signals is unsafe and may +lead to resource leaks since another third party with the signal can +call e.stopImmediatePropagation(). Unfortunately Node.js cannot change +this since it would violate the web standard. Additionally, the original +API makes it easy to forget to remove listeners.

    +

    This API allows safely using AbortSignals in Node.js APIs by solving these +two issues by listening to the event such that stopImmediatePropagation does +not prevent the listener from running.

    +

    Returns a disposable so that it may be unsubscribed from more easily.

    +
    import { addAbortListener } from 'node:events';

    function example(signal) {
    let disposable;
    try {
    signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
    disposable = addAbortListener(signal, (e) => {
    // Do something when signal is aborted.
    });
    } finally {
    disposable?.[Symbol.dispose]();
    }
    } +
    + +

    Parameters

    • signal: AbortSignal
    • resource: ((event: Event) => void)
        • (event): void
        • Parameters

          • event: Event

          Returns void

    Returns Disposable

    Disposable that removes the abort listener.

    +

    v20.5.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +

    For EventEmitters this behaves exactly the same as calling .listeners on +the emitter.

    +

    For EventTargets this is the only way to get the event listeners for the +event target. This is useful for debugging and diagnostic purposes.

    +
    import { getEventListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    const listener = () => console.log('Events are fun');
    ee.on('foo', listener);
    console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
    }
    {
    const et = new EventTarget();
    const listener = () => console.log('Events are fun');
    et.addEventListener('foo', listener);
    console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget
    • name: string | symbol

    Returns Function[]

    v15.2.0, v14.17.0

    +
  • Returns the currently set max amount of listeners.

    +

    For EventEmitters this behaves exactly the same as calling .getMaxListeners on +the emitter.

    +

    For EventTargets this is the only way to get the max event listeners for the +event target. If the number of event handlers on a single EventTarget exceeds +the max set, the EventTarget will print a warning.

    +
    import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    console.log(getMaxListeners(ee)); // 10
    setMaxListeners(11, ee);
    console.log(getMaxListeners(ee)); // 11
    }
    {
    const et = new EventTarget();
    console.log(getMaxListeners(et)); // 10
    setMaxListeners(11, et);
    console.log(getMaxListeners(et)); // 11
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget

    Returns number

    v19.9.0

    +
  • A class method that returns the number of listeners for the given eventName registered on the given emitter.

    +
    import { EventEmitter, listenerCount } from 'node:events';

    const myEmitter = new EventEmitter();
    myEmitter.on('event', () => {});
    myEmitter.on('event', () => {});
    console.log(listenerCount(myEmitter, 'event'));
    // Prints: 2 +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>

      The emitter to query

      +
    • eventName: string | symbol

      The event name

      +

    Returns number

    v0.9.12

    +

    Since v3.2.0 - Use listenerCount instead.

    +
  • import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo')) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here +
    + +

    Returns an AsyncIterator that iterates eventName events. It will throw +if the EventEmitter emits 'error'. It removes all listeners when +exiting the loop. The value returned by each iteration is an array +composed of the emitted event arguments.

    +

    An AbortSignal can be used to cancel waiting on events:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ac = new AbortController();

    (async () => {
    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo', { signal: ac.signal })) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here
    })();

    process.nextTick(() => ac.abort()); +
    + +

    Use the close option to specify an array of event names that will end the iteration:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    ee.emit('close');
    });

    for await (const event of on(ee, 'foo', { close: ['close'] })) {
    console.log(event); // prints ['bar'] [42]
    }
    // the loop will exit after 'close' is emitted
    console.log('done'); // prints 'done' +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

    An AsyncIterator that iterates eventName events emitted by the emitter

    +

    v13.6.0, v12.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

  • Creates a Promise that is fulfilled when the EventEmitter emits the given +event or that is rejected if the EventEmitter emits 'error' while waiting. +The Promise will resolve with an array of all the arguments emitted to the +given event.

    +

    This method is intentionally generic and works with the web platform EventTarget interface, which has no special'error' event +semantics and does not listen to the 'error' event.

    +
    import { once, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    process.nextTick(() => {
    ee.emit('myevent', 42);
    });

    const [value] = await once(ee, 'myevent');
    console.log(value);

    const err = new Error('kaboom');
    process.nextTick(() => {
    ee.emit('error', err);
    });

    try {
    await once(ee, 'myevent');
    } catch (err) {
    console.error('error happened', err);
    } +
    + +

    The special handling of the 'error' event is only used when events.once() is used to wait for another event. If events.once() is used to wait for the +'error' event itself, then it is treated as any other kind of event without +special handling:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();

    once(ee, 'error')
    .then(([err]) => console.log('ok', err.message))
    .catch((err) => console.error('error', err.message));

    ee.emit('error', new Error('boom'));

    // Prints: ok boom +
    + +

    An AbortSignal can be used to cancel waiting for the event:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();
    const ac = new AbortController();

    async function foo(emitter, event, signal) {
    try {
    await once(emitter, event, { signal });
    console.log('event emitted!');
    } catch (error) {
    if (error.name === 'AbortError') {
    console.error('Waiting for the event was canceled!');
    } else {
    console.error('There was an error', error.message);
    }
    }
    }

    foo(ee, 'foo', ac.signal);
    ac.abort(); // Abort waiting for the event
    ee.emit('foo'); // Prints: Waiting for the event was canceled! +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

    v11.13.0, v10.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

  • import { setMaxListeners, EventEmitter } from 'node:events';

    const target = new EventTarget();
    const emitter = new EventEmitter();

    setMaxListeners(5, target, emitter); +
    + +

    Parameters

    • Optionaln: number

      A non-negative number. The maximum number of listeners per EventTarget event.

      +
    • Rest...eventTargets: (EventEmitter<DefaultEventMap> | EventTarget)[]

    Returns void

    v15.4.0

    +
diff --git a/docs/6.9/classes/ServerCapabilities.html b/docs/6.9/classes/ServerCapabilities.html new file mode 100644 index 0000000000..1ad7f5bc89 --- /dev/null +++ b/docs/6.9/classes/ServerCapabilities.html @@ -0,0 +1,13 @@ +ServerCapabilities | mongodb

Class ServerCapabilities

Constructors

Properties

maxWireVersion: number
minWireVersion: number

Accessors

diff --git a/docs/6.9/classes/ServerClosedEvent.html b/docs/6.9/classes/ServerClosedEvent.html new file mode 100644 index 0000000000..93381182e5 --- /dev/null +++ b/docs/6.9/classes/ServerClosedEvent.html @@ -0,0 +1,6 @@ +ServerClosedEvent | mongodb

Class ServerClosedEvent

Emitted when server is closed.

+

Properties

Properties

address: string

The address (host/port pair) of the server

+
topologyId: number

A unique identifier for the topology

+
diff --git a/docs/6.9/classes/ServerDescription.html b/docs/6.9/classes/ServerDescription.html new file mode 100644 index 0000000000..89a0e490e9 --- /dev/null +++ b/docs/6.9/classes/ServerDescription.html @@ -0,0 +1,38 @@ +ServerDescription | mongodb

Class ServerDescription

The client's view of a single server, based on the most recent hello outcome.

+

Internal type, not meant to be directly instantiated

+

Properties

$clusterTime?: ClusterTime
address: string
arbiters: string[]
electionId: null | ObjectId
error: null | MongoError
hosts: string[]
lastUpdateTime: number
lastWriteDate: number
logicalSessionTimeoutMinutes: null | number
maxWireVersion: number
me: null | string
minRoundTripTime: number

The minimum measurement of the last 10 measurements of roundTripTime that have been collected

+
minWireVersion: number
passives: string[]
primary: null | string
roundTripTime: number
setName: null | string
setVersion: null | number
tags: TagSet
topologyVersion: null | TopologyVersion

Accessors

Methods

diff --git a/docs/6.9/classes/ServerDescriptionChangedEvent.html b/docs/6.9/classes/ServerDescriptionChangedEvent.html new file mode 100644 index 0000000000..7b0093fc8d --- /dev/null +++ b/docs/6.9/classes/ServerDescriptionChangedEvent.html @@ -0,0 +1,11 @@ +ServerDescriptionChangedEvent | mongodb

Class ServerDescriptionChangedEvent

Emitted when server description changes, but does NOT include changes to the RTT.

+

Properties

address: string

The address (host/port pair) of the server

+
name: "serverDescriptionChanged" = SERVER_DESCRIPTION_CHANGED
newDescription: ServerDescription

The new server description

+
previousDescription: ServerDescription

The previous server description

+
topologyId: number

A unique identifier for the topology

+
diff --git a/docs/6.9/classes/ServerHeartbeatFailedEvent.html b/docs/6.9/classes/ServerHeartbeatFailedEvent.html new file mode 100644 index 0000000000..d41bdd923a --- /dev/null +++ b/docs/6.9/classes/ServerHeartbeatFailedEvent.html @@ -0,0 +1,10 @@ +ServerHeartbeatFailedEvent | mongodb

Class ServerHeartbeatFailedEvent

Emitted when the server monitor’s hello fails, either with an “ok: 0” or a socket exception.

+

Properties

awaited: boolean

Is true when using the streaming protocol

+
connectionId: string

The connection id for the command

+
duration: number

The execution time of the event in ms

+
failure: Error

The command failure

+
diff --git a/docs/6.9/classes/ServerHeartbeatStartedEvent.html b/docs/6.9/classes/ServerHeartbeatStartedEvent.html new file mode 100644 index 0000000000..dd60f428be --- /dev/null +++ b/docs/6.9/classes/ServerHeartbeatStartedEvent.html @@ -0,0 +1,7 @@ +ServerHeartbeatStartedEvent | mongodb

Class ServerHeartbeatStartedEvent

Emitted when the server monitor’s hello command is started - immediately before +the hello command is serialized into raw BSON and written to the socket.

+

Properties

Properties

awaited: boolean

Is true when using the streaming protocol

+
connectionId: string

The connection id for the command

+
diff --git a/docs/6.9/classes/ServerHeartbeatSucceededEvent.html b/docs/6.9/classes/ServerHeartbeatSucceededEvent.html new file mode 100644 index 0000000000..adb5524839 --- /dev/null +++ b/docs/6.9/classes/ServerHeartbeatSucceededEvent.html @@ -0,0 +1,10 @@ +ServerHeartbeatSucceededEvent | mongodb

Class ServerHeartbeatSucceededEvent

Emitted when the server monitor’s hello succeeds.

+

Properties

awaited: boolean

Is true when using the streaming protocol

+
connectionId: string

The connection id for the command

+
duration: number

The execution time of the event in ms

+
reply: Document

The command reply

+
diff --git a/docs/6.9/classes/ServerOpeningEvent.html b/docs/6.9/classes/ServerOpeningEvent.html new file mode 100644 index 0000000000..25a2f8440c --- /dev/null +++ b/docs/6.9/classes/ServerOpeningEvent.html @@ -0,0 +1,6 @@ +ServerOpeningEvent | mongodb

Class ServerOpeningEvent

Emitted when server is initialized.

+

Properties

Properties

address: string

The address (host/port pair) of the server

+
topologyId: number

A unique identifier for the topology

+
diff --git a/docs/6.9/classes/ServerSession.html b/docs/6.9/classes/ServerSession.html new file mode 100644 index 0000000000..0398e85420 --- /dev/null +++ b/docs/6.9/classes/ServerSession.html @@ -0,0 +1,10 @@ +ServerSession | mongodb

Class ServerSession

Reflects the existence of a session on the server. Can be reused by the session pool. +WARNING: not meant to be instantiated directly. For internal use only.

+

Properties

Methods

Properties

isDirty: boolean
lastUse: number
txnNumber: number

Methods

  • Determines if the server session has timed out.

    +

    Parameters

    • sessionTimeoutMinutes: number

      The server's "logicalSessionTimeoutMinutes"

      +

    Returns boolean

diff --git a/docs/6.9/classes/StreamDescription.html b/docs/6.9/classes/StreamDescription.html new file mode 100644 index 0000000000..0bc18207a9 --- /dev/null +++ b/docs/6.9/classes/StreamDescription.html @@ -0,0 +1,19 @@ +StreamDescription | mongodb

Class StreamDescription

Constructors

Properties

__nodejs_mock_server__?: boolean
address: string
compressor?:
    | "none"
    | "snappy"
    | "zlib"
    | "zstd"
compressors: (
    | "none"
    | "snappy"
    | "zlib"
    | "zstd")[]
hello: null | Document = null
loadBalanced: boolean
logicalSessionTimeoutMinutes?: number
maxBsonObjectSize: number
maxMessageSizeBytes: number
maxWireVersion?: number
maxWriteBatchSize: number
minWireVersion?: number
serverConnectionId: null | bigint
zlibCompressionLevel?: number

Methods

diff --git a/docs/6.9/classes/TopologyClosedEvent.html b/docs/6.9/classes/TopologyClosedEvent.html new file mode 100644 index 0000000000..5eed7a7a26 --- /dev/null +++ b/docs/6.9/classes/TopologyClosedEvent.html @@ -0,0 +1,4 @@ +TopologyClosedEvent | mongodb

Class TopologyClosedEvent

Emitted when topology is closed.

+

Properties

Properties

topologyId: number

A unique identifier for the topology

+
diff --git a/docs/6.9/classes/TopologyDescription.html b/docs/6.9/classes/TopologyDescription.html new file mode 100644 index 0000000000..95589b6c5f --- /dev/null +++ b/docs/6.9/classes/TopologyDescription.html @@ -0,0 +1,25 @@ +TopologyDescription | mongodb

Class TopologyDescription

Representation of a deployment of servers

+

Constructors

Properties

commonWireVersion: number
compatibilityError?: string
compatible: boolean
heartbeatFrequencyMS: number
localThresholdMS: number
logicalSessionTimeoutMinutes: null | number
maxElectionId: null | ObjectId
maxSetVersion: null | number
servers: Map<string, ServerDescription>
setName: null | string
stale: boolean

Accessors

Methods

diff --git a/docs/6.9/classes/TopologyDescriptionChangedEvent.html b/docs/6.9/classes/TopologyDescriptionChangedEvent.html new file mode 100644 index 0000000000..1d5ff50a26 --- /dev/null +++ b/docs/6.9/classes/TopologyDescriptionChangedEvent.html @@ -0,0 +1,8 @@ +TopologyDescriptionChangedEvent | mongodb

Class TopologyDescriptionChangedEvent

Emitted when topology description changes.

+

Properties

newDescription: TopologyDescription

The new topology description

+
previousDescription: TopologyDescription

The old topology description

+
topologyId: number

A unique identifier for the topology

+
diff --git a/docs/6.9/classes/TopologyOpeningEvent.html b/docs/6.9/classes/TopologyOpeningEvent.html new file mode 100644 index 0000000000..de1b70a648 --- /dev/null +++ b/docs/6.9/classes/TopologyOpeningEvent.html @@ -0,0 +1,4 @@ +TopologyOpeningEvent | mongodb

Class TopologyOpeningEvent

Emitted when topology is initialized.

+

Properties

Properties

topologyId: number

A unique identifier for the topology

+
diff --git a/docs/6.9/classes/Transaction.html b/docs/6.9/classes/Transaction.html new file mode 100644 index 0000000000..8c7dcb24b8 --- /dev/null +++ b/docs/6.9/classes/Transaction.html @@ -0,0 +1,10 @@ +Transaction | mongodb

Class Transaction

A class maintaining state related to a server transaction. Internal Only

+

Properties

Accessors

  • get isActive(): boolean
  • Returns boolean

    Whether this session is presently in a transaction

    +
diff --git a/docs/6.9/classes/TypedEventEmitter.html b/docs/6.9/classes/TypedEventEmitter.html new file mode 100644 index 0000000000..d89562bf1b --- /dev/null +++ b/docs/6.9/classes/TypedEventEmitter.html @@ -0,0 +1,423 @@ +TypedEventEmitter | mongodb

Class TypedEventEmitter<Events>

Typescript type safe event emitter

+

Type Parameters

Hierarchy (view full)

Constructors

Properties

captureRejections: boolean

Value: boolean

+

Change the default captureRejections option on all new EventEmitter objects.

+

v13.4.0, v12.16.0

+
captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

+

See how to write a custom rejection handler.

+

v13.4.0, v12.16.0

+
defaultMaxListeners: number

By default, a maximum of 10 listeners can be registered for any single +event. This limit can be changed for individual EventEmitter instances +using the emitter.setMaxListeners(n) method. To change the default +for allEventEmitter instances, the events.defaultMaxListeners property +can be used. If this value is not a positive number, a RangeError is thrown.

+

Take caution when setting the events.defaultMaxListeners because the +change affects all EventEmitter instances, including those created before +the change is made. However, calling emitter.setMaxListeners(n) still has +precedence over events.defaultMaxListeners.

+

This is not a hard limit. The EventEmitter instance will allow +more listeners to be added but will output a trace warning to stderr indicating +that a "possible EventEmitter memory leak" has been detected. For any single +EventEmitter, the emitter.getMaxListeners() and emitter.setMaxListeners() methods can be used to +temporarily avoid this warning:

+
import { EventEmitter } from 'node:events';
const emitter = new EventEmitter();
emitter.setMaxListeners(emitter.getMaxListeners() + 1);
emitter.once('event', () => {
// do stuff
emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
}); +
+ +

The --trace-warnings command-line flag can be used to display the +stack trace for such warnings.

+

The emitted warning can be inspected with process.on('warning') and will +have the additional emitter, type, and count properties, referring to +the event emitter instance, the event's name and the number of attached +listeners, respectively. +Its name property is set to 'MaxListenersExceededWarning'.

+

v0.11.2

+
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

+

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted. Therefore, the process will still crash if no +regular 'error' listener is installed.

+

v13.6.0, v12.17.0

+

Methods

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest...args: AnyRest

    Returns void

  • Alias for emitter.on(eventName, listener).

    +

    Type Parameters

    • EventKey extends string | number | symbol

    Parameters

    Returns this

    v0.1.26

    +
  • Alias for emitter.on(eventName, listener).

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Alias for emitter.on(eventName, listener).

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    + +

    Type Parameters

    • EventKey extends string | number | symbol

    Parameters

    Returns boolean

    v0.1.26

    +
  • Returns an array listing the events for which the emitter has registered +listeners. The values in the array are strings or Symbols.

    +
    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ] +
    + +

    Returns string[]

    v6.0.0

    +
  • Returns the current max listener value for the EventEmitter which is either +set by emitter.setMaxListeners(n) or defaults to defaultMaxListeners.

    +

    Returns number

    v1.0.0

    +
  • Returns the number of listeners listening for the event named eventName. +If listener is provided, it will return how many times the listener is found +in the list of the listeners of the event.

    +

    Type Parameters

    • EventKey extends string | number | symbol

    Parameters

    Returns number

    v3.2.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    });
    console.log(util.inspect(server.listeners('connection')));
    // Prints: [ [Function] ] +
    + +

    Type Parameters

    • EventKey extends string | number | symbol

    Parameters

    Returns Events[EventKey][]

    v0.1.26

    +
  • Alias for emitter.removeListener().

    +

    Type Parameters

    • EventKey extends string | number | symbol

    Parameters

    Returns this

    v10.0.0

    +
  • Alias for emitter.removeListener().

    +

    Parameters

    Returns this

    v10.0.0

    +
  • Alias for emitter.removeListener().

    +

    Parameters

    Returns this

    v10.0.0

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends string | number | symbol

    Parameters

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.1.101

    +
  • Adds the listener function to the end of the listeners array for the event +named eventName. No checks are made to see if the listener has already +been added. Multiple calls passing the same combination of eventName and +listener will result in the listener being added, and called, multiple times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.1.101

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Type Parameters

    • EventKey extends string | number | symbol

    Parameters

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.3.0

    +
  • Adds a one-time listener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    import { EventEmitter } from 'node:events';
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    + +

    Parameters

    Returns this

    v0.3.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends string | number | symbol

    Parameters

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventName +and listener will result in the listener being added, and called, multiple times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends string | number | symbol

    Parameters

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

      +
        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v6.0.0

    +
  • Returns a copy of the array of listeners for the event named eventName, +including any wrappers (such as those created by .once()).

    +
    import { EventEmitter } from 'node:events';
    const emitter = new EventEmitter();
    emitter.once('log', () => console.log('log once'));

    // Returns a new Array with a function `onceWrapper` which has a property
    // `listener` which contains the original listener bound above
    const listeners = emitter.rawListeners('log');
    const logFnWrapper = listeners[0];

    // Logs "log once" to the console and does not unbind the `once` event
    logFnWrapper.listener();

    // Logs "log once" to the console and removes the listener
    logFnWrapper();

    emitter.on('log', () => console.log('log persistently'));
    // Will return a new Array with a single function bound by `.on()` above
    const newListeners = emitter.rawListeners('log');

    // Logs "log persistently" twice
    newListeners[0]();
    emitter.emit('log'); +
    + +

    Type Parameters

    • EventKey extends string | number | symbol

    Parameters

    Returns Events[EventKey][]

    v9.4.0

    +
  • Removes all listeners, or those of the specified eventName.

    +

    It is bad practice to remove listeners added elsewhere in the code, +particularly when the EventEmitter instance was created by some other +component or module (e.g. sockets or file streams).

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends string | number | symbol

    Parameters

    • Optionalevent: string | symbol | EventKey

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • EventKey extends string | number | symbol

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • Removes the specified listener from the listener array for the event named eventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    + +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    import { EventEmitter } from 'node:events';
    class MyEmitter extends EventEmitter {}
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    + +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping') listener is removed:

    +
    import { EventEmitter } from 'node:events';
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    + +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    Returns this

    v0.1.26

    +
  • By default EventEmitters will print a warning if more than 10 listeners are +added for a particular event. This is a useful default that helps finding +memory leaks. The emitter.setMaxListeners() method allows the limit to be +modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • n: number

    Returns this

    v0.3.5

    +
  • Experimental

    Listens once to the abort event on the provided signal.

    +

    Listening to the abort event on abort signals is unsafe and may +lead to resource leaks since another third party with the signal can +call e.stopImmediatePropagation(). Unfortunately Node.js cannot change +this since it would violate the web standard. Additionally, the original +API makes it easy to forget to remove listeners.

    +

    This API allows safely using AbortSignals in Node.js APIs by solving these +two issues by listening to the event such that stopImmediatePropagation does +not prevent the listener from running.

    +

    Returns a disposable so that it may be unsubscribed from more easily.

    +
    import { addAbortListener } from 'node:events';

    function example(signal) {
    let disposable;
    try {
    signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
    disposable = addAbortListener(signal, (e) => {
    // Do something when signal is aborted.
    });
    } finally {
    disposable?.[Symbol.dispose]();
    }
    } +
    + +

    Parameters

    • signal: AbortSignal
    • resource: ((event: Event) => void)
        • (event): void
        • Parameters

          • event: Event

          Returns void

    Returns Disposable

    Disposable that removes the abort listener.

    +

    v20.5.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +

    For EventEmitters this behaves exactly the same as calling .listeners on +the emitter.

    +

    For EventTargets this is the only way to get the event listeners for the +event target. This is useful for debugging and diagnostic purposes.

    +
    import { getEventListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    const listener = () => console.log('Events are fun');
    ee.on('foo', listener);
    console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
    }
    {
    const et = new EventTarget();
    const listener = () => console.log('Events are fun');
    et.addEventListener('foo', listener);
    console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget
    • name: string | symbol

    Returns Function[]

    v15.2.0, v14.17.0

    +
  • Returns the currently set max amount of listeners.

    +

    For EventEmitters this behaves exactly the same as calling .getMaxListeners on +the emitter.

    +

    For EventTargets this is the only way to get the max event listeners for the +event target. If the number of event handlers on a single EventTarget exceeds +the max set, the EventTarget will print a warning.

    +
    import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    console.log(getMaxListeners(ee)); // 10
    setMaxListeners(11, ee);
    console.log(getMaxListeners(ee)); // 11
    }
    {
    const et = new EventTarget();
    console.log(getMaxListeners(et)); // 10
    setMaxListeners(11, et);
    console.log(getMaxListeners(et)); // 11
    } +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | EventTarget

    Returns number

    v19.9.0

    +
  • A class method that returns the number of listeners for the given eventName registered on the given emitter.

    +
    import { EventEmitter, listenerCount } from 'node:events';

    const myEmitter = new EventEmitter();
    myEmitter.on('event', () => {});
    myEmitter.on('event', () => {});
    console.log(listenerCount(myEmitter, 'event'));
    // Prints: 2 +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>

      The emitter to query

      +
    • eventName: string | symbol

      The event name

      +

    Returns number

    v0.9.12

    +

    Since v3.2.0 - Use listenerCount instead.

    +
  • import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo')) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here +
    + +

    Returns an AsyncIterator that iterates eventName events. It will throw +if the EventEmitter emits 'error'. It removes all listeners when +exiting the loop. The value returned by each iteration is an array +composed of the emitted event arguments.

    +

    An AbortSignal can be used to cancel waiting on events:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ac = new AbortController();

    (async () => {
    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo', { signal: ac.signal })) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here
    })();

    process.nextTick(() => ac.abort()); +
    + +

    Use the close option to specify an array of event names that will end the iteration:

    +
    import { on, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    ee.emit('close');
    });

    for await (const event of on(ee, 'foo', { close: ['close'] })) {
    console.log(event); // prints ['bar'] [42]
    }
    // the loop will exit after 'close' is emitted
    console.log('done'); // prints 'done' +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

    An AsyncIterator that iterates eventName events emitted by the emitter

    +

    v13.6.0, v12.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

  • Creates a Promise that is fulfilled when the EventEmitter emits the given +event or that is rejected if the EventEmitter emits 'error' while waiting. +The Promise will resolve with an array of all the arguments emitted to the +given event.

    +

    This method is intentionally generic and works with the web platform EventTarget interface, which has no special'error' event +semantics and does not listen to the 'error' event.

    +
    import { once, EventEmitter } from 'node:events';
    import process from 'node:process';

    const ee = new EventEmitter();

    process.nextTick(() => {
    ee.emit('myevent', 42);
    });

    const [value] = await once(ee, 'myevent');
    console.log(value);

    const err = new Error('kaboom');
    process.nextTick(() => {
    ee.emit('error', err);
    });

    try {
    await once(ee, 'myevent');
    } catch (err) {
    console.error('error happened', err);
    } +
    + +

    The special handling of the 'error' event is only used when events.once() is used to wait for another event. If events.once() is used to wait for the +'error' event itself, then it is treated as any other kind of event without +special handling:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();

    once(ee, 'error')
    .then(([err]) => console.log('ok', err.message))
    .catch((err) => console.error('error', err.message));

    ee.emit('error', new Error('boom'));

    // Prints: ok boom +
    + +

    An AbortSignal can be used to cancel waiting for the event:

    +
    import { EventEmitter, once } from 'node:events';

    const ee = new EventEmitter();
    const ac = new AbortController();

    async function foo(emitter, event, signal) {
    try {
    await once(emitter, event, { signal });
    console.log('event emitted!');
    } catch (error) {
    if (error.name === 'AbortError') {
    console.error('Waiting for the event was canceled!');
    } else {
    console.error('There was an error', error.message);
    }
    }
    }

    foo(ee, 'foo', ac.signal);
    ac.abort(); // Abort waiting for the event
    ee.emit('foo'); // Prints: Waiting for the event was canceled! +
    + +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

    v11.13.0, v10.16.0

    +
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optionaloptions: StaticEventEmitterOptions

    Returns Promise<any[]>

  • import { setMaxListeners, EventEmitter } from 'node:events';

    const target = new EventTarget();
    const emitter = new EventEmitter();

    setMaxListeners(5, target, emitter); +
    + +

    Parameters

    • Optionaln: number

      A non-negative number. The maximum number of listeners per EventTarget event.

      +
    • Rest...eventTargets: (EventEmitter<DefaultEventMap> | EventTarget)[]

    Returns void

    v15.4.0

    +
diff --git a/docs/6.9/classes/UnorderedBulkOperation.html b/docs/6.9/classes/UnorderedBulkOperation.html new file mode 100644 index 0000000000..564e059950 --- /dev/null +++ b/docs/6.9/classes/UnorderedBulkOperation.html @@ -0,0 +1,22 @@ +UnorderedBulkOperation | mongodb

Class UnorderedBulkOperation

Hierarchy (view full)

Properties

isOrdered: boolean
operationId?: number

Accessors

Methods

  • Builds a find operation for an update/updateOne/delete/deleteOne/replaceOne. +Returns a builder object used to complete the definition of the operation.

    +

    Parameters

    Returns FindOperators

    const bulkOp = collection.initializeOrderedBulkOp();

    // Add an updateOne to the bulkOp
    bulkOp.find({ a: 1 }).updateOne({ $set: { b: 2 } });

    // Add an updateMany to the bulkOp
    bulkOp.find({ c: 3 }).update({ $set: { d: 4 } });

    // Add an upsert
    bulkOp.find({ e: 5 }).upsert().updateOne({ $set: { f: 6 } });

    // Add a deletion
    bulkOp.find({ g: 7 }).deleteOne();

    // Add a multi deletion
    bulkOp.find({ h: 8 }).delete();

    // Add a replaceOne
    bulkOp.find({ i: 9 }).replaceOne({writeConcern: { j: 10 }});

    // Update using a pipeline (requires Mongodb 4.2 or higher)
    bulk.find({ k: 11, y: { $exists: true }, z: { $exists: true } }).updateOne([
    { $set: { total: { $sum: [ '$y', '$z' ] } } }
    ]);

    // All of the ops will now be executed
    await bulkOp.execute(); +
    + +
diff --git a/docs/6.9/classes/WriteConcern.html b/docs/6.9/classes/WriteConcern.html new file mode 100644 index 0000000000..6945bf500d --- /dev/null +++ b/docs/6.9/classes/WriteConcern.html @@ -0,0 +1,29 @@ +WriteConcern | mongodb

Class WriteConcern

A MongoDB WriteConcern, which describes the level of acknowledgement +requested from MongoDB for write operations.

+

Constructors

Properties

Methods

Constructors

  • Constructs a WriteConcern from the write concern properties.

    +

    Parameters

    • Optionalw: W

      request acknowledgment that the write operation has propagated to a specified number of mongod instances or to mongod instances with specified tags.

      +
    • OptionalwtimeoutMS: number

      specify a time limit to prevent write operations from blocking indefinitely

      +
    • Optionaljournal: boolean

      request acknowledgment that the write operation has been written to the on-disk journal

      +
    • Optionalfsync: boolean | 1

      equivalent to the j option. Is deprecated and will be removed in the next major version.

      +

    Returns WriteConcern

Properties

fsync?: boolean | 1

Equivalent to the j option.

+

Will be removed in the next major version. Please use journal.

+
j?: boolean

Request acknowledgment that the write operation has been written to the on-disk journal.

+

Will be removed in the next major version. Please use journal.

+
journal?: boolean

Request acknowledgment that the write operation has been written to the on-disk journal

+
w?: W

Request acknowledgment that the write operation has propagated to a specified number of mongod instances or to mongod instances with specified tags.

+
wtimeout?: number

Specify a time limit to prevent write operations from blocking indefinitely.

+

Will be removed in the next major version. Please use wtimeoutMS.

+
wtimeoutMS?: number

Specify a time limit to prevent write operations from blocking indefinitely

+

Methods

diff --git a/docs/6.9/classes/WriteConcernError.html b/docs/6.9/classes/WriteConcernError.html new file mode 100644 index 0000000000..d2d823e366 --- /dev/null +++ b/docs/6.9/classes/WriteConcernError.html @@ -0,0 +1,11 @@ +WriteConcernError | mongodb

Class WriteConcernError

An error representing a failure by the server to apply the requested write concern to the bulk operation.

+

Constructors

Accessors

Methods

Constructors

Accessors

  • get code(): undefined | number
  • Write concern error code.

    +

    Returns undefined | number

  • get errmsg(): undefined | string
  • Write concern error message.

    +

    Returns undefined | string

Methods

diff --git a/docs/6.9/classes/WriteError.html b/docs/6.9/classes/WriteError.html new file mode 100644 index 0000000000..b486151323 --- /dev/null +++ b/docs/6.9/classes/WriteError.html @@ -0,0 +1,16 @@ +WriteError | mongodb

Class WriteError

An error that occurred during a BulkWrite on the server.

+

Constructors

Properties

err +

Accessors

Methods

Constructors

Properties

Accessors

  • get errmsg(): undefined | string
  • WriteError message.

    +

    Returns undefined | string

Methods

  • Returns {
        code: number;
        errmsg?: string;
        index: number;
        op: Document;
    }

    • code: number
    • Optionalerrmsg?: string
    • index: number
    • op: Document
diff --git a/docs/6.9/functions/BSON.calculateObjectSize.html b/docs/6.9/functions/BSON.calculateObjectSize.html new file mode 100644 index 0000000000..54fda2522f --- /dev/null +++ b/docs/6.9/functions/BSON.calculateObjectSize.html @@ -0,0 +1,4 @@ +calculateObjectSize | mongodb

Function calculateObjectSize

  • Calculate the bson size for a passed in Javascript object.

    +

    Parameters

    Returns number

    size of BSON object in bytes

    +
diff --git a/docs/6.9/functions/BSON.deserialize.html b/docs/6.9/functions/BSON.deserialize.html new file mode 100644 index 0000000000..dfb5689ae7 --- /dev/null +++ b/docs/6.9/functions/BSON.deserialize.html @@ -0,0 +1,4 @@ +deserialize | mongodb

Function deserialize

  • Deserialize data as BSON.

    +

    Parameters

    • buffer: Uint8Array

      the buffer containing the serialized set of BSON documents.

      +
    • Optionaloptions: DeserializeOptions

    Returns Document

    returns the deserialized Javascript Object.

    +
diff --git a/docs/6.9/functions/BSON.deserializeStream.html b/docs/6.9/functions/BSON.deserializeStream.html new file mode 100644 index 0000000000..7032367f81 --- /dev/null +++ b/docs/6.9/functions/BSON.deserializeStream.html @@ -0,0 +1,9 @@ +deserializeStream | mongodb

Function deserializeStream

  • Deserialize stream data as BSON documents.

    +

    Parameters

    • data: Uint8Array | ArrayBuffer

      the buffer containing the serialized set of BSON documents.

      +
    • startIndex: number

      the start index in the data Buffer where the deserialization is to start.

      +
    • numberOfDocuments: number

      number of documents to deserialize.

      +
    • documents: Document[]

      an array where to store the deserialized documents.

      +
    • docStartIndex: number

      the index in the documents array from where to start inserting documents.

      +
    • options: DeserializeOptions

      additional options used for the deserialization.

      +

    Returns number

    next index in the buffer after deserialization x numbers of documents.

    +
diff --git a/docs/6.9/functions/BSON.serialize.html b/docs/6.9/functions/BSON.serialize.html new file mode 100644 index 0000000000..2719561be0 --- /dev/null +++ b/docs/6.9/functions/BSON.serialize.html @@ -0,0 +1,4 @@ +serialize | mongodb

Function serialize

  • Serialize a Javascript object.

    +

    Parameters

    Returns Uint8Array

    Buffer object containing the serialized object.

    +
diff --git a/docs/6.9/functions/BSON.serializeWithBufferAndIndex.html b/docs/6.9/functions/BSON.serializeWithBufferAndIndex.html new file mode 100644 index 0000000000..e299dc0e0d --- /dev/null +++ b/docs/6.9/functions/BSON.serializeWithBufferAndIndex.html @@ -0,0 +1,6 @@ +serializeWithBufferAndIndex | mongodb

Function serializeWithBufferAndIndex

  • Serialize a Javascript object using a predefined Buffer and index into the buffer, +useful when pre-allocating the space for serialization.

    +

    Parameters

    • object: Document

      the Javascript object to serialize.

      +
    • finalBuffer: Uint8Array

      the Buffer you pre-allocated to store the serialized BSON object.

      +
    • Optionaloptions: SerializeOptions

    Returns number

    the index pointing to the last written byte in the buffer.

    +
diff --git a/docs/6.9/functions/BSON.setInternalBufferSize.html b/docs/6.9/functions/BSON.setInternalBufferSize.html new file mode 100644 index 0000000000..a4867231fe --- /dev/null +++ b/docs/6.9/functions/BSON.setInternalBufferSize.html @@ -0,0 +1,3 @@ +setInternalBufferSize | mongodb

Function setInternalBufferSize

  • Sets the size of the internal serialization buffer.

    +

    Parameters

    • size: number

      The desired size for the internal serialization buffer in bytes

      +

    Returns void

diff --git a/docs/6.9/functions/configureExplicitResourceManagement.html b/docs/6.9/functions/configureExplicitResourceManagement.html new file mode 100644 index 0000000000..b6d2c0038e --- /dev/null +++ b/docs/6.9/functions/configureExplicitResourceManagement.html @@ -0,0 +1,11 @@ +configureExplicitResourceManagement | mongodb

Function configureExplicitResourceManagement

  • Beta Experimental

    Attaches Symbol.asyncDispose methods to the MongoClient, Cursors, sessions and change streams +if Symbol.asyncDispose is defined.

    +

    It's usually not necessary to call this method - the driver attempts to attach these methods +itself when its loaded. However, sometimes the driver may be loaded before Symbol.asyncDispose +is defined, in which case it is necessary to call this method directly. This can happen if the +application is polyfilling Symbol.asyncDispose.

    +

    Example:

    +
    import { configureExplicitResourceManagement, MongoClient } from 'mongodb/lib/beta';

    Symbol.asyncDispose ??= Symbol('dispose');
    load();

    await using client = new MongoClient(...); +
    + +

    Returns void

diff --git a/docs/6.9/hierarchy.html b/docs/6.9/hierarchy.html new file mode 100644 index 0000000000..932d382afc --- /dev/null +++ b/docs/6.9/hierarchy.html @@ -0,0 +1 @@ +mongodb

mongodb

Class Hierarchy

diff --git a/docs/6.9/index.html b/docs/6.9/index.html new file mode 100644 index 0000000000..846e27f03d --- /dev/null +++ b/docs/6.9/index.html @@ -0,0 +1,282 @@ +mongodb

mongodb

MongoDB Node.js Driver

The official MongoDB driver for Node.js.

+

Upgrading to version 6? Take a look at our upgrade guide here!

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SiteLink
Documentationwww.mongodb.com/docs/drivers/node
API Docsmongodb.github.io/node-mongodb-native
npm packagewww.npmjs.com/package/mongodb
MongoDBwww.mongodb.com
MongoDB Universitylearn.mongodb.com
MongoDB Developer Centerwww.mongodb.com/developer
Stack Overflowstackoverflow.com
Source Codegithub.com/mongodb/node-mongodb-native
Upgrade to v6etc/notes/CHANGES_6.0.0.md
ContributingCONTRIBUTING.md
ChangelogHISTORY.md
+

Releases are created automatically and signed using the Node team's GPG key. This applies to the git tag as well as all release packages provided as part of a GitHub release. To verify the provided packages, download the key and import it using gpg:

+
gpg --import node-driver.asc
+
+ +

The GitHub release contains a detached signature file for the NPM package (named +mongodb-X.Y.Z.tgz.sig).

+

The following command returns the link npm package.

+
npm view mongodb@vX.Y.Z dist.tarball
+
+ +

Using the result of the above command, a curl command can return the official npm package for the release.

+

To verify the integrity of the downloaded package, run the following command:

+
gpg --verify mongodb-X.Y.Z.tgz.sig mongodb-X.Y.Z.tgz
+
+ +
+

[!Note] +No verification is done when using npm to install the package. The contents of the Github tarball and npm's tarball are identical.

+
+

Think you’ve found a bug? Want to see a new feature in node-mongodb-native? Please open a +case in our issue management tool, JIRA:

+
    +
  • Create an account and login jira.mongodb.org.
  • +
  • Navigate to the NODE project jira.mongodb.org/browse/NODE.
  • +
  • Click Create Issue - Please provide as much information as possible about the issue type and how to reproduce it.
  • +
+

Bug reports in JIRA for all driver projects (i.e. NODE, PYTHON, CSHARP, JAVA) and the +Core Server (i.e. SERVER) project are public.

+

For issues with, questions about, or feedback for the Node.js driver, please look into our support channels. Please do not email any of the driver developers directly with issues or questions - you're more likely to get an answer on the MongoDB Community Forums.

+

Change history can be found in HISTORY.md.

+

The driver currently supports 3.6+ servers.

+

** 3.6 support is deprecated and support will be removed in a future version **

+

For exhaustive server and runtime version compatibility matrices, please refer to the following links:

+ +

The following table describes add-on component version compatibility for the Node.js driver. Only packages with versions in these supported ranges are stable when used in combination.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Componentmongodb@3.xmongodb@4.xmongodb@5.xmongodb@6.x
bson^1.0.0^4.0.0^5.0.0^6.0.0
bson-ext^1.0.0 || ^2.0.0^4.0.0N/AN/A
kerberos^1.0.0^1.0.0 || ^2.0.0^1.0.0 || ^2.0.0^2.0.1
mongodb-client-encryption^1.0.0^1.0.0 || ^2.0.0^2.3.0^6.0.0
mongodb-legacyN/A^4.0.0^5.0.0^6.0.0
@mongodb-js/zstdN/A^1.0.0^1.0.0^1.1.0
+

We recommend using the latest version of typescript, however we currently ensure the driver's public types compile against typescript@4.4.0. +This is the lowest typescript version guaranteed to work with our driver: older versions may or may not work - use at your own risk. +Since typescript does not restrict breaking changes to major versions, we consider this support best effort. +If you run into any unexpected compiler failures against our supported TypeScript versions, please let us know by filing an issue on our JIRA.

+

The recommended way to get started using the Node.js 5.x driver is by using the npm (Node Package Manager) to install the dependency in your project.

+

After you've created your own project using npm init, you can run:

+
npm install mongodb
# or ...
yarn add mongodb +
+ +

This will download the MongoDB driver and add a dependency entry in your package.json file.

+

If you are a Typescript user, you will need the Node.js type definitions to use the driver's definitions:

+
npm install -D @types/node
+
+ +

The MongoDB driver can optionally be enhanced by the following feature packages:

+

Maintained by MongoDB:

+ +

Some of these packages include native C++ extensions. +Consult the trouble shooting guide here if you run into compilation issues.

+

Third party:

+ +

This guide will show you how to set up a simple application using Node.js and MongoDB. Its scope is only how to set up the driver and perform the simple CRUD operations. For more in-depth coverage, see the official documentation.

+

First, create a directory where your application will live.

+
mkdir myProject
cd myProject +
+ +

Enter the following command and answer the questions to create the initial structure for your new project:

+
npm init -y
+
+ +

Next, install the driver as a dependency.

+
npm install mongodb
+
+ +

For complete MongoDB installation instructions, see the manual.

+
    +
  1. Download the right MongoDB version from MongoDB
  2. +
  3. Create a database directory (in this case under /data).
  4. +
  5. Install and start a mongod process.
  6. +
+
mongod --dbpath=/data
+
+ +

You should see the mongod process start up and print some status information.

+

Create a new app.js file and add the following code to try out some basic CRUD +operations using the MongoDB driver.

+

Add code to connect to the server and the database myProject:

+
+

NOTE: Resolving DNS Connection issues

+

Node.js 18 changed the default DNS resolution ordering from always prioritizing IPv4 to the ordering +returned by the DNS provider. In some environments, this can result in localhost resolving to +an IPv6 address instead of IPv4 and a consequent failure to connect to the server.

+

This can be resolved by:

+
    +
  • specifying the IP address family using the MongoClient family option (MongoClient(<uri>, { family: 4 } ))
  • +
  • launching mongod or mongos with the ipv6 flag enabled (--ipv6 mongod option documentation)
  • +
  • using a host of 127.0.0.1 in place of localhost
  • +
  • specifying the DNS resolution ordering with the --dns-resolution-order Node.js command line argument (e.g. node --dns-resolution-order=ipv4first)
  • +
+
+
const { MongoClient } = require('mongodb');
// or as an es module:
// import { MongoClient } from 'mongodb'

// Connection URL
const url = 'mongodb://localhost:27017';
const client = new MongoClient(url);

// Database Name
const dbName = 'myProject';

async function main() {
// Use connect method to connect to the server
await client.connect();
console.log('Connected successfully to server');
const db = client.db(dbName);
const collection = db.collection('documents');

// the following code examples can be pasted here...

return 'done.';
}

main()
.then(console.log)
.catch(console.error)
.finally(() => client.close()); +
+ +

Run your app from the command line with:

+
node app.js
+
+ +

The application should print Connected successfully to server to the console.

+

Add to app.js the following function which uses the insertMany +method to add three documents to the documents collection.

+
const insertResult = await collection.insertMany([{ a: 1 }, { a: 2 }, { a: 3 }]);
console.log('Inserted documents =>', insertResult); +
+ +

The insertMany command returns an object with information about the insert operations.

+

Add a query that returns all the documents.

+
const findResult = await collection.find({}).toArray();
console.log('Found documents =>', findResult); +
+ +

This query returns all the documents in the documents collection. +If you add this below the insertMany example, you'll see the documents you've inserted.

+

Add a query filter to find only documents which meet the query criteria.

+
const filteredDocs = await collection.find({ a: 3 }).toArray();
console.log('Found documents filtered by { a: 3 } =>', filteredDocs); +
+ +

Only the documents which match 'a' : 3 should be returned.

+

The following operation updates a document in the documents collection.

+
const updateResult = await collection.updateOne({ a: 3 }, { $set: { b: 1 } });
console.log('Updated documents =>', updateResult); +
+ +

The method updates the first document where the field a is equal to 3 by adding a new field b to the document set to 1. updateResult contains information about whether there was a matching document to update or not.

+

Remove the document where the field a is equal to 3.

+
const deleteResult = await collection.deleteMany({ a: 3 });
console.log('Deleted documents =>', deleteResult); +
+ +

Indexes can improve your application's +performance. The following function creates an index on the a field in the +documents collection.

+
const indexName = await collection.createIndex({ a: 1 });
console.log('index name =', indexName); +
+ +

For more detailed information, see the indexing strategies page.

+

If you need to filter certain errors from our driver, we have a helpful tree of errors described in etc/notes/errors.md.

+

It is our recommendation to use instanceof checks on errors and to avoid relying on parsing error.message and error.name strings in your code. +We guarantee instanceof checks will pass according to semver guidelines, but errors may be sub-classed or their messages may change at any time, even patch releases, as we see fit to increase the helpfulness of the errors.

+

Any new errors we add to the driver will directly extend an existing error class and no existing error will be moved to a different parent class outside of a major release. +This means instanceof will always be able to accurately capture the errors that our driver throws.

+
const client = new MongoClient(url);
await client.connect();
const collection = client.db().collection('collection');

try {
await collection.insertOne({ _id: 1 });
await collection.insertOne({ _id: 1 }); // duplicate key error
} catch (error) {
if (error instanceof MongoServerError) {
console.log(`Error worth logging: ${error}`); // special case for some reason
}
throw error; // still want to crash
} +
+ +

If you need to test with a change from the latest main branch, our mongodb npm package has nightly versions released under the nightly tag.

+
npm install mongodb@nightly
+
+ +

Nightly versions are published regardless of testing outcome. +This means there could be semantic breakages or partially implemented features. +The nightly build is not suitable for production use.

+ +

Apache 2.0

+

© 2012-present MongoDB Contributors
+© 2009-2012 Christian Amor Kvalheim

+
diff --git a/docs/6.9/interfaces/AWSEncryptionKeyOptions.html b/docs/6.9/interfaces/AWSEncryptionKeyOptions.html new file mode 100644 index 0000000000..0fb247fb31 --- /dev/null +++ b/docs/6.9/interfaces/AWSEncryptionKeyOptions.html @@ -0,0 +1,8 @@ +AWSEncryptionKeyOptions | mongodb

Interface AWSEncryptionKeyOptions

Configuration options for making an AWS encryption key

+
interface AWSEncryptionKeyOptions {
    endpoint?: string;
    key: string;
    region: string;
}

Properties

Properties

endpoint?: string

An alternate host to send KMS requests to. May include port number.

+
key: string

The Amazon Resource Name (ARN) to the AWS customer master key (CMK)

+
region: string

The AWS region of the KMS

+
diff --git a/docs/6.9/interfaces/AWSKMSProviderConfiguration.html b/docs/6.9/interfaces/AWSKMSProviderConfiguration.html new file mode 100644 index 0000000000..ccc978ca70 --- /dev/null +++ b/docs/6.9/interfaces/AWSKMSProviderConfiguration.html @@ -0,0 +1,8 @@ +AWSKMSProviderConfiguration | mongodb

Interface AWSKMSProviderConfiguration

interface AWSKMSProviderConfiguration {
    accessKeyId: string;
    secretAccessKey: string;
    sessionToken?: string;
}

Properties

accessKeyId: string

The access key used for the AWS KMS provider

+
secretAccessKey: string

The secret access key used for the AWS KMS provider

+
sessionToken?: string

An optional AWS session token that will be used as the +X-Amz-Security-Token header for AWS requests.

+
diff --git a/docs/6.9/interfaces/AbstractCursorOptions.html b/docs/6.9/interfaces/AbstractCursorOptions.html new file mode 100644 index 0000000000..2aeb64a90d --- /dev/null +++ b/docs/6.9/interfaces/AbstractCursorOptions.html @@ -0,0 +1,70 @@ +AbstractCursorOptions | mongodb

Interface AbstractCursorOptions

interface AbstractCursorOptions {
    awaitData?: boolean;
    batchSize?: number;
    bsonRegExp?: boolean;
    checkKeys?: boolean;
    comment?: unknown;
    enableUtf8Validation?: boolean;
    fieldsAsRaw?: Document;
    ignoreUndefined?: boolean;
    maxAwaitTimeMS?: number;
    maxTimeMS?: number;
    noCursorTimeout?: boolean;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    serializeFunctions?: boolean;
    session?: ClientSession;
    tailable?: boolean;
    useBigInt64?: boolean;
}

Hierarchy (view full)

Properties

awaitData?: boolean

If awaitData is set to true, when the cursor reaches the end of the capped collection, +MongoDB blocks the query thread for a period of time waiting for new data to arrive. +When new data is inserted into the capped collection, the blocked thread is signaled +to wake up and return the next batch to the client.

+
batchSize?: number

Specifies the number of documents to return in each response from MongoDB

+
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
maxAwaitTimeMS?: number

When applicable maxAwaitTimeMS controls the amount of time subsequent getMores +that a cursor uses to fetch more data should take. (ex. cursor.next())

+
maxTimeMS?: number

When applicable maxTimeMS controls the amount of time the initial command +that constructs a cursor should take. (ex. find, aggregate, listCollections)

+
noCursorTimeout?: boolean
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike
readPreference?: ReadPreferenceLike
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession
tailable?: boolean

By default, MongoDB will automatically close a cursor when the +client has exhausted all results in the cursor. However, for capped collections +you may use a Tailable Cursor that remains open after the client exhausts +the results in the initial cursor.

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
diff --git a/docs/6.9/interfaces/AggregateOptions.html b/docs/6.9/interfaces/AggregateOptions.html new file mode 100644 index 0000000000..06970b128a --- /dev/null +++ b/docs/6.9/interfaces/AggregateOptions.html @@ -0,0 +1,84 @@ +AggregateOptions | mongodb

Interface AggregateOptions

interface AggregateOptions {
    allowDiskUse?: boolean;
    authdb?: string;
    batchSize?: number;
    bsonRegExp?: boolean;
    bypassDocumentValidation?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    cursor?: Document;
    dbName?: string;
    enableUtf8Validation?: boolean;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    hint?: Hint;
    ignoreUndefined?: boolean;
    let?: Document;
    maxAwaitTimeMS?: number;
    maxTimeMS?: number;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    out?: string;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    serializeFunctions?: boolean;
    session?: ClientSession;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

allowDiskUse?: boolean

allowDiskUse lets the server know if it can use disk to store temporary results for the aggregation (requires mongodb 2.6 >).

+
authdb?: string
batchSize?: number

The number of documents to return per batch. See aggregation documentation.

+
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
bypassDocumentValidation?: boolean

Allow driver to bypass schema validation.

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Specify collation.

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
cursor?: Document

Return the query as cursor, on 2.6 > it returns as a real cursor on pre 2.6 it returns as an emulated cursor.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
hint?: Hint

Add an index selection hint to an aggregation command

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
let?: Document

Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

+
maxAwaitTimeMS?: number

The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query.

+
maxTimeMS?: number

specifies a cumulative time limit in milliseconds for processing operations on the cursor. MongoDB interrupts the operation at the earliest following interrupt point.

+
noResponse?: boolean
omitReadPreference?: boolean
out?: string
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/AggregationCursorOptions.html b/docs/6.9/interfaces/AggregationCursorOptions.html new file mode 100644 index 0000000000..ad6e6f444c --- /dev/null +++ b/docs/6.9/interfaces/AggregationCursorOptions.html @@ -0,0 +1,97 @@ +AggregationCursorOptions | mongodb

Interface AggregationCursorOptions

interface AggregationCursorOptions {
    allowDiskUse?: boolean;
    authdb?: string;
    awaitData?: boolean;
    batchSize?: number;
    bsonRegExp?: boolean;
    bypassDocumentValidation?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    cursor?: Document;
    dbName?: string;
    enableUtf8Validation?: boolean;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    hint?: Hint;
    ignoreUndefined?: boolean;
    let?: Document;
    maxAwaitTimeMS?: number;
    maxTimeMS?: number;
    noCursorTimeout?: boolean;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    out?: string;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    serializeFunctions?: boolean;
    session?: ClientSession;
    tailable?: boolean;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

allowDiskUse?: boolean

allowDiskUse lets the server know if it can use disk to store temporary results for the aggregation (requires mongodb 2.6 >).

+
authdb?: string
awaitData?: boolean

If awaitData is set to true, when the cursor reaches the end of the capped collection, +MongoDB blocks the query thread for a period of time waiting for new data to arrive. +When new data is inserted into the capped collection, the blocked thread is signaled +to wake up and return the next batch to the client.

+
batchSize?: number

Specifies the number of documents to return in each response from MongoDB

+
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
bypassDocumentValidation?: boolean

Allow driver to bypass schema validation.

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Specify collation.

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
cursor?: Document

Return the query as cursor, on 2.6 > it returns as a real cursor on pre 2.6 it returns as an emulated cursor.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
hint?: Hint

Add an index selection hint to an aggregation command

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
let?: Document

Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

+
maxAwaitTimeMS?: number

When applicable maxAwaitTimeMS controls the amount of time subsequent getMores +that a cursor uses to fetch more data should take. (ex. cursor.next())

+
maxTimeMS?: number

When applicable maxTimeMS controls the amount of time the initial command +that constructs a cursor should take. (ex. find, aggregate, listCollections)

+
noCursorTimeout?: boolean
noResponse?: boolean
omitReadPreference?: boolean
out?: string
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
tailable?: boolean

By default, MongoDB will automatically close a cursor when the +client has exhausted all results in the cursor. However, for capped collections +you may use a Tailable Cursor that remains open after the client exhausts +the results in the initial cursor.

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/AsyncDisposable.html b/docs/6.9/interfaces/AsyncDisposable.html new file mode 100644 index 0000000000..de9e69ec15 --- /dev/null +++ b/docs/6.9/interfaces/AsyncDisposable.html @@ -0,0 +1,2 @@ +AsyncDisposable | mongodb

Interface AsyncDisposable

interface AsyncDisposable {
    [asyncDispose](): Promise<void>;
}

Implemented by

Methods

diff --git a/docs/6.9/interfaces/Auth.html b/docs/6.9/interfaces/Auth.html new file mode 100644 index 0000000000..c8250b53ee --- /dev/null +++ b/docs/6.9/interfaces/Auth.html @@ -0,0 +1,5 @@ +Auth | mongodb

Interface Auth

interface Auth {
    password?: string;
    username?: string;
}

Properties

Properties

password?: string

The password for auth

+
username?: string

The username for auth

+
diff --git a/docs/6.9/interfaces/AuthMechanismProperties.html b/docs/6.9/interfaces/AuthMechanismProperties.html new file mode 100644 index 0000000000..b0cd8073ce --- /dev/null +++ b/docs/6.9/interfaces/AuthMechanismProperties.html @@ -0,0 +1,16 @@ +AuthMechanismProperties | mongodb

Interface AuthMechanismProperties

interface AuthMechanismProperties {
    ALLOWED_HOSTS?: string[];
    AWS_SESSION_TOKEN?: string;
    CANONICALIZE_HOST_NAME?: GSSAPICanonicalizationValue;
    ENVIRONMENT?: "azure" | "gcp" | "test";
    OIDC_CALLBACK?: OIDCCallbackFunction;
    OIDC_HUMAN_CALLBACK?: OIDCCallbackFunction;
    SERVICE_HOST?: string;
    SERVICE_NAME?: string;
    SERVICE_REALM?: string;
    TOKEN_RESOURCE?: string;
}

Hierarchy (view full)

Properties

ALLOWED_HOSTS?: string[]

Allowed hosts that OIDC auth can connect to.

+
AWS_SESSION_TOKEN?: string
CANONICALIZE_HOST_NAME?: GSSAPICanonicalizationValue
ENVIRONMENT?: "azure" | "gcp" | "test"

The OIDC environment. Note that 'test' is for internal use only.

+
OIDC_CALLBACK?: OIDCCallbackFunction

A user provided OIDC machine callback function.

+
OIDC_HUMAN_CALLBACK?: OIDCCallbackFunction

A user provided OIDC human interacted callback function.

+
SERVICE_HOST?: string
SERVICE_NAME?: string
SERVICE_REALM?: string
TOKEN_RESOURCE?: string

The resource token for OIDC auth in Azure and GCP.

+
diff --git a/docs/6.9/interfaces/AutoEncryptionOptions.html b/docs/6.9/interfaces/AutoEncryptionOptions.html new file mode 100644 index 0000000000..c9996b25f5 --- /dev/null +++ b/docs/6.9/interfaces/AutoEncryptionOptions.html @@ -0,0 +1,49 @@ +AutoEncryptionOptions | mongodb

Interface AutoEncryptionOptions

interface AutoEncryptionOptions {
    bypassAutoEncryption?: boolean;
    bypassQueryAnalysis?: boolean;
    encryptedFieldsMap?: Document;
    extraOptions?: {
        cryptSharedLibPath?: string;
        cryptSharedLibRequired?: boolean;
        mongocryptdBypassSpawn?: boolean;
        mongocryptdSpawnArgs?: string[];
        mongocryptdSpawnPath?: string;
        mongocryptdURI?: string;
    };
    keyVaultClient?: MongoClient;
    keyVaultNamespace?: string;
    kmsProviders?: KMSProviders;
    options?: {
        logger?: ((level: AutoEncryptionLoggerLevel, message: string) => void);
    };
    proxyOptions?: ProxyOptions;
    schemaMap?: Document;
    tlsOptions?: CSFLEKMSTlsOptions;
}

Properties

bypassAutoEncryption?: boolean

Allows the user to bypass auto encryption, maintaining implicit decryption

+
bypassQueryAnalysis?: boolean

Allows users to bypass query analysis

+
encryptedFieldsMap?: Document

Supply a schema for the encrypted fields in the document

+
extraOptions?: {
    cryptSharedLibPath?: string;
    cryptSharedLibRequired?: boolean;
    mongocryptdBypassSpawn?: boolean;
    mongocryptdSpawnArgs?: string[];
    mongocryptdSpawnPath?: string;
    mongocryptdURI?: string;
}

Type declaration

  • OptionalcryptSharedLibPath?: string

    Full path to a MongoDB Crypt shared library to be used (instead of mongocryptd).

    +

    This needs to be the path to the file itself, not a directory. +It can be an absolute or relative path. If the path is relative and +its first component is $ORIGIN, it will be replaced by the directory +containing the mongodb-client-encryption native addon file. Otherwise, +the path will be interpreted relative to the current working directory.

    +

    Currently, loading different MongoDB Crypt shared library files from different +MongoClients in the same process is not supported.

    +

    If this option is provided and no MongoDB Crypt shared library could be loaded +from the specified location, creating the MongoClient will fail.

    +

    If this option is not provided and cryptSharedLibRequired is not specified, +the AutoEncrypter will attempt to spawn and/or use mongocryptd according +to the mongocryptd-specific extraOptions options.

    +

    Specifying a path prevents mongocryptd from being used as a fallback.

    +

    Requires the MongoDB Crypt shared library, available in MongoDB 6.0 or higher.

    +
  • OptionalcryptSharedLibRequired?: boolean

    If specified, never use mongocryptd and instead fail when the MongoDB Crypt +shared library could not be loaded.

    +

    This is always true when cryptSharedLibPath is specified.

    +

    Requires the MongoDB Crypt shared library, available in MongoDB 6.0 or higher.

    +
  • OptionalmongocryptdBypassSpawn?: boolean

    If true, autoEncryption will not attempt to spawn a mongocryptd before connecting

    +
  • OptionalmongocryptdSpawnArgs?: string[]

    Command line arguments to use when auto-spawning a mongocryptd

    +
  • OptionalmongocryptdSpawnPath?: string

    The path to the mongocryptd executable on the system

    +
  • OptionalmongocryptdURI?: string

    A local process the driver communicates with to determine how to encrypt values in a command. +Defaults to "mongodb://%2Fvar%2Fmongocryptd.sock" if domain sockets are available or "mongodb://localhost:27020" otherwise

    +
keyVaultClient?: MongoClient

A MongoClient used to fetch keys from a key vault

+
keyVaultNamespace?: string

The namespace where keys are stored in the key vault

+
kmsProviders?: KMSProviders

Configuration options that are used by specific KMS providers during key generation, encryption, and decryption.

+
options?: {
    logger?: ((level: AutoEncryptionLoggerLevel, message: string) => void);
}

Type declaration

  • Optionallogger?: ((level: AutoEncryptionLoggerLevel, message: string) => void)

    An optional hook to catch logging messages from the underlying encryption engine

    +
proxyOptions?: ProxyOptions
schemaMap?: Document

A map of namespaces to a local JSON schema for encryption

+

NOTE: Supplying options.schemaMap provides more security than relying on JSON Schemas obtained from the server. +It protects against a malicious server advertising a false JSON Schema, which could trick the client into sending decrypted data that should be encrypted. +Schemas supplied in the schemaMap only apply to configuring automatic encryption for Client-Side Field Level Encryption. +Other validation rules in the JSON schema will not be enforced by the driver and will result in an error.

+
tlsOptions?: CSFLEKMSTlsOptions

The TLS options to use connecting to the KMS provider

+
diff --git a/docs/6.9/interfaces/AzureEncryptionKeyOptions.html b/docs/6.9/interfaces/AzureEncryptionKeyOptions.html new file mode 100644 index 0000000000..6344647515 --- /dev/null +++ b/docs/6.9/interfaces/AzureEncryptionKeyOptions.html @@ -0,0 +1,8 @@ +AzureEncryptionKeyOptions | mongodb

Interface AzureEncryptionKeyOptions

Configuration options for making an Azure encryption key

+
interface AzureEncryptionKeyOptions {
    keyName: string;
    keyVaultEndpoint: string;
    keyVersion?: string;
}

Properties

keyName: string

Key name

+
keyVaultEndpoint: string

Key vault URL, typically <name>.vault.azure.net

+
keyVersion?: string

Key version

+
diff --git a/docs/6.9/interfaces/BSON.BSONRegExpExtended.html b/docs/6.9/interfaces/BSON.BSONRegExpExtended.html new file mode 100644 index 0000000000..b189fb62dd --- /dev/null +++ b/docs/6.9/interfaces/BSON.BSONRegExpExtended.html @@ -0,0 +1,2 @@ +BSONRegExpExtended | mongodb

Interface BSONRegExpExtended

interface BSONRegExpExtended {
    $regularExpression: {
        options: string;
        pattern: string;
    };
}

Properties

Properties

$regularExpression: {
    options: string;
    pattern: string;
}
diff --git a/docs/6.9/interfaces/BSON.BSONRegExpExtendedLegacy.html b/docs/6.9/interfaces/BSON.BSONRegExpExtendedLegacy.html new file mode 100644 index 0000000000..920f4ea219 --- /dev/null +++ b/docs/6.9/interfaces/BSON.BSONRegExpExtendedLegacy.html @@ -0,0 +1,3 @@ +BSONRegExpExtendedLegacy | mongodb

Interface BSONRegExpExtendedLegacy

interface BSONRegExpExtendedLegacy {
    $options: string;
    $regex: string | BSONRegExp;
}

Properties

Properties

$options: string
$regex: string | BSONRegExp
diff --git a/docs/6.9/interfaces/BSON.BSONSymbolExtended.html b/docs/6.9/interfaces/BSON.BSONSymbolExtended.html new file mode 100644 index 0000000000..b7057ba9cb --- /dev/null +++ b/docs/6.9/interfaces/BSON.BSONSymbolExtended.html @@ -0,0 +1,2 @@ +BSONSymbolExtended | mongodb

Interface BSONSymbolExtended

interface BSONSymbolExtended {
    $symbol: string;
}

Properties

Properties

$symbol: string
diff --git a/docs/6.9/interfaces/BSON.BinaryExtended.html b/docs/6.9/interfaces/BSON.BinaryExtended.html new file mode 100644 index 0000000000..21d2c983ab --- /dev/null +++ b/docs/6.9/interfaces/BSON.BinaryExtended.html @@ -0,0 +1,2 @@ +BinaryExtended | mongodb

Interface BinaryExtended

interface BinaryExtended {
    $binary: {
        base64: string;
        subType: string;
    };
}

Properties

Properties

$binary: {
    base64: string;
    subType: string;
}
diff --git a/docs/6.9/interfaces/BSON.BinaryExtendedLegacy.html b/docs/6.9/interfaces/BSON.BinaryExtendedLegacy.html new file mode 100644 index 0000000000..8a3d9f338d --- /dev/null +++ b/docs/6.9/interfaces/BSON.BinaryExtendedLegacy.html @@ -0,0 +1,3 @@ +BinaryExtendedLegacy | mongodb

Interface BinaryExtendedLegacy

interface BinaryExtendedLegacy {
    $binary: string;
    $type: string;
}

Properties

Properties

$binary: string
$type: string
diff --git a/docs/6.9/interfaces/BSON.CodeExtended.html b/docs/6.9/interfaces/BSON.CodeExtended.html new file mode 100644 index 0000000000..2658356b18 --- /dev/null +++ b/docs/6.9/interfaces/BSON.CodeExtended.html @@ -0,0 +1,3 @@ +CodeExtended | mongodb

Interface CodeExtended

interface CodeExtended {
    $code: string;
    $scope?: Document;
}

Properties

Properties

$code: string
$scope?: Document
diff --git a/docs/6.9/interfaces/BSON.DBRefLike.html b/docs/6.9/interfaces/BSON.DBRefLike.html new file mode 100644 index 0000000000..903483335d --- /dev/null +++ b/docs/6.9/interfaces/BSON.DBRefLike.html @@ -0,0 +1,4 @@ +DBRefLike | mongodb

Interface DBRefLike

interface DBRefLike {
    $db?: string;
    $id: ObjectId;
    $ref: string;
}

Properties

Properties

$db?: string
$ref: string
diff --git a/docs/6.9/interfaces/BSON.Decimal128Extended.html b/docs/6.9/interfaces/BSON.Decimal128Extended.html new file mode 100644 index 0000000000..6d7a49ccb5 --- /dev/null +++ b/docs/6.9/interfaces/BSON.Decimal128Extended.html @@ -0,0 +1,2 @@ +Decimal128Extended | mongodb

Interface Decimal128Extended

interface Decimal128Extended {
    $numberDecimal: string;
}

Properties

Properties

$numberDecimal: string
diff --git a/docs/6.9/interfaces/BSON.DeserializeOptions.html b/docs/6.9/interfaces/BSON.DeserializeOptions.html new file mode 100644 index 0000000000..19393ca71b --- /dev/null +++ b/docs/6.9/interfaces/BSON.DeserializeOptions.html @@ -0,0 +1,32 @@ +DeserializeOptions | mongodb

Interface DeserializeOptions

interface DeserializeOptions {
    allowObjectSmallerThanBufferSize?: boolean;
    bsonRegExp?: boolean;
    fieldsAsRaw?: Document;
    index?: number;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    useBigInt64?: boolean;
    validation?: {
        utf8: boolean | Record<string, true> | Record<string, false>;
    };
}

Properties

allowObjectSmallerThanBufferSize?: boolean

allows the buffer to be larger than the parsed BSON object.

+

false

+
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
index?: number

Offset into buffer to begin reading document from

+

0

+
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
validation?: {
    utf8: boolean | Record<string, true> | Record<string, false>;
}

Allows for opt-out utf-8 validation for all keys or +specified keys. Must be all true or all false.

+
// disables validation on all keys
validation: { utf8: false }

// enables validation only on specified keys a, b, and c
validation: { utf8: { a: true, b: true, c: true } }

// disables validation only on specified keys a, b
validation: { utf8: { a: false, b: false } } +
+ +
diff --git a/docs/6.9/interfaces/BSON.Document.html b/docs/6.9/interfaces/BSON.Document.html new file mode 100644 index 0000000000..9b63031d8f --- /dev/null +++ b/docs/6.9/interfaces/BSON.Document.html @@ -0,0 +1 @@ +Document | mongodb
diff --git a/docs/6.9/interfaces/BSON.DoubleExtended.html b/docs/6.9/interfaces/BSON.DoubleExtended.html new file mode 100644 index 0000000000..4470846faa --- /dev/null +++ b/docs/6.9/interfaces/BSON.DoubleExtended.html @@ -0,0 +1,2 @@ +DoubleExtended | mongodb

Interface DoubleExtended

interface DoubleExtended {
    $numberDouble: string;
}

Properties

Properties

$numberDouble: string
diff --git a/docs/6.9/interfaces/BSON.Int32Extended.html b/docs/6.9/interfaces/BSON.Int32Extended.html new file mode 100644 index 0000000000..70da8462f6 --- /dev/null +++ b/docs/6.9/interfaces/BSON.Int32Extended.html @@ -0,0 +1,2 @@ +Int32Extended | mongodb

Interface Int32Extended

interface Int32Extended {
    $numberInt: string;
}

Properties

Properties

$numberInt: string
diff --git a/docs/6.9/interfaces/BSON.LongExtended.html b/docs/6.9/interfaces/BSON.LongExtended.html new file mode 100644 index 0000000000..349cd8ddeb --- /dev/null +++ b/docs/6.9/interfaces/BSON.LongExtended.html @@ -0,0 +1,2 @@ +LongExtended | mongodb

Interface LongExtended

interface LongExtended {
    $numberLong: string;
}

Properties

Properties

$numberLong: string
diff --git a/docs/6.9/interfaces/BSON.MaxKeyExtended.html b/docs/6.9/interfaces/BSON.MaxKeyExtended.html new file mode 100644 index 0000000000..8996628fe5 --- /dev/null +++ b/docs/6.9/interfaces/BSON.MaxKeyExtended.html @@ -0,0 +1,2 @@ +MaxKeyExtended | mongodb

Interface MaxKeyExtended

interface MaxKeyExtended {
    $maxKey: 1;
}

Properties

Properties

$maxKey: 1
diff --git a/docs/6.9/interfaces/BSON.MinKeyExtended.html b/docs/6.9/interfaces/BSON.MinKeyExtended.html new file mode 100644 index 0000000000..a26c718a5d --- /dev/null +++ b/docs/6.9/interfaces/BSON.MinKeyExtended.html @@ -0,0 +1,2 @@ +MinKeyExtended | mongodb

Interface MinKeyExtended

interface MinKeyExtended {
    $minKey: 1;
}

Properties

Properties

$minKey: 1
diff --git a/docs/6.9/interfaces/BSON.ObjectIdExtended.html b/docs/6.9/interfaces/BSON.ObjectIdExtended.html new file mode 100644 index 0000000000..9aef7c1378 --- /dev/null +++ b/docs/6.9/interfaces/BSON.ObjectIdExtended.html @@ -0,0 +1,2 @@ +ObjectIdExtended | mongodb

Interface ObjectIdExtended

interface ObjectIdExtended {
    $oid: string;
}

Properties

Properties

$oid: string
diff --git a/docs/6.9/interfaces/BSON.ObjectIdLike.html b/docs/6.9/interfaces/BSON.ObjectIdLike.html new file mode 100644 index 0000000000..ea283f85c5 --- /dev/null +++ b/docs/6.9/interfaces/BSON.ObjectIdLike.html @@ -0,0 +1,4 @@ +ObjectIdLike | mongodb

Interface ObjectIdLike

interface ObjectIdLike {
    __id?: string;
    id: string | Uint8Array;
    toHexString(): string;
}

Properties

Methods

Properties

__id?: string
id: string | Uint8Array

Methods

  • Returns string

diff --git a/docs/6.9/interfaces/BSON.SerializeOptions.html b/docs/6.9/interfaces/BSON.SerializeOptions.html new file mode 100644 index 0000000000..c40ed24c35 --- /dev/null +++ b/docs/6.9/interfaces/BSON.SerializeOptions.html @@ -0,0 +1,14 @@ +SerializeOptions | mongodb

Interface SerializeOptions

interface SerializeOptions {
    checkKeys?: boolean;
    ignoreUndefined?: boolean;
    index?: number;
    serializeFunctions?: boolean;
}

Properties

checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
index?: number

the index in the buffer where we wish to start serializing into

+

0

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
diff --git a/docs/6.9/interfaces/BSON.TimestampExtended.html b/docs/6.9/interfaces/BSON.TimestampExtended.html new file mode 100644 index 0000000000..851650f64b --- /dev/null +++ b/docs/6.9/interfaces/BSON.TimestampExtended.html @@ -0,0 +1,2 @@ +TimestampExtended | mongodb

Interface TimestampExtended

interface TimestampExtended {
    $timestamp: {
        i: number;
        t: number;
    };
}

Properties

Properties

$timestamp: {
    i: number;
    t: number;
}
diff --git a/docs/6.9/interfaces/BSONSerializeOptions.html b/docs/6.9/interfaces/BSONSerializeOptions.html new file mode 100644 index 0000000000..25da3c35fd --- /dev/null +++ b/docs/6.9/interfaces/BSONSerializeOptions.html @@ -0,0 +1,44 @@ +BSONSerializeOptions | mongodb

Interface BSONSerializeOptions

BSON Serialization options.

+
interface BSONSerializeOptions {
    bsonRegExp?: boolean;
    checkKeys?: boolean;
    enableUtf8Validation?: boolean;
    fieldsAsRaw?: Document;
    ignoreUndefined?: boolean;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    serializeFunctions?: boolean;
    useBigInt64?: boolean;
}

Hierarchy (view full)

Properties

bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
diff --git a/docs/6.9/interfaces/BulkWriteOperationError.html b/docs/6.9/interfaces/BulkWriteOperationError.html new file mode 100644 index 0000000000..9a4ca4636d --- /dev/null +++ b/docs/6.9/interfaces/BulkWriteOperationError.html @@ -0,0 +1,6 @@ +BulkWriteOperationError | mongodb

Interface BulkWriteOperationError

interface BulkWriteOperationError {
    code: number;
    errInfo: Document;
    errmsg: string;
    index: number;
    op: Document | DeleteStatement | UpdateStatement;
}

Properties

Properties

code: number
errInfo: Document
errmsg: string
index: number
diff --git a/docs/6.9/interfaces/BulkWriteOptions.html b/docs/6.9/interfaces/BulkWriteOptions.html new file mode 100644 index 0000000000..814d5ca06f --- /dev/null +++ b/docs/6.9/interfaces/BulkWriteOptions.html @@ -0,0 +1,80 @@ +BulkWriteOptions | mongodb

Interface BulkWriteOptions

interface BulkWriteOptions {
    authdb?: string;
    bsonRegExp?: boolean;
    bypassDocumentValidation?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    dbName?: string;
    enableUtf8Validation?: boolean;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    forceServerObjectId?: boolean;
    ignoreUndefined?: boolean;
    let?: Document;
    maxTimeMS?: number;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    ordered?: boolean;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    serializeFunctions?: boolean;
    session?: ClientSession;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

authdb?: string
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
bypassDocumentValidation?: boolean

Allow driver to bypass schema validation.

+

false - documents will be validated by default

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Collation

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
forceServerObjectId?: boolean

Force server to assign _id values instead of driver.

+

false - the driver generates _id fields by default

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
let?: Document

Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

+
maxTimeMS?: number
noResponse?: boolean
omitReadPreference?: boolean
ordered?: boolean

If true, when an insert fails, don't execute the remaining writes. +If false, continue with remaining inserts when one fails.

+

true - inserts are ordered by default

+
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/ChangeStreamCollModDocument.html b/docs/6.9/interfaces/ChangeStreamCollModDocument.html new file mode 100644 index 0000000000..95f81bce19 --- /dev/null +++ b/docs/6.9/interfaces/ChangeStreamCollModDocument.html @@ -0,0 +1,32 @@ +ChangeStreamCollModDocument | mongodb

Interface ChangeStreamCollModDocument

Only present when the showExpandedEvents flag is enabled.

+
interface ChangeStreamCollModDocument {
    _id: unknown;
    clusterTime?: Timestamp;
    collectionUUID: Binary;
    lsid?: ServerSessionId;
    operationType: "modify";
    splitEvent?: ChangeStreamSplitEvent;
    txnNumber?: number;
}

Hierarchy (view full)

Properties

_id: unknown

The id functions as an opaque token for use when resuming an interrupted +change stream.

+
clusterTime?: Timestamp

The timestamp from the oplog entry associated with the event. +For events that happened as part of a multi-document transaction, the associated change stream +notifications will have the same clusterTime value, namely the time when the transaction was committed. +On a sharded cluster, events that occur on different shards can have the same clusterTime but be +associated with different transactions or even not be associated with any transaction. +To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

+
collectionUUID: Binary

The UUID (Binary subtype 4) of the collection that the operation was performed on.

+

Only present when the showExpandedEvents flag is enabled.

+

NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers +flag is enabled.

+

6.1.0

+

The identifier for the session associated with the transaction. +Only present if the operation is part of a multi-document transaction.

+
operationType: "modify"

Describes the type of operation represented in this change notification

+

When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +stage, events larger than 16MB will be split into multiple events and contain the +following information about which fragment the current event is.

+
txnNumber?: number

The transaction number. +Only present if the operation is part of a multi-document transaction.

+

NOTE: txnNumber can be a Long if promoteLongs is set to false

+
diff --git a/docs/6.9/interfaces/ChangeStreamCreateDocument.html b/docs/6.9/interfaces/ChangeStreamCreateDocument.html new file mode 100644 index 0000000000..4d73af0de2 --- /dev/null +++ b/docs/6.9/interfaces/ChangeStreamCreateDocument.html @@ -0,0 +1,31 @@ +ChangeStreamCreateDocument | mongodb

Interface ChangeStreamCreateDocument

interface ChangeStreamCreateDocument {
    _id: unknown;
    clusterTime?: Timestamp;
    collectionUUID: Binary;
    lsid?: ServerSessionId;
    operationType: "create";
    splitEvent?: ChangeStreamSplitEvent;
    txnNumber?: number;
}

Hierarchy (view full)

Properties

_id: unknown

The id functions as an opaque token for use when resuming an interrupted +change stream.

+
clusterTime?: Timestamp

The timestamp from the oplog entry associated with the event. +For events that happened as part of a multi-document transaction, the associated change stream +notifications will have the same clusterTime value, namely the time when the transaction was committed. +On a sharded cluster, events that occur on different shards can have the same clusterTime but be +associated with different transactions or even not be associated with any transaction. +To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

+
collectionUUID: Binary

The UUID (Binary subtype 4) of the collection that the operation was performed on.

+

Only present when the showExpandedEvents flag is enabled.

+

NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers +flag is enabled.

+

6.1.0

+

The identifier for the session associated with the transaction. +Only present if the operation is part of a multi-document transaction.

+
operationType: "create"

Describes the type of operation represented in this change notification

+

When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +stage, events larger than 16MB will be split into multiple events and contain the +following information about which fragment the current event is.

+
txnNumber?: number

The transaction number. +Only present if the operation is part of a multi-document transaction.

+

NOTE: txnNumber can be a Long if promoteLongs is set to false

+
diff --git a/docs/6.9/interfaces/ChangeStreamCreateIndexDocument.html b/docs/6.9/interfaces/ChangeStreamCreateIndexDocument.html new file mode 100644 index 0000000000..1e23c119c9 --- /dev/null +++ b/docs/6.9/interfaces/ChangeStreamCreateIndexDocument.html @@ -0,0 +1,36 @@ +ChangeStreamCreateIndexDocument | mongodb

Interface ChangeStreamCreateIndexDocument

Only present when the showExpandedEvents flag is enabled.

+
interface ChangeStreamCreateIndexDocument {
    _id: unknown;
    clusterTime?: Timestamp;
    collectionUUID: Binary;
    lsid?: ServerSessionId;
    operationDescription?: Document;
    operationType: "createIndexes";
    splitEvent?: ChangeStreamSplitEvent;
    txnNumber?: number;
}

Hierarchy (view full)

Properties

_id: unknown

The id functions as an opaque token for use when resuming an interrupted +change stream.

+
clusterTime?: Timestamp

The timestamp from the oplog entry associated with the event. +For events that happened as part of a multi-document transaction, the associated change stream +notifications will have the same clusterTime value, namely the time when the transaction was committed. +On a sharded cluster, events that occur on different shards can have the same clusterTime but be +associated with different transactions or even not be associated with any transaction. +To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

+
collectionUUID: Binary

The UUID (Binary subtype 4) of the collection that the operation was performed on.

+

Only present when the showExpandedEvents flag is enabled.

+

NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers +flag is enabled.

+

6.1.0

+

The identifier for the session associated with the transaction. +Only present if the operation is part of a multi-document transaction.

+
operationDescription?: Document

An description of the operation.

+

Only present when the showExpandedEvents flag is enabled.

+

6.1.0

+
operationType: "createIndexes"

Describes the type of operation represented in this change notification

+

When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +stage, events larger than 16MB will be split into multiple events and contain the +following information about which fragment the current event is.

+
txnNumber?: number

The transaction number. +Only present if the operation is part of a multi-document transaction.

+

NOTE: txnNumber can be a Long if promoteLongs is set to false

+
diff --git a/docs/6.9/interfaces/ChangeStreamDeleteDocument.html b/docs/6.9/interfaces/ChangeStreamDeleteDocument.html new file mode 100644 index 0000000000..e1c201340b --- /dev/null +++ b/docs/6.9/interfaces/ChangeStreamDeleteDocument.html @@ -0,0 +1,42 @@ +ChangeStreamDeleteDocument | mongodb

Interface ChangeStreamDeleteDocument<TSchema>

interface ChangeStreamDeleteDocument<TSchema> {
    _id: unknown;
    clusterTime?: Timestamp;
    collectionUUID: Binary;
    documentKey: {
        _id: InferIdType<TSchema>;
        [shardKey: string]: any;
    };
    fullDocumentBeforeChange?: TSchema;
    lsid?: ServerSessionId;
    ns: ChangeStreamNameSpace;
    operationType: "delete";
    splitEvent?: ChangeStreamSplitEvent;
    txnNumber?: number;
}

Type Parameters

Hierarchy (view full)

Properties

_id: unknown

The id functions as an opaque token for use when resuming an interrupted +change stream.

+
clusterTime?: Timestamp

The timestamp from the oplog entry associated with the event. +For events that happened as part of a multi-document transaction, the associated change stream +notifications will have the same clusterTime value, namely the time when the transaction was committed. +On a sharded cluster, events that occur on different shards can have the same clusterTime but be +associated with different transactions or even not be associated with any transaction. +To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

+
collectionUUID: Binary

The UUID (Binary subtype 4) of the collection that the operation was performed on.

+

Only present when the showExpandedEvents flag is enabled.

+

NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers +flag is enabled.

+

6.1.0

+
documentKey: {
    _id: InferIdType<TSchema>;
    [shardKey: string]: any;
}

For unsharded collections this contains a single field _id. +For sharded collections, this will contain all the components of the shard key

+
fullDocumentBeforeChange?: TSchema

Contains the pre-image of the modified or deleted document if the +pre-image is available for the change event and either 'required' or +'whenAvailable' was specified for the 'fullDocumentBeforeChange' option +when creating the change stream. If 'whenAvailable' was specified but the +pre-image is unavailable, this will be explicitly set to null.

+

The identifier for the session associated with the transaction. +Only present if the operation is part of a multi-document transaction.

+

Namespace the delete event occurred on

+
operationType: "delete"

Describes the type of operation represented in this change notification

+

When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +stage, events larger than 16MB will be split into multiple events and contain the +following information about which fragment the current event is.

+
txnNumber?: number

The transaction number. +Only present if the operation is part of a multi-document transaction.

+

NOTE: txnNumber can be a Long if promoteLongs is set to false

+
diff --git a/docs/6.9/interfaces/ChangeStreamDocumentCollectionUUID.html b/docs/6.9/interfaces/ChangeStreamDocumentCollectionUUID.html new file mode 100644 index 0000000000..c6ba04d35d --- /dev/null +++ b/docs/6.9/interfaces/ChangeStreamDocumentCollectionUUID.html @@ -0,0 +1,7 @@ +ChangeStreamDocumentCollectionUUID | mongodb

Interface ChangeStreamDocumentCollectionUUID

interface ChangeStreamDocumentCollectionUUID {
    collectionUUID: Binary;
}

Hierarchy (view full)

Properties

Properties

collectionUUID: Binary

The UUID (Binary subtype 4) of the collection that the operation was performed on.

+

Only present when the showExpandedEvents flag is enabled.

+

NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers +flag is enabled.

+

6.1.0

+
diff --git a/docs/6.9/interfaces/ChangeStreamDocumentCommon.html b/docs/6.9/interfaces/ChangeStreamDocumentCommon.html new file mode 100644 index 0000000000..f1db95abe0 --- /dev/null +++ b/docs/6.9/interfaces/ChangeStreamDocumentCommon.html @@ -0,0 +1,22 @@ +ChangeStreamDocumentCommon | mongodb

Interface ChangeStreamDocumentCommon

interface ChangeStreamDocumentCommon {
    _id: unknown;
    clusterTime?: Timestamp;
    lsid?: ServerSessionId;
    splitEvent?: ChangeStreamSplitEvent;
    txnNumber?: number;
}

Hierarchy (view full)

Properties

_id: unknown

The id functions as an opaque token for use when resuming an interrupted +change stream.

+
clusterTime?: Timestamp

The timestamp from the oplog entry associated with the event. +For events that happened as part of a multi-document transaction, the associated change stream +notifications will have the same clusterTime value, namely the time when the transaction was committed. +On a sharded cluster, events that occur on different shards can have the same clusterTime but be +associated with different transactions or even not be associated with any transaction. +To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

+

The identifier for the session associated with the transaction. +Only present if the operation is part of a multi-document transaction.

+

When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +stage, events larger than 16MB will be split into multiple events and contain the +following information about which fragment the current event is.

+
txnNumber?: number

The transaction number. +Only present if the operation is part of a multi-document transaction.

+

NOTE: txnNumber can be a Long if promoteLongs is set to false

+
diff --git a/docs/6.9/interfaces/ChangeStreamDocumentKey.html b/docs/6.9/interfaces/ChangeStreamDocumentKey.html new file mode 100644 index 0000000000..51554535a5 --- /dev/null +++ b/docs/6.9/interfaces/ChangeStreamDocumentKey.html @@ -0,0 +1,4 @@ +ChangeStreamDocumentKey | mongodb

Interface ChangeStreamDocumentKey<TSchema>

interface ChangeStreamDocumentKey<TSchema> {
    documentKey: {
        _id: InferIdType<TSchema>;
        [shardKey: string]: any;
    };
}

Type Parameters

Hierarchy (view full)

Properties

Properties

documentKey: {
    _id: InferIdType<TSchema>;
    [shardKey: string]: any;
}

For unsharded collections this contains a single field _id. +For sharded collections, this will contain all the components of the shard key

+
diff --git a/docs/6.9/interfaces/ChangeStreamDocumentOperationDescription.html b/docs/6.9/interfaces/ChangeStreamDocumentOperationDescription.html new file mode 100644 index 0000000000..d92da8fcd2 --- /dev/null +++ b/docs/6.9/interfaces/ChangeStreamDocumentOperationDescription.html @@ -0,0 +1,5 @@ +ChangeStreamDocumentOperationDescription | mongodb

Interface ChangeStreamDocumentOperationDescription

interface ChangeStreamDocumentOperationDescription {
    operationDescription?: Document;
}

Hierarchy (view full)

Properties

operationDescription?: Document

An description of the operation.

+

Only present when the showExpandedEvents flag is enabled.

+

6.1.0

+
diff --git a/docs/6.9/interfaces/ChangeStreamDropDatabaseDocument.html b/docs/6.9/interfaces/ChangeStreamDropDatabaseDocument.html new file mode 100644 index 0000000000..e87d74b7b2 --- /dev/null +++ b/docs/6.9/interfaces/ChangeStreamDropDatabaseDocument.html @@ -0,0 +1,27 @@ +ChangeStreamDropDatabaseDocument | mongodb

Interface ChangeStreamDropDatabaseDocument

interface ChangeStreamDropDatabaseDocument {
    _id: unknown;
    clusterTime?: Timestamp;
    lsid?: ServerSessionId;
    ns: {
        db: string;
    };
    operationType: "dropDatabase";
    splitEvent?: ChangeStreamSplitEvent;
    txnNumber?: number;
}

Hierarchy (view full)

Properties

_id: unknown

The id functions as an opaque token for use when resuming an interrupted +change stream.

+
clusterTime?: Timestamp

The timestamp from the oplog entry associated with the event. +For events that happened as part of a multi-document transaction, the associated change stream +notifications will have the same clusterTime value, namely the time when the transaction was committed. +On a sharded cluster, events that occur on different shards can have the same clusterTime but be +associated with different transactions or even not be associated with any transaction. +To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

+

The identifier for the session associated with the transaction. +Only present if the operation is part of a multi-document transaction.

+
ns: {
    db: string;
}

The database dropped

+
operationType: "dropDatabase"

Describes the type of operation represented in this change notification

+

When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +stage, events larger than 16MB will be split into multiple events and contain the +following information about which fragment the current event is.

+
txnNumber?: number

The transaction number. +Only present if the operation is part of a multi-document transaction.

+

NOTE: txnNumber can be a Long if promoteLongs is set to false

+
diff --git a/docs/6.9/interfaces/ChangeStreamDropDocument.html b/docs/6.9/interfaces/ChangeStreamDropDocument.html new file mode 100644 index 0000000000..3f481af25b --- /dev/null +++ b/docs/6.9/interfaces/ChangeStreamDropDocument.html @@ -0,0 +1,33 @@ +ChangeStreamDropDocument | mongodb

Interface ChangeStreamDropDocument

interface ChangeStreamDropDocument {
    _id: unknown;
    clusterTime?: Timestamp;
    collectionUUID: Binary;
    lsid?: ServerSessionId;
    ns: ChangeStreamNameSpace;
    operationType: "drop";
    splitEvent?: ChangeStreamSplitEvent;
    txnNumber?: number;
}

Hierarchy (view full)

Properties

_id: unknown

The id functions as an opaque token for use when resuming an interrupted +change stream.

+
clusterTime?: Timestamp

The timestamp from the oplog entry associated with the event. +For events that happened as part of a multi-document transaction, the associated change stream +notifications will have the same clusterTime value, namely the time when the transaction was committed. +On a sharded cluster, events that occur on different shards can have the same clusterTime but be +associated with different transactions or even not be associated with any transaction. +To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

+
collectionUUID: Binary

The UUID (Binary subtype 4) of the collection that the operation was performed on.

+

Only present when the showExpandedEvents flag is enabled.

+

NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers +flag is enabled.

+

6.1.0

+

The identifier for the session associated with the transaction. +Only present if the operation is part of a multi-document transaction.

+

Namespace the drop event occurred on

+
operationType: "drop"

Describes the type of operation represented in this change notification

+

When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +stage, events larger than 16MB will be split into multiple events and contain the +following information about which fragment the current event is.

+
txnNumber?: number

The transaction number. +Only present if the operation is part of a multi-document transaction.

+

NOTE: txnNumber can be a Long if promoteLongs is set to false

+
diff --git a/docs/6.9/interfaces/ChangeStreamDropIndexDocument.html b/docs/6.9/interfaces/ChangeStreamDropIndexDocument.html new file mode 100644 index 0000000000..3b21654b31 --- /dev/null +++ b/docs/6.9/interfaces/ChangeStreamDropIndexDocument.html @@ -0,0 +1,36 @@ +ChangeStreamDropIndexDocument | mongodb

Interface ChangeStreamDropIndexDocument

Only present when the showExpandedEvents flag is enabled.

+
interface ChangeStreamDropIndexDocument {
    _id: unknown;
    clusterTime?: Timestamp;
    collectionUUID: Binary;
    lsid?: ServerSessionId;
    operationDescription?: Document;
    operationType: "dropIndexes";
    splitEvent?: ChangeStreamSplitEvent;
    txnNumber?: number;
}

Hierarchy (view full)

Properties

_id: unknown

The id functions as an opaque token for use when resuming an interrupted +change stream.

+
clusterTime?: Timestamp

The timestamp from the oplog entry associated with the event. +For events that happened as part of a multi-document transaction, the associated change stream +notifications will have the same clusterTime value, namely the time when the transaction was committed. +On a sharded cluster, events that occur on different shards can have the same clusterTime but be +associated with different transactions or even not be associated with any transaction. +To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

+
collectionUUID: Binary

The UUID (Binary subtype 4) of the collection that the operation was performed on.

+

Only present when the showExpandedEvents flag is enabled.

+

NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers +flag is enabled.

+

6.1.0

+

The identifier for the session associated with the transaction. +Only present if the operation is part of a multi-document transaction.

+
operationDescription?: Document

An description of the operation.

+

Only present when the showExpandedEvents flag is enabled.

+

6.1.0

+
operationType: "dropIndexes"

Describes the type of operation represented in this change notification

+

When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +stage, events larger than 16MB will be split into multiple events and contain the +following information about which fragment the current event is.

+
txnNumber?: number

The transaction number. +Only present if the operation is part of a multi-document transaction.

+

NOTE: txnNumber can be a Long if promoteLongs is set to false

+
diff --git a/docs/6.9/interfaces/ChangeStreamInsertDocument.html b/docs/6.9/interfaces/ChangeStreamInsertDocument.html new file mode 100644 index 0000000000..57507d73d0 --- /dev/null +++ b/docs/6.9/interfaces/ChangeStreamInsertDocument.html @@ -0,0 +1,38 @@ +ChangeStreamInsertDocument | mongodb

Interface ChangeStreamInsertDocument<TSchema>

interface ChangeStreamInsertDocument<TSchema> {
    _id: unknown;
    clusterTime?: Timestamp;
    collectionUUID: Binary;
    documentKey: {
        _id: InferIdType<TSchema>;
        [shardKey: string]: any;
    };
    fullDocument: TSchema;
    lsid?: ServerSessionId;
    ns: ChangeStreamNameSpace;
    operationType: "insert";
    splitEvent?: ChangeStreamSplitEvent;
    txnNumber?: number;
}

Type Parameters

Hierarchy (view full)

Properties

_id: unknown

The id functions as an opaque token for use when resuming an interrupted +change stream.

+
clusterTime?: Timestamp

The timestamp from the oplog entry associated with the event. +For events that happened as part of a multi-document transaction, the associated change stream +notifications will have the same clusterTime value, namely the time when the transaction was committed. +On a sharded cluster, events that occur on different shards can have the same clusterTime but be +associated with different transactions or even not be associated with any transaction. +To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

+
collectionUUID: Binary

The UUID (Binary subtype 4) of the collection that the operation was performed on.

+

Only present when the showExpandedEvents flag is enabled.

+

NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers +flag is enabled.

+

6.1.0

+
documentKey: {
    _id: InferIdType<TSchema>;
    [shardKey: string]: any;
}

For unsharded collections this contains a single field _id. +For sharded collections, this will contain all the components of the shard key

+
fullDocument: TSchema

This key will contain the document being inserted

+

The identifier for the session associated with the transaction. +Only present if the operation is part of a multi-document transaction.

+

Namespace the insert event occurred on

+
operationType: "insert"

Describes the type of operation represented in this change notification

+

When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +stage, events larger than 16MB will be split into multiple events and contain the +following information about which fragment the current event is.

+
txnNumber?: number

The transaction number. +Only present if the operation is part of a multi-document transaction.

+

NOTE: txnNumber can be a Long if promoteLongs is set to false

+
diff --git a/docs/6.9/interfaces/ChangeStreamInvalidateDocument.html b/docs/6.9/interfaces/ChangeStreamInvalidateDocument.html new file mode 100644 index 0000000000..02bde143c4 --- /dev/null +++ b/docs/6.9/interfaces/ChangeStreamInvalidateDocument.html @@ -0,0 +1,25 @@ +ChangeStreamInvalidateDocument | mongodb

Interface ChangeStreamInvalidateDocument

interface ChangeStreamInvalidateDocument {
    _id: unknown;
    clusterTime?: Timestamp;
    lsid?: ServerSessionId;
    operationType: "invalidate";
    splitEvent?: ChangeStreamSplitEvent;
    txnNumber?: number;
}

Hierarchy (view full)

Properties

_id: unknown

The id functions as an opaque token for use when resuming an interrupted +change stream.

+
clusterTime?: Timestamp

The timestamp from the oplog entry associated with the event. +For events that happened as part of a multi-document transaction, the associated change stream +notifications will have the same clusterTime value, namely the time when the transaction was committed. +On a sharded cluster, events that occur on different shards can have the same clusterTime but be +associated with different transactions or even not be associated with any transaction. +To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

+

The identifier for the session associated with the transaction. +Only present if the operation is part of a multi-document transaction.

+
operationType: "invalidate"

Describes the type of operation represented in this change notification

+

When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +stage, events larger than 16MB will be split into multiple events and contain the +following information about which fragment the current event is.

+
txnNumber?: number

The transaction number. +Only present if the operation is part of a multi-document transaction.

+

NOTE: txnNumber can be a Long if promoteLongs is set to false

+
diff --git a/docs/6.9/interfaces/ChangeStreamNameSpace.html b/docs/6.9/interfaces/ChangeStreamNameSpace.html new file mode 100644 index 0000000000..d15ceca299 --- /dev/null +++ b/docs/6.9/interfaces/ChangeStreamNameSpace.html @@ -0,0 +1,3 @@ +ChangeStreamNameSpace | mongodb

Interface ChangeStreamNameSpace

interface ChangeStreamNameSpace {
    coll: string;
    db: string;
}

Properties

coll +db +

Properties

coll: string
db: string
diff --git a/docs/6.9/interfaces/ChangeStreamOptions.html b/docs/6.9/interfaces/ChangeStreamOptions.html new file mode 100644 index 0000000000..d11bba4d96 --- /dev/null +++ b/docs/6.9/interfaces/ChangeStreamOptions.html @@ -0,0 +1,122 @@ +ChangeStreamOptions | mongodb

Interface ChangeStreamOptions

Options that can be passed to a ChangeStream. Note that startAfter, resumeAfter, and startAtOperationTime are all mutually exclusive, and the server will error if more than one is specified.

+
interface ChangeStreamOptions {
    allowDiskUse?: boolean;
    authdb?: string;
    batchSize?: number;
    bsonRegExp?: boolean;
    bypassDocumentValidation?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    cursor?: Document;
    dbName?: string;
    enableUtf8Validation?: boolean;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    fullDocument?: string;
    fullDocumentBeforeChange?: string;
    hint?: Hint;
    ignoreUndefined?: boolean;
    let?: Document;
    maxAwaitTimeMS?: number;
    maxTimeMS?: number;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    out?: string;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    resumeAfter?: unknown;
    retryWrites?: boolean;
    serializeFunctions?: boolean;
    session?: ClientSession;
    showExpandedEvents?: boolean;
    startAfter?: unknown;
    startAtOperationTime?: Timestamp;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
}

Hierarchy

Properties

allowDiskUse?: boolean

allowDiskUse lets the server know if it can use disk to store temporary results for the aggregation (requires mongodb 2.6 >).

+
authdb?: string
batchSize?: number

The number of documents to return per batch.

+
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
bypassDocumentValidation?: boolean

Allow driver to bypass schema validation.

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Specify collation.

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
cursor?: Document

Return the query as cursor, on 2.6 > it returns as a real cursor on pre 2.6 it returns as an emulated cursor.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
fullDocument?: string

Allowed values: 'updateLookup', 'whenAvailable', 'required'.

+

When set to 'updateLookup', the change notification for partial updates +will include both a delta describing the changes to the document as well +as a copy of the entire document that was changed from some time after +the change occurred.

+

When set to 'whenAvailable', configures the change stream to return the +post-image of the modified document for replace and update change events +if the post-image for this event is available.

+

When set to 'required', the same behavior as 'whenAvailable' except that +an error is raised if the post-image is not available.

+
fullDocumentBeforeChange?: string

Allowed values: 'whenAvailable', 'required', 'off'.

+

The default is to not send a value, which is equivalent to 'off'.

+

When set to 'whenAvailable', configures the change stream to return the +pre-image of the modified document for replace, update, and delete change +events if it is available.

+

When set to 'required', the same behavior as 'whenAvailable' except that +an error is raised if the pre-image is not available.

+
hint?: Hint

Add an index selection hint to an aggregation command

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
let?: Document

Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

+
maxAwaitTimeMS?: number

The maximum amount of time for the server to wait on new documents to satisfy a change stream query.

+
maxTimeMS?: number

specifies a cumulative time limit in milliseconds for processing operations on the cursor. MongoDB interrupts the operation at the earliest following interrupt point.

+
noResponse?: boolean
omitReadPreference?: boolean
out?: string
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
resumeAfter?: unknown

Allows you to start a changeStream after a specified event.

+
retryWrites?: boolean

Should retry failed writes

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
showExpandedEvents?: boolean

When enabled, configures the change stream to include extra change events.

+
    +
  • createIndexes
  • +
  • dropIndexes
  • +
  • modify
  • +
  • create
  • +
  • shardCollection
  • +
  • reshardCollection
  • +
  • refineCollectionShardKey
  • +
+
startAfter?: unknown

Similar to resumeAfter, but will allow you to start after an invalidated event.

+
startAtOperationTime?: Timestamp

Will start the changeStream after the specified operationTime.

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean
diff --git a/docs/6.9/interfaces/ChangeStreamRefineCollectionShardKeyDocument.html b/docs/6.9/interfaces/ChangeStreamRefineCollectionShardKeyDocument.html new file mode 100644 index 0000000000..9ef68c6e38 --- /dev/null +++ b/docs/6.9/interfaces/ChangeStreamRefineCollectionShardKeyDocument.html @@ -0,0 +1,35 @@ +ChangeStreamRefineCollectionShardKeyDocument | mongodb

Interface ChangeStreamRefineCollectionShardKeyDocument

interface ChangeStreamRefineCollectionShardKeyDocument {
    _id: unknown;
    clusterTime?: Timestamp;
    collectionUUID: Binary;
    lsid?: ServerSessionId;
    operationDescription?: Document;
    operationType: "refineCollectionShardKey";
    splitEvent?: ChangeStreamSplitEvent;
    txnNumber?: number;
}

Hierarchy (view full)

Properties

_id: unknown

The id functions as an opaque token for use when resuming an interrupted +change stream.

+
clusterTime?: Timestamp

The timestamp from the oplog entry associated with the event. +For events that happened as part of a multi-document transaction, the associated change stream +notifications will have the same clusterTime value, namely the time when the transaction was committed. +On a sharded cluster, events that occur on different shards can have the same clusterTime but be +associated with different transactions or even not be associated with any transaction. +To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

+
collectionUUID: Binary

The UUID (Binary subtype 4) of the collection that the operation was performed on.

+

Only present when the showExpandedEvents flag is enabled.

+

NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers +flag is enabled.

+

6.1.0

+

The identifier for the session associated with the transaction. +Only present if the operation is part of a multi-document transaction.

+
operationDescription?: Document

An description of the operation.

+

Only present when the showExpandedEvents flag is enabled.

+

6.1.0

+
operationType: "refineCollectionShardKey"

Describes the type of operation represented in this change notification

+

When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +stage, events larger than 16MB will be split into multiple events and contain the +following information about which fragment the current event is.

+
txnNumber?: number

The transaction number. +Only present if the operation is part of a multi-document transaction.

+

NOTE: txnNumber can be a Long if promoteLongs is set to false

+
diff --git a/docs/6.9/interfaces/ChangeStreamRenameDocument.html b/docs/6.9/interfaces/ChangeStreamRenameDocument.html new file mode 100644 index 0000000000..2cfc6baea2 --- /dev/null +++ b/docs/6.9/interfaces/ChangeStreamRenameDocument.html @@ -0,0 +1,35 @@ +ChangeStreamRenameDocument | mongodb

Interface ChangeStreamRenameDocument

interface ChangeStreamRenameDocument {
    _id: unknown;
    clusterTime?: Timestamp;
    collectionUUID: Binary;
    lsid?: ServerSessionId;
    ns: ChangeStreamNameSpace;
    operationType: "rename";
    splitEvent?: ChangeStreamSplitEvent;
    to: {
        coll: string;
        db: string;
    };
    txnNumber?: number;
}

Hierarchy (view full)

Properties

_id: unknown

The id functions as an opaque token for use when resuming an interrupted +change stream.

+
clusterTime?: Timestamp

The timestamp from the oplog entry associated with the event. +For events that happened as part of a multi-document transaction, the associated change stream +notifications will have the same clusterTime value, namely the time when the transaction was committed. +On a sharded cluster, events that occur on different shards can have the same clusterTime but be +associated with different transactions or even not be associated with any transaction. +To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

+
collectionUUID: Binary

The UUID (Binary subtype 4) of the collection that the operation was performed on.

+

Only present when the showExpandedEvents flag is enabled.

+

NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers +flag is enabled.

+

6.1.0

+

The identifier for the session associated with the transaction. +Only present if the operation is part of a multi-document transaction.

+

The "from" namespace that the rename occurred on

+
operationType: "rename"

Describes the type of operation represented in this change notification

+

When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +stage, events larger than 16MB will be split into multiple events and contain the +following information about which fragment the current event is.

+
to: {
    coll: string;
    db: string;
}

The new name for the ns.coll collection

+
txnNumber?: number

The transaction number. +Only present if the operation is part of a multi-document transaction.

+

NOTE: txnNumber can be a Long if promoteLongs is set to false

+
diff --git a/docs/6.9/interfaces/ChangeStreamReplaceDocument.html b/docs/6.9/interfaces/ChangeStreamReplaceDocument.html new file mode 100644 index 0000000000..e47dce951f --- /dev/null +++ b/docs/6.9/interfaces/ChangeStreamReplaceDocument.html @@ -0,0 +1,38 @@ +ChangeStreamReplaceDocument | mongodb

Interface ChangeStreamReplaceDocument<TSchema>

interface ChangeStreamReplaceDocument<TSchema> {
    _id: unknown;
    clusterTime?: Timestamp;
    documentKey: {
        _id: InferIdType<TSchema>;
        [shardKey: string]: any;
    };
    fullDocument: TSchema;
    fullDocumentBeforeChange?: TSchema;
    lsid?: ServerSessionId;
    ns: ChangeStreamNameSpace;
    operationType: "replace";
    splitEvent?: ChangeStreamSplitEvent;
    txnNumber?: number;
}

Type Parameters

Hierarchy (view full)

Properties

_id: unknown

The id functions as an opaque token for use when resuming an interrupted +change stream.

+
clusterTime?: Timestamp

The timestamp from the oplog entry associated with the event. +For events that happened as part of a multi-document transaction, the associated change stream +notifications will have the same clusterTime value, namely the time when the transaction was committed. +On a sharded cluster, events that occur on different shards can have the same clusterTime but be +associated with different transactions or even not be associated with any transaction. +To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

+
documentKey: {
    _id: InferIdType<TSchema>;
    [shardKey: string]: any;
}

For unsharded collections this contains a single field _id. +For sharded collections, this will contain all the components of the shard key

+
fullDocument: TSchema

The fullDocument of a replace event represents the document after the insert of the replacement document

+
fullDocumentBeforeChange?: TSchema

Contains the pre-image of the modified or deleted document if the +pre-image is available for the change event and either 'required' or +'whenAvailable' was specified for the 'fullDocumentBeforeChange' option +when creating the change stream. If 'whenAvailable' was specified but the +pre-image is unavailable, this will be explicitly set to null.

+

The identifier for the session associated with the transaction. +Only present if the operation is part of a multi-document transaction.

+

Namespace the replace event occurred on

+
operationType: "replace"

Describes the type of operation represented in this change notification

+

When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +stage, events larger than 16MB will be split into multiple events and contain the +following information about which fragment the current event is.

+
txnNumber?: number

The transaction number. +Only present if the operation is part of a multi-document transaction.

+

NOTE: txnNumber can be a Long if promoteLongs is set to false

+
diff --git a/docs/6.9/interfaces/ChangeStreamReshardCollectionDocument.html b/docs/6.9/interfaces/ChangeStreamReshardCollectionDocument.html new file mode 100644 index 0000000000..8895effc96 --- /dev/null +++ b/docs/6.9/interfaces/ChangeStreamReshardCollectionDocument.html @@ -0,0 +1,35 @@ +ChangeStreamReshardCollectionDocument | mongodb

Interface ChangeStreamReshardCollectionDocument

interface ChangeStreamReshardCollectionDocument {
    _id: unknown;
    clusterTime?: Timestamp;
    collectionUUID: Binary;
    lsid?: ServerSessionId;
    operationDescription?: Document;
    operationType: "reshardCollection";
    splitEvent?: ChangeStreamSplitEvent;
    txnNumber?: number;
}

Hierarchy (view full)

Properties

_id: unknown

The id functions as an opaque token for use when resuming an interrupted +change stream.

+
clusterTime?: Timestamp

The timestamp from the oplog entry associated with the event. +For events that happened as part of a multi-document transaction, the associated change stream +notifications will have the same clusterTime value, namely the time when the transaction was committed. +On a sharded cluster, events that occur on different shards can have the same clusterTime but be +associated with different transactions or even not be associated with any transaction. +To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

+
collectionUUID: Binary

The UUID (Binary subtype 4) of the collection that the operation was performed on.

+

Only present when the showExpandedEvents flag is enabled.

+

NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers +flag is enabled.

+

6.1.0

+

The identifier for the session associated with the transaction. +Only present if the operation is part of a multi-document transaction.

+
operationDescription?: Document

An description of the operation.

+

Only present when the showExpandedEvents flag is enabled.

+

6.1.0

+
operationType: "reshardCollection"

Describes the type of operation represented in this change notification

+

When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +stage, events larger than 16MB will be split into multiple events and contain the +following information about which fragment the current event is.

+
txnNumber?: number

The transaction number. +Only present if the operation is part of a multi-document transaction.

+

NOTE: txnNumber can be a Long if promoteLongs is set to false

+
diff --git a/docs/6.9/interfaces/ChangeStreamShardCollectionDocument.html b/docs/6.9/interfaces/ChangeStreamShardCollectionDocument.html new file mode 100644 index 0000000000..e63d1f6e47 --- /dev/null +++ b/docs/6.9/interfaces/ChangeStreamShardCollectionDocument.html @@ -0,0 +1,35 @@ +ChangeStreamShardCollectionDocument | mongodb

Interface ChangeStreamShardCollectionDocument

interface ChangeStreamShardCollectionDocument {
    _id: unknown;
    clusterTime?: Timestamp;
    collectionUUID: Binary;
    lsid?: ServerSessionId;
    operationDescription?: Document;
    operationType: "shardCollection";
    splitEvent?: ChangeStreamSplitEvent;
    txnNumber?: number;
}

Hierarchy (view full)

Properties

_id: unknown

The id functions as an opaque token for use when resuming an interrupted +change stream.

+
clusterTime?: Timestamp

The timestamp from the oplog entry associated with the event. +For events that happened as part of a multi-document transaction, the associated change stream +notifications will have the same clusterTime value, namely the time when the transaction was committed. +On a sharded cluster, events that occur on different shards can have the same clusterTime but be +associated with different transactions or even not be associated with any transaction. +To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

+
collectionUUID: Binary

The UUID (Binary subtype 4) of the collection that the operation was performed on.

+

Only present when the showExpandedEvents flag is enabled.

+

NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers +flag is enabled.

+

6.1.0

+

The identifier for the session associated with the transaction. +Only present if the operation is part of a multi-document transaction.

+
operationDescription?: Document

An description of the operation.

+

Only present when the showExpandedEvents flag is enabled.

+

6.1.0

+
operationType: "shardCollection"

Describes the type of operation represented in this change notification

+

When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +stage, events larger than 16MB will be split into multiple events and contain the +following information about which fragment the current event is.

+
txnNumber?: number

The transaction number. +Only present if the operation is part of a multi-document transaction.

+

NOTE: txnNumber can be a Long if promoteLongs is set to false

+
diff --git a/docs/6.9/interfaces/ChangeStreamSplitEvent.html b/docs/6.9/interfaces/ChangeStreamSplitEvent.html new file mode 100644 index 0000000000..2fad6ba7c1 --- /dev/null +++ b/docs/6.9/interfaces/ChangeStreamSplitEvent.html @@ -0,0 +1,5 @@ +ChangeStreamSplitEvent | mongodb

Interface ChangeStreamSplitEvent

interface ChangeStreamSplitEvent {
    fragment: number;
    of: number;
}

Properties

Properties

fragment: number

Which fragment of the change this is.

+
of: number

The total number of fragments.

+
diff --git a/docs/6.9/interfaces/ChangeStreamUpdateDocument.html b/docs/6.9/interfaces/ChangeStreamUpdateDocument.html new file mode 100644 index 0000000000..12cf308a7a --- /dev/null +++ b/docs/6.9/interfaces/ChangeStreamUpdateDocument.html @@ -0,0 +1,49 @@ +ChangeStreamUpdateDocument | mongodb

Interface ChangeStreamUpdateDocument<TSchema>

interface ChangeStreamUpdateDocument<TSchema> {
    _id: unknown;
    clusterTime?: Timestamp;
    collectionUUID: Binary;
    documentKey: {
        _id: InferIdType<TSchema>;
        [shardKey: string]: any;
    };
    fullDocument?: TSchema;
    fullDocumentBeforeChange?: TSchema;
    lsid?: ServerSessionId;
    ns: ChangeStreamNameSpace;
    operationType: "update";
    splitEvent?: ChangeStreamSplitEvent;
    txnNumber?: number;
    updateDescription: UpdateDescription<TSchema>;
}

Type Parameters

Hierarchy (view full)

Properties

_id: unknown

The id functions as an opaque token for use when resuming an interrupted +change stream.

+
clusterTime?: Timestamp

The timestamp from the oplog entry associated with the event. +For events that happened as part of a multi-document transaction, the associated change stream +notifications will have the same clusterTime value, namely the time when the transaction was committed. +On a sharded cluster, events that occur on different shards can have the same clusterTime but be +associated with different transactions or even not be associated with any transaction. +To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

+
collectionUUID: Binary

The UUID (Binary subtype 4) of the collection that the operation was performed on.

+

Only present when the showExpandedEvents flag is enabled.

+

NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers +flag is enabled.

+

6.1.0

+
documentKey: {
    _id: InferIdType<TSchema>;
    [shardKey: string]: any;
}

For unsharded collections this contains a single field _id. +For sharded collections, this will contain all the components of the shard key

+
fullDocument?: TSchema

This is only set if fullDocument is set to 'updateLookup' +Contains the point-in-time post-image of the modified document if the +post-image is available and either 'required' or 'whenAvailable' was +specified for the 'fullDocument' option when creating the change stream.

+
fullDocumentBeforeChange?: TSchema

Contains the pre-image of the modified or deleted document if the +pre-image is available for the change event and either 'required' or +'whenAvailable' was specified for the 'fullDocumentBeforeChange' option +when creating the change stream. If 'whenAvailable' was specified but the +pre-image is unavailable, this will be explicitly set to null.

+

The identifier for the session associated with the transaction. +Only present if the operation is part of a multi-document transaction.

+

Namespace the update event occurred on

+
operationType: "update"

Describes the type of operation represented in this change notification

+

When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +stage, events larger than 16MB will be split into multiple events and contain the +following information about which fragment the current event is.

+
txnNumber?: number

The transaction number. +Only present if the operation is part of a multi-document transaction.

+

NOTE: txnNumber can be a Long if promoteLongs is set to false

+
updateDescription: UpdateDescription<TSchema>

Contains a description of updated and removed fields in this operation

+
diff --git a/docs/6.9/interfaces/ClientEncryptionCreateDataKeyProviderOptions.html b/docs/6.9/interfaces/ClientEncryptionCreateDataKeyProviderOptions.html new file mode 100644 index 0000000000..1799b6dac5 --- /dev/null +++ b/docs/6.9/interfaces/ClientEncryptionCreateDataKeyProviderOptions.html @@ -0,0 +1,8 @@ +ClientEncryptionCreateDataKeyProviderOptions | mongodb

Interface ClientEncryptionCreateDataKeyProviderOptions

Options to provide when creating a new data key.

+
interface ClientEncryptionCreateDataKeyProviderOptions {
    keyAltNames?: string[];
    keyMaterial?: Binary | Buffer;
    masterKey?:
        | AWSEncryptionKeyOptions
        | AzureEncryptionKeyOptions
        | GCPEncryptionKeyOptions
        | KMIPEncryptionKeyOptions;
}

Properties

keyAltNames?: string[]

An optional list of string alternate names used to reference a key. +If a key is created with alternate names, then encryption may refer to the key by the unique alternate name instead of by _id.

+
keyMaterial?: Binary | Buffer

Identifies a new KMS-specific key used to encrypt the new data key

+
diff --git a/docs/6.9/interfaces/ClientEncryptionEncryptOptions.html b/docs/6.9/interfaces/ClientEncryptionEncryptOptions.html new file mode 100644 index 0000000000..6782b165d3 --- /dev/null +++ b/docs/6.9/interfaces/ClientEncryptionEncryptOptions.html @@ -0,0 +1,14 @@ +ClientEncryptionEncryptOptions | mongodb

Interface ClientEncryptionEncryptOptions

Options to provide when encrypting data.

+
interface ClientEncryptionEncryptOptions {
    algorithm:
        | "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
        | "AEAD_AES_256_CBC_HMAC_SHA_512-Random"
        | "Indexed"
        | "Unindexed"
        | "Range";
    contentionFactor?: number | bigint;
    keyAltName?: string;
    keyId?: Binary;
    queryType?: "equality" | "range";
    rangeOptions?: RangeOptions;
}

Properties

algorithm:
    | "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
    | "AEAD_AES_256_CBC_HMAC_SHA_512-Random"
    | "Indexed"
    | "Unindexed"
    | "Range"

The algorithm to use for encryption.

+
contentionFactor?: number | bigint

The contention factor.

+
keyAltName?: string

A unique string name corresponding to an already existing dataKey.

+
keyId?: Binary

The id of the Binary dataKey to use for encryption

+
queryType?: "equality" | "range"

The query type.

+
rangeOptions?: RangeOptions

The index options for a Queryable Encryption field supporting "range" queries.

+
diff --git a/docs/6.9/interfaces/ClientEncryptionOptions.html b/docs/6.9/interfaces/ClientEncryptionOptions.html new file mode 100644 index 0000000000..41f084b368 --- /dev/null +++ b/docs/6.9/interfaces/ClientEncryptionOptions.html @@ -0,0 +1,12 @@ +ClientEncryptionOptions | mongodb

Interface ClientEncryptionOptions

Additional settings to provide when creating a new ClientEncryption instance.

+
interface ClientEncryptionOptions {
    keyVaultClient?: MongoClient;
    keyVaultNamespace: string;
    kmsProviders?: KMSProviders;
    proxyOptions?: ProxyOptions;
    tlsOptions?: CSFLEKMSTlsOptions;
}

Properties

keyVaultClient?: MongoClient

A MongoClient used to fetch keys from a key vault. Defaults to client.

+
keyVaultNamespace: string

The namespace of the key vault, used to store encryption keys

+
kmsProviders?: KMSProviders

Options for specific KMS providers to use

+
proxyOptions?: ProxyOptions

Options for specifying a Socks5 proxy to use for connecting to the KMS.

+
tlsOptions?: CSFLEKMSTlsOptions

TLS options for kms providers to use.

+
diff --git a/docs/6.9/interfaces/ClientEncryptionRewrapManyDataKeyProviderOptions.html b/docs/6.9/interfaces/ClientEncryptionRewrapManyDataKeyProviderOptions.html new file mode 100644 index 0000000000..7e6b636d8a --- /dev/null +++ b/docs/6.9/interfaces/ClientEncryptionRewrapManyDataKeyProviderOptions.html @@ -0,0 +1,3 @@ +ClientEncryptionRewrapManyDataKeyProviderOptions | mongodb

Interface ClientEncryptionRewrapManyDataKeyProviderOptionsExperimental

interface ClientEncryptionRewrapManyDataKeyProviderOptions {
    masterKey?:
        | AWSEncryptionKeyOptions
        | AzureEncryptionKeyOptions
        | GCPEncryptionKeyOptions
        | KMIPEncryptionKeyOptions;
    provider: keyof KMSProviders;
}

Properties

Properties

provider: keyof KMSProviders
diff --git a/docs/6.9/interfaces/ClientEncryptionRewrapManyDataKeyResult.html b/docs/6.9/interfaces/ClientEncryptionRewrapManyDataKeyResult.html new file mode 100644 index 0000000000..53102febf1 --- /dev/null +++ b/docs/6.9/interfaces/ClientEncryptionRewrapManyDataKeyResult.html @@ -0,0 +1,3 @@ +ClientEncryptionRewrapManyDataKeyResult | mongodb

Interface ClientEncryptionRewrapManyDataKeyResultExperimental

interface ClientEncryptionRewrapManyDataKeyResult {
    bulkWriteResult?: BulkWriteResult;
}

Properties

Properties

bulkWriteResult?: BulkWriteResult

The result of rewrapping data keys. If unset, no keys matched the filter.

+
diff --git a/docs/6.9/interfaces/ClientMetadata.html b/docs/6.9/interfaces/ClientMetadata.html new file mode 100644 index 0000000000..32b3a880ac --- /dev/null +++ b/docs/6.9/interfaces/ClientMetadata.html @@ -0,0 +1,8 @@ +ClientMetadata | mongodb

Interface ClientMetadata

interface ClientMetadata {
    application?: {
        name: string;
    };
    driver: {
        name: string;
        version: string;
    };
    env?: {
        memory_mb?: Int32;
        name:
            | "aws.lambda"
            | "gcp.func"
            | "azure.func"
            | "vercel";
        region?: string;
        timeout_sec?: Int32;
        url?: string;
    };
    os: {
        architecture?: string;
        name?: Platform;
        type: string;
        version?: string;
    };
    platform: string;
}

Properties

application?: {
    name: string;
}
driver: {
    name: string;
    version: string;
}
env?: {
    memory_mb?: Int32;
    name:
        | "aws.lambda"
        | "gcp.func"
        | "azure.func"
        | "vercel";
    region?: string;
    timeout_sec?: Int32;
    url?: string;
}

FaaS environment information

+
os: {
    architecture?: string;
    name?: Platform;
    type: string;
    version?: string;
}
platform: string
diff --git a/docs/6.9/interfaces/ClientMetadataOptions.html b/docs/6.9/interfaces/ClientMetadataOptions.html new file mode 100644 index 0000000000..bbd17085bb --- /dev/null +++ b/docs/6.9/interfaces/ClientMetadataOptions.html @@ -0,0 +1,3 @@ +ClientMetadataOptions | mongodb

Interface ClientMetadataOptions

interface ClientMetadataOptions {
    appName?: string;
    driverInfo?: {
        name?: string;
        platform?: string;
        version?: string;
    };
}

Properties

Properties

appName?: string
driverInfo?: {
    name?: string;
    platform?: string;
    version?: string;
}
diff --git a/docs/6.9/interfaces/ClientSessionOptions.html b/docs/6.9/interfaces/ClientSessionOptions.html new file mode 100644 index 0000000000..24e45a6b34 --- /dev/null +++ b/docs/6.9/interfaces/ClientSessionOptions.html @@ -0,0 +1,7 @@ +ClientSessionOptions | mongodb

Interface ClientSessionOptions

interface ClientSessionOptions {
    causalConsistency?: boolean;
    defaultTransactionOptions?: TransactionOptions;
    snapshot?: boolean;
}

Properties

causalConsistency?: boolean

Whether causal consistency should be enabled on this session

+
defaultTransactionOptions?: TransactionOptions

The default TransactionOptions to use for transactions started on this session.

+
snapshot?: boolean

Whether all read operations should be read from the same snapshot for this session (NOTE: not compatible with causalConsistency=true)

+
diff --git a/docs/6.9/interfaces/CloseOptions.html b/docs/6.9/interfaces/CloseOptions.html new file mode 100644 index 0000000000..a04bcd71fb --- /dev/null +++ b/docs/6.9/interfaces/CloseOptions.html @@ -0,0 +1,4 @@ +CloseOptions | mongodb

Interface CloseOptions

This interface is deprecated and will be removed in a future release as it is not used +in the driver

+
interface CloseOptions {
    force?: boolean;
}

Properties

Properties

force?: boolean
diff --git a/docs/6.9/interfaces/ClusterTime.html b/docs/6.9/interfaces/ClusterTime.html new file mode 100644 index 0000000000..b70b1bacb1 --- /dev/null +++ b/docs/6.9/interfaces/ClusterTime.html @@ -0,0 +1,7 @@ +ClusterTime | mongodb

Interface ClusterTime

Gossiped in component for the cluster time tracking the state of user databases +across the cluster. It may optionally include a signature identifying the process that +generated such a value.

+
interface ClusterTime {
    clusterTime: Timestamp;
    signature?: {
        hash: Binary;
        keyId: Long;
    };
}

Properties

Properties

clusterTime: Timestamp
signature?: {
    hash: Binary;
    keyId: Long;
}

Used to validate the identity of a request or response's ClusterTime.

+
diff --git a/docs/6.9/interfaces/ClusteredCollectionOptions.html b/docs/6.9/interfaces/ClusteredCollectionOptions.html new file mode 100644 index 0000000000..ffbc6ec66c --- /dev/null +++ b/docs/6.9/interfaces/ClusteredCollectionOptions.html @@ -0,0 +1,6 @@ +ClusteredCollectionOptions | mongodb

Interface ClusteredCollectionOptions

Configuration options for clustered collections

+
interface ClusteredCollectionOptions {
    key: Document;
    name?: string;
    unique: boolean;
}

Hierarchy (view full)

Properties

Properties

name?: string
unique: boolean
diff --git a/docs/6.9/interfaces/CollationOptions.html b/docs/6.9/interfaces/CollationOptions.html new file mode 100644 index 0000000000..0d14a338d9 --- /dev/null +++ b/docs/6.9/interfaces/CollationOptions.html @@ -0,0 +1,10 @@ +CollationOptions | mongodb

Interface CollationOptions

interface CollationOptions {
    alternate?: string;
    backwards?: boolean;
    caseFirst?: string;
    caseLevel?: boolean;
    locale: string;
    maxVariable?: string;
    normalization?: boolean;
    numericOrdering?: boolean;
    strength?: number;
}

Properties

alternate?: string
backwards?: boolean
caseFirst?: string
caseLevel?: boolean
locale: string
maxVariable?: string
normalization?: boolean
numericOrdering?: boolean
strength?: number
diff --git a/docs/6.9/interfaces/CollectionInfo.html b/docs/6.9/interfaces/CollectionInfo.html new file mode 100644 index 0000000000..84eeee1610 --- /dev/null +++ b/docs/6.9/interfaces/CollectionInfo.html @@ -0,0 +1,6 @@ +CollectionInfo | mongodb

Interface CollectionInfo

interface CollectionInfo {
    idIndex?: Document;
    info?: {
        readOnly?: false;
        uuid?: Binary;
    };
    name: string;
    options?: Document;
    type?: string;
}

Hierarchy (view full)

Properties

Properties

idIndex?: Document
info?: {
    readOnly?: false;
    uuid?: Binary;
}
name: string
options?: Document
type?: string
diff --git a/docs/6.9/interfaces/CollectionOptions.html b/docs/6.9/interfaces/CollectionOptions.html new file mode 100644 index 0000000000..9007eb58d8 --- /dev/null +++ b/docs/6.9/interfaces/CollectionOptions.html @@ -0,0 +1,49 @@ +CollectionOptions | mongodb

Interface CollectionOptions

interface CollectionOptions {
    bsonRegExp?: boolean;
    checkKeys?: boolean;
    enableUtf8Validation?: boolean;
    fieldsAsRaw?: Document;
    ignoreUndefined?: boolean;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    serializeFunctions?: boolean;
    useBigInt64?: boolean;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/CommandOperationOptions.html b/docs/6.9/interfaces/CommandOperationOptions.html new file mode 100644 index 0000000000..1bb1f74125 --- /dev/null +++ b/docs/6.9/interfaces/CommandOperationOptions.html @@ -0,0 +1,68 @@ +CommandOperationOptions | mongodb

Interface CommandOperationOptions

interface CommandOperationOptions {
    authdb?: string;
    bsonRegExp?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    dbName?: string;
    enableUtf8Validation?: boolean;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    ignoreUndefined?: boolean;
    maxTimeMS?: number;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    serializeFunctions?: boolean;
    session?: ClientSession;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

authdb?: string
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Collation

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
maxTimeMS?: number
noResponse?: boolean
omitReadPreference?: boolean
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/ConnectOptions.html b/docs/6.9/interfaces/ConnectOptions.html new file mode 100644 index 0000000000..d4d8d9324d --- /dev/null +++ b/docs/6.9/interfaces/ConnectOptions.html @@ -0,0 +1,2 @@ +ConnectOptions | mongodb

Interface ConnectOptions

interface ConnectOptions {
    readPreference?: ReadPreference;
}

Properties

Properties

readPreference?: ReadPreference
diff --git a/docs/6.9/interfaces/ConnectionOptions.html b/docs/6.9/interfaces/ConnectionOptions.html new file mode 100644 index 0000000000..a5ce94c0bf --- /dev/null +++ b/docs/6.9/interfaces/ConnectionOptions.html @@ -0,0 +1,122 @@ +ConnectionOptions | mongodb

Interface ConnectionOptions

interface ConnectionOptions {
    allowPartialTrustChain?: boolean;
    ALPNProtocols?: Uint8Array | string[] | Uint8Array[];
    autoSelectFamily?: boolean;
    autoSelectFamilyAttemptTimeout?: number;
    ca?: string | Buffer | (string | Buffer)[];
    cancellationToken?: CancellationToken;
    cert?: string | Buffer | (string | Buffer)[];
    checkServerIdentity?: ((hostname: string, cert: PeerCertificate) => Error | undefined);
    ciphers?: string;
    compressors?: (
        | "none"
        | "snappy"
        | "zlib"
        | "zstd")[];
    connectTimeoutMS?: number;
    credentials?: MongoCredentials;
    crl?: string | Buffer | (string | Buffer)[];
    ecdhCurve?: string;
    family?: number;
    generation: number;
    hints?: number;
    hostAddress: HostAddress;
    id: number | "<monitor>";
    key?: string | Buffer | (string | Buffer | KeyObject)[];
    loadBalanced: boolean;
    localAddress?: string;
    localPort?: number;
    logicalSessionTimeoutMinutes?: number;
    lookup?: LookupFunction;
    metadata: ClientMetadata;
    minDHSize?: number;
    monitorCommands: boolean;
    noDelay?: boolean;
    passphrase?: string;
    pfx?: string | Buffer | (string | Buffer | PxfObject)[];
    proxyHost?: string;
    proxyPassword?: string;
    proxyPort?: number;
    proxyUsername?: string;
    rejectUnauthorized?: boolean;
    secureContext?: SecureContext;
    secureProtocol?: string;
    serverApi?: ServerApi;
    servername?: string;
    session?: Buffer;
    socketTimeoutMS?: number;
    tls: boolean;
}

Hierarchy (view full)

Properties

allowPartialTrustChain?: boolean
ALPNProtocols?: Uint8Array | string[] | Uint8Array[]

An array of strings or a Buffer naming possible ALPN protocols. +(Protocols should be ordered by their priority.)

+
autoSelectFamily?: boolean

v18.13.0

+
autoSelectFamilyAttemptTimeout?: number

v18.13.0

+
ca?: string | Buffer | (string | Buffer)[]

Optionally override the trusted CA certificates. Default is to trust +the well-known CAs curated by Mozilla. Mozilla's CAs are completely +replaced when CAs are explicitly specified using this option.

+
cancellationToken?: CancellationToken
cert?: string | Buffer | (string | Buffer)[]

Cert chains in PEM format. One cert chain should be provided per +private key. Each cert chain should consist of the PEM formatted +certificate for a provided private key, followed by the PEM +formatted intermediate certificates (if any), in order, and not +including the root CA (the root CA must be pre-known to the peer, +see ca). When providing multiple cert chains, they do not have to +be in the same order as their private keys in key. If the +intermediate certificates are not provided, the peer will not be +able to validate the certificate, and the handshake will fail.

+
checkServerIdentity?: ((hostname: string, cert: PeerCertificate) => Error | undefined)

Type declaration

    • (hostname, cert): Error | undefined
    • Verifies the certificate cert is issued to hostname.

      +

      Returns Error object, populating it with reason, host, and cert on +failure. On success, returns undefined.

      +

      This function is intended to be used in combination with thecheckServerIdentity option that can be passed to connect and as +such operates on a certificate object. For other purposes, consider using x509.checkHost() instead.

      +

      This function can be overwritten by providing an alternative function as the options.checkServerIdentity option that is passed to tls.connect(). The +overwriting function can call tls.checkServerIdentity() of course, to augment +the checks done with additional verification.

      +

      This function is only called if the certificate passed all other checks, such as +being issued by trusted CA (options.ca).

      +

      Earlier versions of Node.js incorrectly accepted certificates for a givenhostname if a matching uniformResourceIdentifier subject alternative name +was present (see CVE-2021-44531). Applications that wish to acceptuniformResourceIdentifier subject alternative names can use +a custom options.checkServerIdentity function that implements the desired behavior.

      +

      Parameters

      • hostname: string

        The host name or IP address to verify the certificate against.

        +
      • cert: PeerCertificate

        A certificate object representing the peer's certificate.

        +

      Returns Error | undefined

      v0.8.4

      +
ciphers?: string

Cipher suite specification, replacing the default. For more +information, see modifying the default cipher suite. Permitted +ciphers can be obtained via tls.getCiphers(). Cipher names must be +uppercased in order for OpenSSL to accept them.

+
compressors?: (
    | "none"
    | "snappy"
    | "zlib"
    | "zstd")[]
connectTimeoutMS?: number
credentials?: MongoCredentials
crl?: string | Buffer | (string | Buffer)[]

PEM formatted CRLs (Certificate Revocation Lists).

+
ecdhCurve?: string

A string describing a named curve or a colon separated list of curve +NIDs or names, for example P-521:P-384:P-256, to use for ECDH key +agreement. Set to auto to select the curve automatically. Use +crypto.getCurves() to obtain a list of available curve names. On +recent releases, openssl ecparam -list_curves will also display the +name and description of each available elliptic curve. Default: +tls.DEFAULT_ECDH_CURVE.

+
family?: number
generation: number
hints?: number
hostAddress: HostAddress
id: number | "<monitor>"
key?: string | Buffer | (string | Buffer | KeyObject)[]

Private keys in PEM format. PEM allows the option of private keys +being encrypted. Encrypted keys will be decrypted with +options.passphrase. Multiple keys using different algorithms can be +provided either as an array of unencrypted key strings or buffers, +or an array of objects in the form {pem: <string|buffer>[, +passphrase: ]}. The object form can only occur in an array. +object.passphrase is optional. Encrypted keys will be decrypted with +object.passphrase if provided, or options.passphrase if it is not.

+
loadBalanced: boolean
localAddress?: string
localPort?: number
logicalSessionTimeoutMinutes?: number
lookup?: LookupFunction
metadata: ClientMetadata
minDHSize?: number
monitorCommands: boolean
noDelay?: boolean
passphrase?: string

Shared passphrase used for a single private key and/or a PFX.

+
pfx?: string | Buffer | (string | Buffer | PxfObject)[]

PFX or PKCS12 encoded private key and certificate chain. pfx is an +alternative to providing key and cert individually. PFX is usually +encrypted, if it is, passphrase will be used to decrypt it. Multiple +PFX can be provided either as an array of unencrypted PFX buffers, +or an array of objects in the form {buf: <string|buffer>[, +passphrase: ]}. The object form can only occur in an array. +object.passphrase is optional. Encrypted PFX will be decrypted with +object.passphrase if provided, or options.passphrase if it is not.

+
proxyHost?: string
proxyPassword?: string
proxyPort?: number
proxyUsername?: string
rejectUnauthorized?: boolean

If true the server will reject any connection which is not +authorized with the list of supplied CAs. This option only has an +effect if requestCert is true.

+
true
+
+ +
secureContext?: SecureContext

An optional TLS context object from tls.createSecureContext()

+
secureProtocol?: string

Legacy mechanism to select the TLS protocol version to use, it does +not support independent control of the minimum and maximum version, +and does not support limiting the protocol to TLSv1.3. Use +minVersion and maxVersion instead. The possible values are listed as +SSL_METHODS, use the function names as strings. For example, use +'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow +any TLS protocol version up to TLSv1.3. It is not recommended to use +TLS versions less than 1.2, but it may be required for +interoperability. Default: none, see minVersion.

+
serverApi?: ServerApi
servername?: string
session?: Buffer

An optional Buffer instance containing a TLS session.

+
socketTimeoutMS?: number
tls: boolean
diff --git a/docs/6.9/interfaces/ConnectionPoolOptions.html b/docs/6.9/interfaces/ConnectionPoolOptions.html new file mode 100644 index 0000000000..dec2569ec7 --- /dev/null +++ b/docs/6.9/interfaces/ConnectionPoolOptions.html @@ -0,0 +1,131 @@ +ConnectionPoolOptions | mongodb

Interface ConnectionPoolOptions

interface ConnectionPoolOptions {
    allowPartialTrustChain?: boolean;
    ALPNProtocols?: Uint8Array | string[] | Uint8Array[];
    autoSelectFamily?: boolean;
    autoSelectFamilyAttemptTimeout?: number;
    ca?: string | Buffer | (string | Buffer)[];
    cancellationToken?: CancellationToken;
    cert?: string | Buffer | (string | Buffer)[];
    checkServerIdentity?: ((hostname: string, cert: PeerCertificate) => Error | undefined);
    ciphers?: string;
    compressors?: (
        | "none"
        | "snappy"
        | "zlib"
        | "zstd")[];
    connectTimeoutMS?: number;
    credentials?: MongoCredentials;
    crl?: string | Buffer | (string | Buffer)[];
    ecdhCurve?: string;
    family?: number;
    hints?: number;
    hostAddress: HostAddress;
    key?: string | Buffer | (string | Buffer | KeyObject)[];
    loadBalanced: boolean;
    localAddress?: string;
    localPort?: number;
    logicalSessionTimeoutMinutes?: number;
    lookup?: LookupFunction;
    maxConnecting: number;
    maxIdleTimeMS: number;
    maxPoolSize: number;
    metadata: ClientMetadata;
    minDHSize?: number;
    minPoolSize: number;
    monitorCommands: boolean;
    noDelay?: boolean;
    passphrase?: string;
    pfx?: string | Buffer | (string | Buffer | PxfObject)[];
    proxyHost?: string;
    proxyPassword?: string;
    proxyPort?: number;
    proxyUsername?: string;
    rejectUnauthorized?: boolean;
    secureContext?: SecureContext;
    secureProtocol?: string;
    serverApi?: ServerApi;
    servername?: string;
    session?: Buffer;
    socketTimeoutMS?: number;
    tls: boolean;
    waitQueueTimeoutMS: number;
}

Hierarchy

Properties

allowPartialTrustChain?: boolean
ALPNProtocols?: Uint8Array | string[] | Uint8Array[]

An array of strings or a Buffer naming possible ALPN protocols. +(Protocols should be ordered by their priority.)

+
autoSelectFamily?: boolean

v18.13.0

+
autoSelectFamilyAttemptTimeout?: number

v18.13.0

+
ca?: string | Buffer | (string | Buffer)[]

Optionally override the trusted CA certificates. Default is to trust +the well-known CAs curated by Mozilla. Mozilla's CAs are completely +replaced when CAs are explicitly specified using this option.

+
cancellationToken?: CancellationToken
cert?: string | Buffer | (string | Buffer)[]

Cert chains in PEM format. One cert chain should be provided per +private key. Each cert chain should consist of the PEM formatted +certificate for a provided private key, followed by the PEM +formatted intermediate certificates (if any), in order, and not +including the root CA (the root CA must be pre-known to the peer, +see ca). When providing multiple cert chains, they do not have to +be in the same order as their private keys in key. If the +intermediate certificates are not provided, the peer will not be +able to validate the certificate, and the handshake will fail.

+
checkServerIdentity?: ((hostname: string, cert: PeerCertificate) => Error | undefined)

Type declaration

    • (hostname, cert): Error | undefined
    • Verifies the certificate cert is issued to hostname.

      +

      Returns Error object, populating it with reason, host, and cert on +failure. On success, returns undefined.

      +

      This function is intended to be used in combination with thecheckServerIdentity option that can be passed to connect and as +such operates on a certificate object. For other purposes, consider using x509.checkHost() instead.

      +

      This function can be overwritten by providing an alternative function as the options.checkServerIdentity option that is passed to tls.connect(). The +overwriting function can call tls.checkServerIdentity() of course, to augment +the checks done with additional verification.

      +

      This function is only called if the certificate passed all other checks, such as +being issued by trusted CA (options.ca).

      +

      Earlier versions of Node.js incorrectly accepted certificates for a givenhostname if a matching uniformResourceIdentifier subject alternative name +was present (see CVE-2021-44531). Applications that wish to acceptuniformResourceIdentifier subject alternative names can use +a custom options.checkServerIdentity function that implements the desired behavior.

      +

      Parameters

      • hostname: string

        The host name or IP address to verify the certificate against.

        +
      • cert: PeerCertificate

        A certificate object representing the peer's certificate.

        +

      Returns Error | undefined

      v0.8.4

      +
ciphers?: string

Cipher suite specification, replacing the default. For more +information, see modifying the default cipher suite. Permitted +ciphers can be obtained via tls.getCiphers(). Cipher names must be +uppercased in order for OpenSSL to accept them.

+
compressors?: (
    | "none"
    | "snappy"
    | "zlib"
    | "zstd")[]
connectTimeoutMS?: number
credentials?: MongoCredentials
crl?: string | Buffer | (string | Buffer)[]

PEM formatted CRLs (Certificate Revocation Lists).

+
ecdhCurve?: string

A string describing a named curve or a colon separated list of curve +NIDs or names, for example P-521:P-384:P-256, to use for ECDH key +agreement. Set to auto to select the curve automatically. Use +crypto.getCurves() to obtain a list of available curve names. On +recent releases, openssl ecparam -list_curves will also display the +name and description of each available elliptic curve. Default: +tls.DEFAULT_ECDH_CURVE.

+
family?: number
hints?: number
hostAddress: HostAddress
key?: string | Buffer | (string | Buffer | KeyObject)[]

Private keys in PEM format. PEM allows the option of private keys +being encrypted. Encrypted keys will be decrypted with +options.passphrase. Multiple keys using different algorithms can be +provided either as an array of unencrypted key strings or buffers, +or an array of objects in the form {pem: <string|buffer>[, +passphrase: ]}. The object form can only occur in an array. +object.passphrase is optional. Encrypted keys will be decrypted with +object.passphrase if provided, or options.passphrase if it is not.

+
loadBalanced: boolean

If we are in load balancer mode.

+
localAddress?: string
localPort?: number
logicalSessionTimeoutMinutes?: number
lookup?: LookupFunction
maxConnecting: number

The maximum number of connections that may be in the process of being established concurrently by the connection pool.

+
maxIdleTimeMS: number

The maximum amount of time a connection should remain idle in the connection pool before being marked idle.

+
maxPoolSize: number

The maximum number of connections that may be associated with a pool at a given time. This includes in use and available connections.

+
metadata: ClientMetadata
minDHSize?: number
minPoolSize: number

The minimum number of connections that MUST exist at any moment in a single connection pool.

+
monitorCommands: boolean
noDelay?: boolean
passphrase?: string

Shared passphrase used for a single private key and/or a PFX.

+
pfx?: string | Buffer | (string | Buffer | PxfObject)[]

PFX or PKCS12 encoded private key and certificate chain. pfx is an +alternative to providing key and cert individually. PFX is usually +encrypted, if it is, passphrase will be used to decrypt it. Multiple +PFX can be provided either as an array of unencrypted PFX buffers, +or an array of objects in the form {buf: <string|buffer>[, +passphrase: ]}. The object form can only occur in an array. +object.passphrase is optional. Encrypted PFX will be decrypted with +object.passphrase if provided, or options.passphrase if it is not.

+
proxyHost?: string
proxyPassword?: string
proxyPort?: number
proxyUsername?: string
rejectUnauthorized?: boolean

If true the server will reject any connection which is not +authorized with the list of supplied CAs. This option only has an +effect if requestCert is true.

+
true
+
+ +
secureContext?: SecureContext

An optional TLS context object from tls.createSecureContext()

+
secureProtocol?: string

Legacy mechanism to select the TLS protocol version to use, it does +not support independent control of the minimum and maximum version, +and does not support limiting the protocol to TLSv1.3. Use +minVersion and maxVersion instead. The possible values are listed as +SSL_METHODS, use the function names as strings. For example, use +'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow +any TLS protocol version up to TLSv1.3. It is not recommended to use +TLS versions less than 1.2, but it may be required for +interoperability. Default: none, see minVersion.

+
serverApi?: ServerApi
servername?: string
session?: Buffer

An optional Buffer instance containing a TLS session.

+
socketTimeoutMS?: number
tls: boolean
waitQueueTimeoutMS: number

The maximum amount of time operation execution should wait for a connection to become available. The default is 0 which means there is no limit.

+
diff --git a/docs/6.9/interfaces/CountDocumentsOptions.html b/docs/6.9/interfaces/CountDocumentsOptions.html new file mode 100644 index 0000000000..014fcff52f --- /dev/null +++ b/docs/6.9/interfaces/CountDocumentsOptions.html @@ -0,0 +1,88 @@ +CountDocumentsOptions | mongodb

Interface CountDocumentsOptions

interface CountDocumentsOptions {
    allowDiskUse?: boolean;
    authdb?: string;
    batchSize?: number;
    bsonRegExp?: boolean;
    bypassDocumentValidation?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    cursor?: Document;
    dbName?: string;
    enableUtf8Validation?: boolean;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    hint?: Hint;
    ignoreUndefined?: boolean;
    let?: Document;
    limit?: number;
    maxAwaitTimeMS?: number;
    maxTimeMS?: number;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    out?: string;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    serializeFunctions?: boolean;
    session?: ClientSession;
    skip?: number;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

allowDiskUse?: boolean

allowDiskUse lets the server know if it can use disk to store temporary results for the aggregation (requires mongodb 2.6 >).

+
authdb?: string
batchSize?: number

The number of documents to return per batch. See aggregation documentation.

+
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
bypassDocumentValidation?: boolean

Allow driver to bypass schema validation.

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Specify collation.

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
cursor?: Document

Return the query as cursor, on 2.6 > it returns as a real cursor on pre 2.6 it returns as an emulated cursor.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
hint?: Hint

Add an index selection hint to an aggregation command

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
let?: Document

Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

+
limit?: number

The maximum amount of documents to consider.

+
maxAwaitTimeMS?: number

The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query.

+
maxTimeMS?: number

specifies a cumulative time limit in milliseconds for processing operations on the cursor. MongoDB interrupts the operation at the earliest following interrupt point.

+
noResponse?: boolean
omitReadPreference?: boolean
out?: string
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
skip?: number

The number of documents to skip.

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/CountOptions.html b/docs/6.9/interfaces/CountOptions.html new file mode 100644 index 0000000000..28e48522ac --- /dev/null +++ b/docs/6.9/interfaces/CountOptions.html @@ -0,0 +1,75 @@ +CountOptions | mongodb

Interface CountOptions

interface CountOptions {
    authdb?: string;
    bsonRegExp?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    dbName?: string;
    enableUtf8Validation?: boolean;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    hint?: string | Document;
    ignoreUndefined?: boolean;
    limit?: number;
    maxTimeMS?: number;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    serializeFunctions?: boolean;
    session?: ClientSession;
    skip?: number;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

authdb?: string
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Collation

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
hint?: string | Document

An index name hint for the query.

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
limit?: number

The maximum amounts to count before aborting.

+
maxTimeMS?: number

Number of milliseconds to wait before aborting the query.

+
noResponse?: boolean
omitReadPreference?: boolean
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
skip?: number

The number of documents to skip.

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/CreateCollectionOptions.html b/docs/6.9/interfaces/CreateCollectionOptions.html new file mode 100644 index 0000000000..d115784336 --- /dev/null +++ b/docs/6.9/interfaces/CreateCollectionOptions.html @@ -0,0 +1,104 @@ +CreateCollectionOptions | mongodb

Interface CreateCollectionOptions

interface CreateCollectionOptions {
    authdb?: string;
    autoIndexId?: boolean;
    bsonRegExp?: boolean;
    capped?: boolean;
    changeStreamPreAndPostImages?: {
        enabled: boolean;
    };
    checkKeys?: boolean;
    clusteredIndex?: ClusteredCollectionOptions;
    collation?: CollationOptions;
    comment?: unknown;
    dbName?: string;
    enableUtf8Validation?: boolean;
    encryptedFields?: Document;
    expireAfterSeconds?: number;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    flags?: number;
    ignoreUndefined?: boolean;
    indexOptionDefaults?: Document;
    max?: number;
    maxTimeMS?: number;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    pipeline?: Document[];
    pkFactory?: PkFactory;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    serializeFunctions?: boolean;
    session?: ClientSession;
    size?: number;
    storageEngine?: Document;
    timeseries?: TimeSeriesCollectionOptions;
    useBigInt64?: boolean;
    validationAction?: string;
    validationLevel?: string;
    validator?: Document;
    viewOn?: string;
    willRetryWrite?: boolean;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

authdb?: string
autoIndexId?: boolean

Create an index on the _id field of the document. This option is deprecated in MongoDB 3.2+ and will be removed once no longer supported by the server.

+
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
capped?: boolean

Create a capped collection

+
changeStreamPreAndPostImages?: {
    enabled: boolean;
}

If set, enables pre-update and post-update document events to be included for any +change streams that listen on this collection.

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+

A document specifying configuration options for clustered collections. For MongoDB 5.3 and above.

+
collation?: CollationOptions

Collation

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+
encryptedFields?: Document
expireAfterSeconds?: number

The number of seconds after which a document in a timeseries or clustered collection expires.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
flags?: number

Available for the MMAPv1 storage engine only to set the usePowerOf2Sizes and the noPadding flag

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
indexOptionDefaults?: Document

Allows users to specify a default configuration for indexes when creating a collection

+
max?: number

The maximum number of documents in the capped collection

+
maxTimeMS?: number
noResponse?: boolean
omitReadPreference?: boolean
pipeline?: Document[]

An array that consists of the aggregation pipeline stage. Creates the view by applying the specified pipeline to the viewOn collection or view

+
pkFactory?: PkFactory

A primary key factory function for generation of custom _id keys.

+
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
size?: number

The size of the capped collection in bytes

+
storageEngine?: Document

Allows users to specify configuration to the storage engine on a per-collection basis when creating a collection

+

A document specifying configuration options for timeseries collections.

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
validationAction?: string

Determines whether to error on invalid documents or just warn about the violations but allow invalid documents to be inserted

+
validationLevel?: string

Determines how strictly MongoDB applies the validation rules to existing documents during an update

+
validator?: Document

Allows users to specify validation rules or expressions for the collection. For more information, see Document Validation

+
viewOn?: string

The name of the source collection or view from which to create the view. The name is not the full namespace of the collection or view (i.e., does not include the database name and implies the same database as the view to create)

+
willRetryWrite?: boolean

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/CreateIndexesOptions.html b/docs/6.9/interfaces/CreateIndexesOptions.html new file mode 100644 index 0000000000..bce8a0383d --- /dev/null +++ b/docs/6.9/interfaces/CreateIndexesOptions.html @@ -0,0 +1,98 @@ +CreateIndexesOptions | mongodb

Interface CreateIndexesOptions

interface CreateIndexesOptions {
    2dsphereIndexVersion?: number;
    authdb?: string;
    background?: boolean;
    bits?: number;
    bsonRegExp?: boolean;
    bucketSize?: number;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    commitQuorum?: string | number;
    dbName?: string;
    default_language?: string;
    enableUtf8Validation?: boolean;
    expireAfterSeconds?: number;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    hidden?: boolean;
    ignoreUndefined?: boolean;
    language_override?: string;
    max?: number;
    maxTimeMS?: number;
    min?: number;
    name?: string;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    partialFilterExpression?: Document;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    serializeFunctions?: boolean;
    session?: ClientSession;
    sparse?: boolean;
    storageEngine?: Document;
    textIndexVersion?: number;
    unique?: boolean;
    useBigInt64?: boolean;
    version?: number;
    weights?: Document;
    wildcardProjection?: Document;
    willRetryWrite?: boolean;
}

Hierarchy

Properties

2dsphereIndexVersion?: number
authdb?: string
background?: boolean

Creates the index in the background, yielding whenever possible.

+
bits?: number
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
bucketSize?: number
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Collation

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
commitQuorum?: string | number

(MongoDB 4.4. or higher) Specifies how many data-bearing members of a replica set, including the primary, must complete the index builds successfully before the primary marks the indexes as ready. This option accepts the same values for the "w" field in a write concern plus "votingMembers", which indicates all voting data-bearing nodes.

+
dbName?: string
default_language?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+
expireAfterSeconds?: number

Allows you to expire data on indexes applied to a data (MongoDB 2.2 or higher)

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
hidden?: boolean

Specifies that the index should exist on the target collection but should not be used by the query planner when executing operations. (MongoDB 4.4 or higher)

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
language_override?: string
max?: number

For geospatial indexes set the high bound for the co-ordinates.

+
maxTimeMS?: number
min?: number

For geospatial indexes set the lower bound for the co-ordinates.

+
name?: string

Override the autogenerated index name (useful if the resulting name is larger than 128 bytes)

+
noResponse?: boolean
omitReadPreference?: boolean
partialFilterExpression?: Document

Creates a partial index based on the given filter object (MongoDB 3.2 or higher)

+
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
sparse?: boolean

Creates a sparse index.

+
storageEngine?: Document

Allows users to configure the storage engine on a per-index basis when creating an index. (MongoDB 3.0 or higher)

+
textIndexVersion?: number
unique?: boolean

Creates an unique index.

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
version?: number

Specifies the index version number, either 0 or 1.

+
weights?: Document
wildcardProjection?: Document
willRetryWrite?: boolean
diff --git a/docs/6.9/interfaces/CursorStreamOptions.html b/docs/6.9/interfaces/CursorStreamOptions.html new file mode 100644 index 0000000000..65bf6213fd --- /dev/null +++ b/docs/6.9/interfaces/CursorStreamOptions.html @@ -0,0 +1,3 @@ +CursorStreamOptions | mongodb

Interface CursorStreamOptions

interface CursorStreamOptions {
    transform?(this: void, doc: Document): Document;
}

Methods

Methods

diff --git a/docs/6.9/interfaces/DataKey.html b/docs/6.9/interfaces/DataKey.html new file mode 100644 index 0000000000..eb71b35468 --- /dev/null +++ b/docs/6.9/interfaces/DataKey.html @@ -0,0 +1,10 @@ +DataKey | mongodb

Interface DataKey

The schema for a DataKey in the key vault collection.

+
interface DataKey {
    _id: UUID;
    creationDate: Date;
    keyAltNames?: string[];
    keyMaterial: Binary;
    masterKey: Document;
    status: number;
    updateDate: Date;
    version?: number;
}

Properties

_id: UUID
creationDate: Date
keyAltNames?: string[]
keyMaterial: Binary
masterKey: Document
status: number
updateDate: Date
version?: number
diff --git a/docs/6.9/interfaces/DbOptions.html b/docs/6.9/interfaces/DbOptions.html new file mode 100644 index 0000000000..2f89c58e79 --- /dev/null +++ b/docs/6.9/interfaces/DbOptions.html @@ -0,0 +1,57 @@ +DbOptions | mongodb

Interface DbOptions

interface DbOptions {
    authSource?: string;
    bsonRegExp?: boolean;
    checkKeys?: boolean;
    enableUtf8Validation?: boolean;
    fieldsAsRaw?: Document;
    forceServerObjectId?: boolean;
    ignoreUndefined?: boolean;
    pkFactory?: PkFactory;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcern;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    serializeFunctions?: boolean;
    useBigInt64?: boolean;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

authSource?: string

If the database authentication is dependent on another databaseName.

+
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
forceServerObjectId?: boolean

Force server to assign _id values instead of driver.

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
pkFactory?: PkFactory

A primary key factory object for generation of custom _id keys.

+
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcern

Specify a read concern for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).

+
retryWrites?: boolean

Should retry failed writes

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/DbStatsOptions.html b/docs/6.9/interfaces/DbStatsOptions.html new file mode 100644 index 0000000000..65942fbe61 --- /dev/null +++ b/docs/6.9/interfaces/DbStatsOptions.html @@ -0,0 +1,70 @@ +DbStatsOptions | mongodb

Interface DbStatsOptions

interface DbStatsOptions {
    authdb?: string;
    bsonRegExp?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    dbName?: string;
    enableUtf8Validation?: boolean;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    ignoreUndefined?: boolean;
    maxTimeMS?: number;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    scale?: number;
    serializeFunctions?: boolean;
    session?: ClientSession;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

authdb?: string
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Collation

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
maxTimeMS?: number
noResponse?: boolean
omitReadPreference?: boolean
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
scale?: number

Divide the returned sizes by scale value.

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/DeleteManyModel.html b/docs/6.9/interfaces/DeleteManyModel.html new file mode 100644 index 0000000000..35b25ef85d --- /dev/null +++ b/docs/6.9/interfaces/DeleteManyModel.html @@ -0,0 +1,7 @@ +DeleteManyModel | mongodb

Interface DeleteManyModel<TSchema>

interface DeleteManyModel<TSchema> {
    collation?: CollationOptions;
    filter: Filter<TSchema>;
    hint?: Hint;
}

Type Parameters

Properties

Properties

collation?: CollationOptions

Specifies a collation.

+
filter: Filter<TSchema>

The filter to limit the deleted documents.

+
hint?: Hint

The index to use. If specified, then the query system will only consider plans using the hinted index.

+
diff --git a/docs/6.9/interfaces/DeleteOneModel.html b/docs/6.9/interfaces/DeleteOneModel.html new file mode 100644 index 0000000000..0e3d08b357 --- /dev/null +++ b/docs/6.9/interfaces/DeleteOneModel.html @@ -0,0 +1,7 @@ +DeleteOneModel | mongodb

Interface DeleteOneModel<TSchema>

interface DeleteOneModel<TSchema> {
    collation?: CollationOptions;
    filter: Filter<TSchema>;
    hint?: Hint;
}

Type Parameters

Properties

Properties

collation?: CollationOptions

Specifies a collation.

+
filter: Filter<TSchema>

The filter to limit the deleted documents.

+
hint?: Hint

The index to use. If specified, then the query system will only consider plans using the hinted index.

+
diff --git a/docs/6.9/interfaces/DeleteOptions.html b/docs/6.9/interfaces/DeleteOptions.html new file mode 100644 index 0000000000..c9ef260a0e --- /dev/null +++ b/docs/6.9/interfaces/DeleteOptions.html @@ -0,0 +1,74 @@ +DeleteOptions | mongodb

Interface DeleteOptions

interface DeleteOptions {
    authdb?: string;
    bsonRegExp?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    dbName?: string;
    enableUtf8Validation?: boolean;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    hint?: string | Document;
    ignoreUndefined?: boolean;
    let?: Document;
    maxTimeMS?: number;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    ordered?: boolean;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    serializeFunctions?: boolean;
    session?: ClientSession;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

authdb?: string
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Specifies the collation to use for the operation

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
hint?: string | Document

Specify that the update query should only consider plans using the hinted index

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
let?: Document

Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

+
maxTimeMS?: number
noResponse?: boolean
omitReadPreference?: boolean
ordered?: boolean

If true, when an insert fails, don't execute the remaining writes. If false, continue with remaining inserts when one fails.

+
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/DeleteResult.html b/docs/6.9/interfaces/DeleteResult.html new file mode 100644 index 0000000000..9128961a4a --- /dev/null +++ b/docs/6.9/interfaces/DeleteResult.html @@ -0,0 +1,5 @@ +DeleteResult | mongodb

Interface DeleteResult

interface DeleteResult {
    acknowledged: boolean;
    deletedCount: number;
}

Properties

acknowledged: boolean

Indicates whether this write result was acknowledged. If not, then all other members of this result will be undefined.

+
deletedCount: number

The number of documents that were deleted

+
diff --git a/docs/6.9/interfaces/DeleteStatement.html b/docs/6.9/interfaces/DeleteStatement.html new file mode 100644 index 0000000000..835459365f --- /dev/null +++ b/docs/6.9/interfaces/DeleteStatement.html @@ -0,0 +1,9 @@ +DeleteStatement | mongodb

Interface DeleteStatement

interface DeleteStatement {
    collation?: CollationOptions;
    hint?: Hint;
    limit: number;
    q: Document;
}

Properties

Properties

collation?: CollationOptions

Specifies the collation to use for the operation.

+
hint?: Hint

A document or string that specifies the index to use to support the query predicate.

+
limit: number

The number of matching documents to delete.

+

The query that matches documents to delete.

+
diff --git a/docs/6.9/interfaces/DriverInfo.html b/docs/6.9/interfaces/DriverInfo.html new file mode 100644 index 0000000000..09de221a79 --- /dev/null +++ b/docs/6.9/interfaces/DriverInfo.html @@ -0,0 +1,4 @@ +DriverInfo | mongodb

Interface DriverInfo

interface DriverInfo {
    name?: string;
    platform?: string;
    version?: string;
}

Properties

Properties

name?: string
platform?: string
version?: string
diff --git a/docs/6.9/interfaces/DropCollectionOptions.html b/docs/6.9/interfaces/DropCollectionOptions.html new file mode 100644 index 0000000000..f96c412221 --- /dev/null +++ b/docs/6.9/interfaces/DropCollectionOptions.html @@ -0,0 +1,69 @@ +DropCollectionOptions | mongodb

Interface DropCollectionOptions

interface DropCollectionOptions {
    authdb?: string;
    bsonRegExp?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    dbName?: string;
    enableUtf8Validation?: boolean;
    encryptedFields?: Document;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    ignoreUndefined?: boolean;
    maxTimeMS?: number;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    serializeFunctions?: boolean;
    session?: ClientSession;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

authdb?: string
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Collation

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+
encryptedFields?: Document

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
maxTimeMS?: number
noResponse?: boolean
omitReadPreference?: boolean
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/EndSessionOptions.html b/docs/6.9/interfaces/EndSessionOptions.html new file mode 100644 index 0000000000..8b1ddc52a2 --- /dev/null +++ b/docs/6.9/interfaces/EndSessionOptions.html @@ -0,0 +1,3 @@ +EndSessionOptions | mongodb

Interface EndSessionOptions

interface EndSessionOptions {
    force?: boolean;
    forceClear?: boolean;
}

Properties

Properties

force?: boolean
forceClear?: boolean
diff --git a/docs/6.9/interfaces/ErrorDescription.html b/docs/6.9/interfaces/ErrorDescription.html new file mode 100644 index 0000000000..ed16af1442 --- /dev/null +++ b/docs/6.9/interfaces/ErrorDescription.html @@ -0,0 +1,6 @@ +ErrorDescription | mongodb

Interface ErrorDescription

interface ErrorDescription {
    $err?: string;
    errInfo?: Document;
    errmsg?: string;
    errorLabels?: string[];
    message?: string;
}

Hierarchy (view full)

Properties

$err?: string
errInfo?: Document
errmsg?: string
errorLabels?: string[]
message?: string
diff --git a/docs/6.9/interfaces/EstimatedDocumentCountOptions.html b/docs/6.9/interfaces/EstimatedDocumentCountOptions.html new file mode 100644 index 0000000000..6dda6bf433 --- /dev/null +++ b/docs/6.9/interfaces/EstimatedDocumentCountOptions.html @@ -0,0 +1,70 @@ +EstimatedDocumentCountOptions | mongodb

Interface EstimatedDocumentCountOptions

interface EstimatedDocumentCountOptions {
    authdb?: string;
    bsonRegExp?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    dbName?: string;
    enableUtf8Validation?: boolean;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    ignoreUndefined?: boolean;
    maxTimeMS?: number;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    serializeFunctions?: boolean;
    session?: ClientSession;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

authdb?: string
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Collation

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
maxTimeMS?: number

The maximum amount of time to allow the operation to run.

+

This option is sent only if the caller explicitly provides a value. The default is to not send a value.

+
noResponse?: boolean
omitReadPreference?: boolean
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/ExplainOptions.html b/docs/6.9/interfaces/ExplainOptions.html new file mode 100644 index 0000000000..6410d87098 --- /dev/null +++ b/docs/6.9/interfaces/ExplainOptions.html @@ -0,0 +1,3 @@ +ExplainOptions | mongodb

Interface ExplainOptions

interface ExplainOptions {
    explain?: ExplainVerbosityLike;
}

Hierarchy (view full)

Properties

Properties

Specifies the verbosity mode for the explain output.

+
diff --git a/docs/6.9/interfaces/FilterOperators.html b/docs/6.9/interfaces/FilterOperators.html new file mode 100644 index 0000000000..98055a8dc8 --- /dev/null +++ b/docs/6.9/interfaces/FilterOperators.html @@ -0,0 +1,35 @@ +FilterOperators | mongodb

Interface FilterOperators<TValue>

interface FilterOperators<TValue> {
    __id?: undefined;
    $all?: readonly any[];
    $bitsAllClear?: BitwiseFilter;
    $bitsAllSet?: BitwiseFilter;
    $bitsAnyClear?: BitwiseFilter;
    $bitsAnySet?: BitwiseFilter;
    $elemMatch?: Document;
    $eq?: TValue;
    $exists?: boolean;
    $expr?: Record<string, any>;
    $geoIntersects?: {
        $geometry: Document;
    };
    $geoWithin?: Document;
    $gt?: TValue;
    $gte?: TValue;
    $in?: readonly TValue[];
    $jsonSchema?: Record<string, any>;
    $lt?: TValue;
    $lte?: TValue;
    $maxDistance?: number;
    $mod?: TValue extends number
        ? [number, number]
        : never;
    $ne?: TValue;
    $near?: Document;
    $nearSphere?: Document;
    $nin?: readonly TValue[];
    $not?: TValue extends string
        ? RegExp | FilterOperators<TValue<TValue>>
        : FilterOperators<TValue>;
    $options?: TValue extends string
        ? string
        : never;
    $rand?: Record<string, never>;
    $regex?: TValue extends string
        ? string | RegExp | BSONRegExp
        : never;
    $size?: TValue extends readonly any[]
        ? number
        : never;
    $type?:
        | "string"
        | "symbol"
        | "undefined"
        | "object"
        | "double"
        | "array"
        | "binData"
        | "objectId"
        | "bool"
        | "date"
        | "null"
        | "regex"
        | "dbPointer"
        | "javascript"
        | "javascriptWithScope"
        | "int"
        | "timestamp"
        | "long"
        | "decimal"
        | "minKey"
        | "maxKey"
        | BSON.BSONType;
    id?: undefined;
    toHexString?: any;
}

Type Parameters

  • TValue

Hierarchy (view full)

Properties

__id?: undefined
$all?: readonly any[]
$bitsAllClear?: BitwiseFilter
$bitsAllSet?: BitwiseFilter
$bitsAnyClear?: BitwiseFilter
$bitsAnySet?: BitwiseFilter
$elemMatch?: Document
$eq?: TValue
$exists?: boolean

When true, $exists matches the documents that contain the field, +including documents where the field value is null.

+
$expr?: Record<string, any>
$geoIntersects?: {
    $geometry: Document;
}
$geoWithin?: Document
$gt?: TValue
$gte?: TValue
$in?: readonly TValue[]
$jsonSchema?: Record<string, any>
$lt?: TValue
$lte?: TValue
$maxDistance?: number
$mod?: TValue extends number
    ? [number, number]
    : never
$ne?: TValue
$near?: Document
$nearSphere?: Document
$nin?: readonly TValue[]
$not?: TValue extends string
    ? RegExp | FilterOperators<TValue<TValue>>
    : FilterOperators<TValue>
$options?: TValue extends string
    ? string
    : never
$rand?: Record<string, never>
$regex?: TValue extends string
    ? string | RegExp | BSONRegExp
    : never
$size?: TValue extends readonly any[]
    ? number
    : never
$type?:
    | "string"
    | "symbol"
    | "undefined"
    | "object"
    | "double"
    | "array"
    | "binData"
    | "objectId"
    | "bool"
    | "date"
    | "null"
    | "regex"
    | "dbPointer"
    | "javascript"
    | "javascriptWithScope"
    | "int"
    | "timestamp"
    | "long"
    | "decimal"
    | "minKey"
    | "maxKey"
    | BSON.BSONType
id?: undefined

Methods

toHexString
diff --git a/docs/6.9/interfaces/FindOneAndDeleteOptions.html b/docs/6.9/interfaces/FindOneAndDeleteOptions.html new file mode 100644 index 0000000000..76bd30366d --- /dev/null +++ b/docs/6.9/interfaces/FindOneAndDeleteOptions.html @@ -0,0 +1,78 @@ +FindOneAndDeleteOptions | mongodb

Interface FindOneAndDeleteOptions

interface FindOneAndDeleteOptions {
    authdb?: string;
    bsonRegExp?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    dbName?: string;
    enableUtf8Validation?: boolean;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    hint?: Document;
    ignoreUndefined?: boolean;
    includeResultMetadata?: boolean;
    let?: Document;
    maxTimeMS?: number;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    projection?: Document;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    serializeFunctions?: boolean;
    session?: ClientSession;
    sort?: Sort;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

authdb?: string
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Collation

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
hint?: Document

An optional hint for query optimization. See the command reference for more information.

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
includeResultMetadata?: boolean

Return the ModifyResult instead of the modified document. Defaults to false

+
let?: Document

Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

+
maxTimeMS?: number
noResponse?: boolean
omitReadPreference?: boolean
projection?: Document

Limits the fields to return for all matching documents.

+
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
sort?: Sort

Determines which document the operation modifies if the query selects multiple documents.

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/FindOneAndReplaceOptions.html b/docs/6.9/interfaces/FindOneAndReplaceOptions.html new file mode 100644 index 0000000000..f187a47e6b --- /dev/null +++ b/docs/6.9/interfaces/FindOneAndReplaceOptions.html @@ -0,0 +1,84 @@ +FindOneAndReplaceOptions | mongodb

Interface FindOneAndReplaceOptions

interface FindOneAndReplaceOptions {
    authdb?: string;
    bsonRegExp?: boolean;
    bypassDocumentValidation?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    dbName?: string;
    enableUtf8Validation?: boolean;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    hint?: Document;
    ignoreUndefined?: boolean;
    includeResultMetadata?: boolean;
    let?: Document;
    maxTimeMS?: number;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    projection?: Document;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    returnDocument?: ReturnDocument;
    serializeFunctions?: boolean;
    session?: ClientSession;
    sort?: Sort;
    upsert?: boolean;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

authdb?: string
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
bypassDocumentValidation?: boolean

Allow driver to bypass schema validation.

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Collation

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
hint?: Document

An optional hint for query optimization. See the command reference for more information.

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
includeResultMetadata?: boolean

Return the ModifyResult instead of the modified document. Defaults to false

+
let?: Document

Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

+
maxTimeMS?: number
noResponse?: boolean
omitReadPreference?: boolean
projection?: Document

Limits the fields to return for all matching documents.

+
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
returnDocument?: ReturnDocument

When set to 'after', returns the updated document rather than the original. The default is 'before'.

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
sort?: Sort

Determines which document the operation modifies if the query selects multiple documents.

+
upsert?: boolean

Upsert the document if it does not exist.

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/FindOneAndUpdateOptions.html b/docs/6.9/interfaces/FindOneAndUpdateOptions.html new file mode 100644 index 0000000000..3f4685f2f0 --- /dev/null +++ b/docs/6.9/interfaces/FindOneAndUpdateOptions.html @@ -0,0 +1,86 @@ +FindOneAndUpdateOptions | mongodb

Interface FindOneAndUpdateOptions

interface FindOneAndUpdateOptions {
    arrayFilters?: Document[];
    authdb?: string;
    bsonRegExp?: boolean;
    bypassDocumentValidation?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    dbName?: string;
    enableUtf8Validation?: boolean;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    hint?: Document;
    ignoreUndefined?: boolean;
    includeResultMetadata?: boolean;
    let?: Document;
    maxTimeMS?: number;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    projection?: Document;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    returnDocument?: ReturnDocument;
    serializeFunctions?: boolean;
    session?: ClientSession;
    sort?: Sort;
    upsert?: boolean;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

arrayFilters?: Document[]

Optional list of array filters referenced in filtered positional operators

+
authdb?: string
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
bypassDocumentValidation?: boolean

Allow driver to bypass schema validation.

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Collation

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
hint?: Document

An optional hint for query optimization. See the command reference for more information.

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
includeResultMetadata?: boolean

Return the ModifyResult instead of the modified document. Defaults to false

+
let?: Document

Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

+
maxTimeMS?: number
noResponse?: boolean
omitReadPreference?: boolean
projection?: Document

Limits the fields to return for all matching documents.

+
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
returnDocument?: ReturnDocument

When set to 'after', returns the updated document rather than the original. The default is 'before'.

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
sort?: Sort

Determines which document the operation modifies if the query selects multiple documents.

+
upsert?: boolean

Upsert the document if it does not exist.

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/FindOptions.html b/docs/6.9/interfaces/FindOptions.html new file mode 100644 index 0000000000..4cb5edf50a --- /dev/null +++ b/docs/6.9/interfaces/FindOptions.html @@ -0,0 +1,109 @@ +FindOptions | mongodb

Interface FindOptions<TSchema>

interface FindOptions<TSchema> {
    allowDiskUse?: boolean;
    allowPartialResults?: boolean;
    authdb?: string;
    awaitData?: boolean;
    batchSize?: number;
    bsonRegExp?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    dbName?: string;
    enableUtf8Validation?: boolean;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    hint?: Hint;
    ignoreUndefined?: boolean;
    let?: Document;
    limit?: number;
    max?: Document;
    maxAwaitTimeMS?: number;
    maxTimeMS?: number;
    min?: Document;
    noCursorTimeout?: boolean;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    oplogReplay?: boolean;
    projection?: Document;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    returnKey?: boolean;
    serializeFunctions?: boolean;
    session?: ClientSession;
    showRecordId?: boolean;
    singleBatch?: boolean;
    skip?: number;
    sort?: Sort;
    tailable?: boolean;
    timeout?: boolean;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
}

Type Parameters

  • TSchema extends Document = Document

    Unused schema definition, deprecated usage, only specify FindOptions with no generic

    +

Hierarchy

Properties

allowDiskUse?: boolean

Allows disk use for blocking sort operations exceeding 100MB memory. (MongoDB 3.2 or higher)

+
allowPartialResults?: boolean

For queries against a sharded collection, allows the command (or subsequent getMore commands) to return partial results, rather than an error, if one or more queried shards are unavailable.

+
authdb?: string
awaitData?: boolean

Specify if the cursor is a tailable-await cursor. Requires tailable to be true

+
batchSize?: number

Set the batchSize for the getMoreCommand when iterating over the query results.

+
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Specify collation (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields).

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
hint?: Hint

Tell the query to use specific indexes in the query. Object of indexes to use, {'_id':1}

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
let?: Document

Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

+
limit?: number

Sets the limit of documents returned in the query.

+
max?: Document

The exclusive upper bound for a specific index

+
maxAwaitTimeMS?: number

The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query. Requires tailable and awaitData to be true

+
maxTimeMS?: number

Number of milliseconds to wait before aborting the query.

+
min?: Document

The inclusive lower bound for a specific index

+
noCursorTimeout?: boolean

The server normally times out idle cursors after an inactivity period (10 minutes) to prevent excess memory use. Set this option to prevent that.

+
noResponse?: boolean
omitReadPreference?: boolean
oplogReplay?: boolean

Option to enable an optimized code path for queries looking for a particular range of ts values in the oplog. Requires tailable to be true.

+

Starting from MongoDB 4.4 this flag is not needed and will be ignored.

+
projection?: Document

The fields to return in the query. Object of fields to either include or exclude (one of, not both), {'a':1, 'b': 1} or {'a': 0, 'b': 0}

+
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
returnKey?: boolean

If true, returns only the index keys in the resulting documents.

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
showRecordId?: boolean

Determines whether to return the record identifier for each document. If true, adds a field $recordId to the returned documents.

+
singleBatch?: boolean

Determines whether to close the cursor after the first batch. Defaults to false.

+
skip?: number

Set to skip N documents ahead in your query (useful for pagination).

+
sort?: Sort

Set to sort the documents coming back from the query. Array of indexes, [['a', 1]] etc.

+
tailable?: boolean

Specify if the cursor is tailable.

+
timeout?: boolean

Specify if the cursor can timeout.

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean
diff --git a/docs/6.9/interfaces/GCPEncryptionKeyOptions.html b/docs/6.9/interfaces/GCPEncryptionKeyOptions.html new file mode 100644 index 0000000000..497fd0a23d --- /dev/null +++ b/docs/6.9/interfaces/GCPEncryptionKeyOptions.html @@ -0,0 +1,14 @@ +GCPEncryptionKeyOptions | mongodb

Interface GCPEncryptionKeyOptions

Configuration options for making an AWS encryption key

+
interface GCPEncryptionKeyOptions {
    endpoint?: string;
    keyName: string;
    keyRing: string;
    keyVersion?: string;
    location: string;
    projectId: string;
}

Properties

endpoint?: string

KMS URL, defaults to https://www.googleapis.com/auth/cloudkms

+
keyName: string

Key name

+
keyRing: string

Key ring name

+
keyVersion?: string

Key version

+
location: string

Location name (e.g. "global")

+
projectId: string

GCP project ID

+
diff --git a/docs/6.9/interfaces/GridFSBucketOptions.html b/docs/6.9/interfaces/GridFSBucketOptions.html new file mode 100644 index 0000000000..5de35ef5cb --- /dev/null +++ b/docs/6.9/interfaces/GridFSBucketOptions.html @@ -0,0 +1,9 @@ +GridFSBucketOptions | mongodb

Interface GridFSBucketOptions

interface GridFSBucketOptions {
    bucketName?: string;
    chunkSizeBytes?: number;
    readPreference?: ReadPreference;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

bucketName?: string

The 'files' and 'chunks' collections will be prefixed with the bucket name followed by a dot.

+
chunkSizeBytes?: number

Number of bytes stored in each chunk. Defaults to 255KB

+
readPreference?: ReadPreference

Read preference to be passed to read operations

+

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/GridFSBucketReadStreamOptions.html b/docs/6.9/interfaces/GridFSBucketReadStreamOptions.html new file mode 100644 index 0000000000..4db7b8b128 --- /dev/null +++ b/docs/6.9/interfaces/GridFSBucketReadStreamOptions.html @@ -0,0 +1,8 @@ +GridFSBucketReadStreamOptions | mongodb

Interface GridFSBucketReadStreamOptions

interface GridFSBucketReadStreamOptions {
    end?: number;
    skip?: number;
    sort?: Sort;
    start?: number;
}

Hierarchy (view full)

Properties

Properties

end?: number

0-indexed non-negative byte offset to the end of the file contents +to be returned by the stream. end is non-inclusive

+
skip?: number
sort?: Sort
start?: number

0-indexed non-negative byte offset from the beginning of the file

+
diff --git a/docs/6.9/interfaces/GridFSBucketReadStreamOptionsWithRevision.html b/docs/6.9/interfaces/GridFSBucketReadStreamOptionsWithRevision.html new file mode 100644 index 0000000000..563b268a5d --- /dev/null +++ b/docs/6.9/interfaces/GridFSBucketReadStreamOptionsWithRevision.html @@ -0,0 +1,12 @@ +GridFSBucketReadStreamOptionsWithRevision | mongodb

Interface GridFSBucketReadStreamOptionsWithRevision

interface GridFSBucketReadStreamOptionsWithRevision {
    end?: number;
    revision?: number;
    skip?: number;
    sort?: Sort;
    start?: number;
}

Hierarchy (view full)

Properties

Properties

end?: number

0-indexed non-negative byte offset to the end of the file contents +to be returned by the stream. end is non-inclusive

+
revision?: number

The revision number relative to the oldest file with the given filename. 0 +gets you the oldest file, 1 gets you the 2nd oldest, -1 gets you the +newest.

+
skip?: number
sort?: Sort
start?: number

0-indexed non-negative byte offset from the beginning of the file

+
diff --git a/docs/6.9/interfaces/GridFSBucketWriteStreamOptions.html b/docs/6.9/interfaces/GridFSBucketWriteStreamOptions.html new file mode 100644 index 0000000000..06adb9f7b0 --- /dev/null +++ b/docs/6.9/interfaces/GridFSBucketWriteStreamOptions.html @@ -0,0 +1,15 @@ +GridFSBucketWriteStreamOptions | mongodb

Interface GridFSBucketWriteStreamOptions

interface GridFSBucketWriteStreamOptions {
    aliases?: string[];
    chunkSizeBytes?: number;
    contentType?: string;
    id?: ObjectId;
    metadata?: Document;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

aliases?: string[]

Array of strings to store in the file document's aliases field.

+

Will be removed in the next major version. Add an aliases field to the metadata document instead.

+
chunkSizeBytes?: number

Overwrite this bucket's chunkSizeBytes for this file

+
contentType?: string

String to store in the file document's contentType field.

+

Will be removed in the next major version. Add a contentType field to the metadata document instead.

+

Custom file id for the GridFS file.

+
metadata?: Document

Object to store in the file document's metadata field

+

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/GridFSChunk.html b/docs/6.9/interfaces/GridFSChunk.html new file mode 100644 index 0000000000..3c00263ce3 --- /dev/null +++ b/docs/6.9/interfaces/GridFSChunk.html @@ -0,0 +1,5 @@ +GridFSChunk | mongodb

Interface GridFSChunk

interface GridFSChunk {
    _id: ObjectId;
    data: Uint8Array | Buffer;
    files_id: ObjectId;
    n: number;
}

Properties

Properties

data: Uint8Array | Buffer
files_id: ObjectId
n: number
diff --git a/docs/6.9/interfaces/GridFSFile.html b/docs/6.9/interfaces/GridFSFile.html new file mode 100644 index 0000000000..653f24a733 --- /dev/null +++ b/docs/6.9/interfaces/GridFSFile.html @@ -0,0 +1,11 @@ +GridFSFile | mongodb

Interface GridFSFile

interface GridFSFile {
    _id: ObjectId;
    aliases?: string[];
    chunkSize: number;
    contentType?: string;
    filename: string;
    length: number;
    metadata?: Document;
    uploadDate: Date;
}

Properties

aliases?: string[]

Will be removed in the next major version.

+
chunkSize: number
contentType?: string

Will be removed in the next major version.

+
filename: string
length: number
metadata?: Document
uploadDate: Date
diff --git a/docs/6.9/interfaces/HedgeOptions.html b/docs/6.9/interfaces/HedgeOptions.html new file mode 100644 index 0000000000..2b0da270fc --- /dev/null +++ b/docs/6.9/interfaces/HedgeOptions.html @@ -0,0 +1,3 @@ +HedgeOptions | mongodb

Interface HedgeOptions

interface HedgeOptions {
    enabled?: boolean;
}

Properties

Properties

enabled?: boolean

Explicitly enable or disable hedged reads.

+
diff --git a/docs/6.9/interfaces/IdPInfo.html b/docs/6.9/interfaces/IdPInfo.html new file mode 100644 index 0000000000..6eae78e2c9 --- /dev/null +++ b/docs/6.9/interfaces/IdPInfo.html @@ -0,0 +1,10 @@ +IdPInfo | mongodb

Interface IdPInfo

The information returned by the server on the IDP server.

+
interface IdPInfo {
    clientId: string;
    issuer: string;
    requestScopes?: string[];
}

Properties

clientId: string

A unique client ID for this OIDC client.

+
issuer: string

A URL which describes the Authentication Server. This identifier should +be the iss of provided access tokens, and be viable for RFC8414 metadata +discovery and RFC9207 identification.

+
requestScopes?: string[]

A list of additional scopes to request from IdP.

+
diff --git a/docs/6.9/interfaces/IdPServerResponse.html b/docs/6.9/interfaces/IdPServerResponse.html new file mode 100644 index 0000000000..802863d755 --- /dev/null +++ b/docs/6.9/interfaces/IdPServerResponse.html @@ -0,0 +1,9 @@ +IdPServerResponse | mongodb

Interface IdPServerResponse

The response from the IdP server with the access token and +optional expiration time and refresh token.

+
interface IdPServerResponse {
    accessToken: string;
    expiresInSeconds?: number;
    refreshToken?: string;
}

Properties

accessToken: string

The OIDC access token.

+
expiresInSeconds?: number

The time when the access token expires. For future use.

+
refreshToken?: string

The refresh token, if applicable, to be used by the callback to request a new token from the issuer.

+
diff --git a/docs/6.9/interfaces/IndexDescription.html b/docs/6.9/interfaces/IndexDescription.html new file mode 100644 index 0000000000..c9a6b29ebf --- /dev/null +++ b/docs/6.9/interfaces/IndexDescription.html @@ -0,0 +1,32 @@ +IndexDescription | mongodb

Interface IndexDescription

interface IndexDescription {
    2dsphereIndexVersion?: number;
    background?: boolean;
    bits?: number;
    bucketSize?: number;
    collation?: CollationOptions;
    default_language?: string;
    expireAfterSeconds?: number;
    hidden?: boolean;
    key: {
        [key: string]: IndexDirection;
    } | Map<string, IndexDirection>;
    language_override?: string;
    max?: number;
    min?: number;
    name?: string;
    partialFilterExpression?: Document;
    sparse?: boolean;
    storageEngine?: Document;
    textIndexVersion?: number;
    unique?: boolean;
    version?: number;
    weights?: Document;
    wildcardProjection?: Document;
}

Hierarchy

  • Pick<CreateIndexesOptions,
        | "background"
        | "unique"
        | "partialFilterExpression"
        | "sparse"
        | "hidden"
        | "expireAfterSeconds"
        | "storageEngine"
        | "version"
        | "weights"
        | "default_language"
        | "language_override"
        | "textIndexVersion"
        | "2dsphereIndexVersion"
        | "bits"
        | "min"
        | "max"
        | "bucketSize"
        | "wildcardProjection">
    • IndexDescription

Properties

2dsphereIndexVersion?: number
background?: boolean

Creates the index in the background, yielding whenever possible.

+
bits?: number
bucketSize?: number
collation?: CollationOptions
default_language?: string
expireAfterSeconds?: number

Allows you to expire data on indexes applied to a data (MongoDB 2.2 or higher)

+
hidden?: boolean

Specifies that the index should exist on the target collection but should not be used by the query planner when executing operations. (MongoDB 4.4 or higher)

+
key: {
    [key: string]: IndexDirection;
} | Map<string, IndexDirection>
language_override?: string
max?: number

For geospatial indexes set the high bound for the co-ordinates.

+
min?: number

For geospatial indexes set the lower bound for the co-ordinates.

+
name?: string
partialFilterExpression?: Document

Creates a partial index based on the given filter object (MongoDB 3.2 or higher)

+
sparse?: boolean

Creates a sparse index.

+
storageEngine?: Document

Allows users to configure the storage engine on a per-index basis when creating an index. (MongoDB 3.0 or higher)

+
textIndexVersion?: number
unique?: boolean

Creates an unique index.

+
version?: number

Specifies the index version number, either 0 or 1.

+
weights?: Document
wildcardProjection?: Document
diff --git a/docs/6.9/interfaces/IndexInformationOptions.html b/docs/6.9/interfaces/IndexInformationOptions.html new file mode 100644 index 0000000000..c02dbbe1d8 --- /dev/null +++ b/docs/6.9/interfaces/IndexInformationOptions.html @@ -0,0 +1,82 @@ +IndexInformationOptions | mongodb

Interface IndexInformationOptions

interface IndexInformationOptions {
    awaitData?: boolean;
    batchSize?: number;
    bsonRegExp?: boolean;
    checkKeys?: boolean;
    comment?: unknown;
    enableUtf8Validation?: boolean;
    fieldsAsRaw?: Document;
    full?: boolean;
    ignoreUndefined?: boolean;
    maxAwaitTimeMS?: number;
    maxTimeMS?: number;
    noCursorTimeout?: boolean;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    serializeFunctions?: boolean;
    session?: ClientSession;
    tailable?: boolean;
    useBigInt64?: boolean;
}

Hierarchy (view full)

Properties

awaitData?: boolean

If awaitData is set to true, when the cursor reaches the end of the capped collection, +MongoDB blocks the query thread for a period of time waiting for new data to arrive. +When new data is inserted into the capped collection, the blocked thread is signaled +to wake up and return the next batch to the client.

+
batchSize?: number

Specifies the number of documents to return in each response from MongoDB

+
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
full?: boolean

When true, an array of index descriptions is returned. +When false, the driver returns an object that with keys corresponding to index names with values +corresponding to the entries of the indexes' key.

+

For example, the given the following indexes:

+
[ { name: 'a_1', key: { a: 1 } }, { name: 'b_1_c_1' , key: { b: 1, c: 1 } }]
+
+ +

When full is true, the above array is returned. When full is false, the following is returned:

+
{
'a_1': [['a', 1]],
'b_1_c_1': [['b', 1], ['c', 1]],
} +
+ +
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
maxAwaitTimeMS?: number

When applicable maxAwaitTimeMS controls the amount of time subsequent getMores +that a cursor uses to fetch more data should take. (ex. cursor.next())

+
maxTimeMS?: number

When applicable maxTimeMS controls the amount of time the initial command +that constructs a cursor should take. (ex. find, aggregate, listCollections)

+
noCursorTimeout?: boolean
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike
readPreference?: ReadPreferenceLike
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession
tailable?: boolean

By default, MongoDB will automatically close a cursor when the +client has exhausted all results in the cursor. However, for capped collections +you may use a Tailable Cursor that remains open after the client exhausts +the results in the initial cursor.

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
diff --git a/docs/6.9/interfaces/InsertManyResult.html b/docs/6.9/interfaces/InsertManyResult.html new file mode 100644 index 0000000000..1d790070ce --- /dev/null +++ b/docs/6.9/interfaces/InsertManyResult.html @@ -0,0 +1,7 @@ +InsertManyResult | mongodb

Interface InsertManyResult<TSchema>

interface InsertManyResult<TSchema> {
    acknowledged: boolean;
    insertedCount: number;
    insertedIds: {
        [key: number]: InferIdType<TSchema>;
    };
}

Type Parameters

Properties

acknowledged: boolean

Indicates whether this write result was acknowledged. If not, then all other members of this result will be undefined

+
insertedCount: number

The number of inserted documents for this operations

+
insertedIds: {
    [key: number]: InferIdType<TSchema>;
}

Map of the index of the inserted document to the id of the inserted document

+
diff --git a/docs/6.9/interfaces/InsertOneModel.html b/docs/6.9/interfaces/InsertOneModel.html new file mode 100644 index 0000000000..0aa9533b4f --- /dev/null +++ b/docs/6.9/interfaces/InsertOneModel.html @@ -0,0 +1,3 @@ +InsertOneModel | mongodb

Interface InsertOneModel<TSchema>

interface InsertOneModel<TSchema> {
    document: OptionalId<TSchema>;
}

Type Parameters

Properties

Properties

document: OptionalId<TSchema>

The document to insert.

+
diff --git a/docs/6.9/interfaces/InsertOneOptions.html b/docs/6.9/interfaces/InsertOneOptions.html new file mode 100644 index 0000000000..86e4601ac6 --- /dev/null +++ b/docs/6.9/interfaces/InsertOneOptions.html @@ -0,0 +1,72 @@ +InsertOneOptions | mongodb

Interface InsertOneOptions

interface InsertOneOptions {
    authdb?: string;
    bsonRegExp?: boolean;
    bypassDocumentValidation?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    dbName?: string;
    enableUtf8Validation?: boolean;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    forceServerObjectId?: boolean;
    ignoreUndefined?: boolean;
    maxTimeMS?: number;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    serializeFunctions?: boolean;
    session?: ClientSession;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

authdb?: string
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
bypassDocumentValidation?: boolean

Allow driver to bypass schema validation.

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Collation

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
forceServerObjectId?: boolean

Force server to assign _id values instead of driver.

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
maxTimeMS?: number
noResponse?: boolean
omitReadPreference?: boolean
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/InsertOneResult.html b/docs/6.9/interfaces/InsertOneResult.html new file mode 100644 index 0000000000..fb18eedd71 --- /dev/null +++ b/docs/6.9/interfaces/InsertOneResult.html @@ -0,0 +1,5 @@ +InsertOneResult | mongodb

Interface InsertOneResult<TSchema>

interface InsertOneResult<TSchema> {
    acknowledged: boolean;
    insertedId: InferIdType<TSchema>;
}

Type Parameters

Properties

acknowledged: boolean

Indicates whether this write result was acknowledged. If not, then all other members of this result will be undefined

+
insertedId: InferIdType<TSchema>

The identifier that was inserted. If the server generated the identifier, this value will be null as the driver does not have access to that data

+
diff --git a/docs/6.9/interfaces/KMIPEncryptionKeyOptions.html b/docs/6.9/interfaces/KMIPEncryptionKeyOptions.html new file mode 100644 index 0000000000..2eea6bc3bf --- /dev/null +++ b/docs/6.9/interfaces/KMIPEncryptionKeyOptions.html @@ -0,0 +1,10 @@ +KMIPEncryptionKeyOptions | mongodb

Interface KMIPEncryptionKeyOptions

Configuration options for making a KMIP encryption key

+
interface KMIPEncryptionKeyOptions {
    delegated?: boolean;
    endpoint?: string;
    keyId?: string;
}

Properties

delegated?: boolean

If true, this key should be decrypted by the KMIP server.

+

Requires mongodb-client-encryption>=6.0.1.

+
endpoint?: string

Host with optional port.

+
keyId?: string

keyId is the KMIP Unique Identifier to a 96 byte KMIP Secret Data managed object.

+

If keyId is omitted, a random 96 byte KMIP Secret Data managed object will be created.

+
diff --git a/docs/6.9/interfaces/KMIPKMSProviderConfiguration.html b/docs/6.9/interfaces/KMIPKMSProviderConfiguration.html new file mode 100644 index 0000000000..e650ec9f31 --- /dev/null +++ b/docs/6.9/interfaces/KMIPKMSProviderConfiguration.html @@ -0,0 +1,5 @@ +KMIPKMSProviderConfiguration | mongodb

Interface KMIPKMSProviderConfiguration

interface KMIPKMSProviderConfiguration {
    endpoint?: string;
}

Properties

Properties

endpoint?: string

The output endpoint string. +The endpoint consists of a hostname and port separated by a colon. +E.g. "example.com:123". A port is always present.

+
diff --git a/docs/6.9/interfaces/KMSProviders.html b/docs/6.9/interfaces/KMSProviders.html new file mode 100644 index 0000000000..77f7c72052 --- /dev/null +++ b/docs/6.9/interfaces/KMSProviders.html @@ -0,0 +1,13 @@ +KMSProviders | mongodb

Interface KMSProviders

Configuration options that are used by specific KMS providers during key generation, encryption, and decryption.

+

Named KMS providers are not supported for automatic KMS credential fetching.

+
interface KMSProviders {
    aws?: AWSKMSProviderConfiguration | Record<string, never>;
    azure?: AzureKMSProviderConfiguration | Record<string, never>;
    gcp?: GCPKMSProviderConfiguration | Record<string, never>;
    kmip?: KMIPKMSProviderConfiguration;
    local?: LocalKMSProviderConfiguration;
    [key: `aws:${string}`]: AWSKMSProviderConfiguration;
    [key: `local:${string}`]: LocalKMSProviderConfiguration;
    [key: `kmip:${string}`]: KMIPKMSProviderConfiguration;
    [key: `azure:${string}`]: AzureKMSProviderConfiguration;
    [key: `gcp:${string}`]: GCPKMSProviderConfiguration;
}

Indexable

Properties

Properties

aws?: AWSKMSProviderConfiguration | Record<string, never>

Configuration options for using 'aws' as your KMS provider

+
azure?: AzureKMSProviderConfiguration | Record<string, never>

Configuration options for using 'azure' as your KMS provider

+
gcp?: GCPKMSProviderConfiguration | Record<string, never>

Configuration options for using 'gcp' as your KMS provider

+

Configuration options for using 'kmip' as your KMS provider

+

Configuration options for using 'local' as your KMS provider

+
diff --git a/docs/6.9/interfaces/ListCollectionsOptions.html b/docs/6.9/interfaces/ListCollectionsOptions.html new file mode 100644 index 0000000000..abfc6bdbf1 --- /dev/null +++ b/docs/6.9/interfaces/ListCollectionsOptions.html @@ -0,0 +1,72 @@ +ListCollectionsOptions | mongodb

Interface ListCollectionsOptions

interface ListCollectionsOptions {
    authdb?: string;
    authorizedCollections?: boolean;
    batchSize?: number;
    bsonRegExp?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    dbName?: string;
    enableUtf8Validation?: boolean;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    ignoreUndefined?: boolean;
    maxTimeMS?: number;
    nameOnly?: boolean;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    serializeFunctions?: boolean;
    session?: ClientSession;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
}

Hierarchy

Properties

authdb?: string
authorizedCollections?: boolean

Since 4.0: If true and nameOnly is true, allows a user without the required privilege (i.e. listCollections action on the database) to run the command when access control is enforced.

+
batchSize?: number

The batchSize for the returned command cursor or if pre 2.8 the systems batch collection

+
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Collation

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
maxTimeMS?: number
nameOnly?: boolean

Since 4.0: If true, will only return the collection name in the response, and will omit additional info

+
noResponse?: boolean
omitReadPreference?: boolean
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean
diff --git a/docs/6.9/interfaces/ListDatabasesOptions.html b/docs/6.9/interfaces/ListDatabasesOptions.html new file mode 100644 index 0000000000..001d48c3e3 --- /dev/null +++ b/docs/6.9/interfaces/ListDatabasesOptions.html @@ -0,0 +1,74 @@ +ListDatabasesOptions | mongodb

Interface ListDatabasesOptions

interface ListDatabasesOptions {
    authdb?: string;
    authorizedDatabases?: boolean;
    bsonRegExp?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    dbName?: string;
    enableUtf8Validation?: boolean;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    filter?: Document;
    ignoreUndefined?: boolean;
    maxTimeMS?: number;
    nameOnly?: boolean;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    serializeFunctions?: boolean;
    session?: ClientSession;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

authdb?: string
authorizedDatabases?: boolean

A flag that determines which databases are returned based on the user privileges when access control is enabled

+
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Collation

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
filter?: Document

A query predicate that determines which databases are listed

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
maxTimeMS?: number
nameOnly?: boolean

A flag to indicate whether the command should return just the database names, or return both database names and size information

+
noResponse?: boolean
omitReadPreference?: boolean
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/ListDatabasesResult.html b/docs/6.9/interfaces/ListDatabasesResult.html new file mode 100644 index 0000000000..c6f9c72a43 --- /dev/null +++ b/docs/6.9/interfaces/ListDatabasesResult.html @@ -0,0 +1,5 @@ +ListDatabasesResult | mongodb

Interface ListDatabasesResult

interface ListDatabasesResult {
    databases: ({
        empty?: boolean;
        name: string;
        sizeOnDisk?: number;
    } & Document)[];
    ok: 0 | 1;
    totalSize?: number;
    totalSizeMb?: number;
}

Properties

databases: ({
    empty?: boolean;
    name: string;
    sizeOnDisk?: number;
} & Document)[]
ok: 0 | 1
totalSize?: number
totalSizeMb?: number
diff --git a/docs/6.9/interfaces/LocalKMSProviderConfiguration.html b/docs/6.9/interfaces/LocalKMSProviderConfiguration.html new file mode 100644 index 0000000000..8c83d0f900 --- /dev/null +++ b/docs/6.9/interfaces/LocalKMSProviderConfiguration.html @@ -0,0 +1,4 @@ +LocalKMSProviderConfiguration | mongodb

Interface LocalKMSProviderConfiguration

interface LocalKMSProviderConfiguration {
    key: string | Uint8Array | Binary;
}

Properties

key +

Properties

key: string | Uint8Array | Binary

The master key used to encrypt/decrypt data keys. +A 96-byte long Buffer or base64 encoded string.

+
diff --git a/docs/6.9/interfaces/ModifyResult.html b/docs/6.9/interfaces/ModifyResult.html new file mode 100644 index 0000000000..738f6f5d8e --- /dev/null +++ b/docs/6.9/interfaces/ModifyResult.html @@ -0,0 +1,4 @@ +ModifyResult | mongodb

Interface ModifyResult<TSchema>

interface ModifyResult<TSchema> {
    lastErrorObject?: Document;
    ok: 0 | 1;
    value: null | WithId<TSchema>;
}

Type Parameters

Properties

Properties

lastErrorObject?: Document
ok: 0 | 1
value: null | WithId<TSchema>
diff --git a/docs/6.9/interfaces/MongoClientOptions.html b/docs/6.9/interfaces/MongoClientOptions.html new file mode 100644 index 0000000000..c31a6343f9 --- /dev/null +++ b/docs/6.9/interfaces/MongoClientOptions.html @@ -0,0 +1,273 @@ +MongoClientOptions | mongodb

Interface MongoClientOptions

Describes all possible URI query options for the mongo client

+
interface MongoClientOptions {
    allowPartialTrustChain?: boolean;
    ALPNProtocols?: Uint8Array | string[] | Uint8Array[];
    appName?: string;
    auth?: Auth;
    authMechanism?: AuthMechanism;
    authMechanismProperties?: AuthMechanismProperties;
    authSource?: string;
    autoEncryption?: AutoEncryptionOptions;
    autoSelectFamily?: boolean;
    autoSelectFamilyAttemptTimeout?: number;
    bsonRegExp?: boolean;
    ca?: string | Buffer | (string | Buffer)[];
    cert?: string | Buffer | (string | Buffer)[];
    checkKeys?: boolean;
    checkServerIdentity?: ((hostname: string, cert: PeerCertificate) => Error | undefined);
    ciphers?: string;
    compressors?: string | (
        | "none"
        | "snappy"
        | "zlib"
        | "zstd")[];
    connectTimeoutMS?: number;
    crl?: string | Buffer | (string | Buffer)[];
    directConnection?: boolean;
    driverInfo?: DriverInfo;
    ecdhCurve?: string;
    enableUtf8Validation?: boolean;
    family?: number;
    fieldsAsRaw?: Document;
    forceServerObjectId?: boolean;
    heartbeatFrequencyMS?: number;
    hints?: number;
    ignoreUndefined?: boolean;
    journal?: boolean;
    key?: string | Buffer | (string | Buffer | KeyObject)[];
    loadBalanced?: boolean;
    localAddress?: string;
    localPort?: number;
    localThresholdMS?: number;
    lookup?: LookupFunction;
    maxConnecting?: number;
    maxIdleTimeMS?: number;
    maxPoolSize?: number;
    maxStalenessSeconds?: number;
    minDHSize?: number;
    minHeartbeatFrequencyMS?: number;
    minPoolSize?: number;
    monitorCommands?: boolean;
    noDelay?: boolean;
    passphrase?: string;
    pfx?: string | Buffer | (string | Buffer | PxfObject)[];
    pkFactory?: PkFactory;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    proxyHost?: string;
    proxyPassword?: string;
    proxyPort?: number;
    proxyUsername?: string;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readConcernLevel?: ReadConcernLevel;
    readPreference?: ReadPreference | ReadPreferenceMode;
    readPreferenceTags?: TagSet[];
    rejectUnauthorized?: boolean;
    replicaSet?: string;
    retryReads?: boolean;
    retryWrites?: boolean;
    secureContext?: SecureContext;
    secureProtocol?: string;
    serializeFunctions?: boolean;
    serverApi?: "1" | ServerApi;
    serverMonitoringMode?: ServerMonitoringMode;
    servername?: string;
    serverSelectionTimeoutMS?: number;
    session?: Buffer;
    socketTimeoutMS?: number;
    srvMaxHosts?: number;
    srvServiceName?: string;
    ssl?: boolean;
    tls?: boolean;
    tlsAllowInvalidCertificates?: boolean;
    tlsAllowInvalidHostnames?: boolean;
    tlsCAFile?: string;
    tlsCertificateKeyFile?: string;
    tlsCertificateKeyFilePassword?: string;
    tlsCRLFile?: string;
    tlsInsecure?: boolean;
    useBigInt64?: boolean;
    w?: W;
    waitQueueTimeoutMS?: number;
    writeConcern?: WriteConcern | WriteConcernSettings;
    wtimeoutMS?: number;
    zlibCompressionLevel?:
        | 0
        | 5
        | 1
        | 3
        | 9
        | 4
        | 6
        | 2
        | 8
        | 7;
}

Hierarchy (view full)

Properties

allowPartialTrustChain?: boolean
ALPNProtocols?: Uint8Array | string[] | Uint8Array[]

An array of strings or a Buffer naming possible ALPN protocols. +(Protocols should be ordered by their priority.)

+
appName?: string

The name of the application that created this MongoClient instance. MongoDB 3.4 and newer will print this value in the server log upon establishing each connection. It is also recorded in the slow query log and profile collections

+
auth?: Auth

The auth settings for when connection to server.

+
authMechanism?: AuthMechanism

Specify the authentication mechanism that MongoDB will use to authenticate the connection.

+
authMechanismProperties?: AuthMechanismProperties

Specify properties for the specified authMechanism as a comma-separated list of colon-separated key-value pairs.

+
authSource?: string

Specify the database name associated with the user’s credentials.

+
autoEncryption?: AutoEncryptionOptions

Optionally enable in-use auto encryption

+

Automatic encryption is an enterprise only feature that only applies to operations on a collection. Automatic encryption is not supported for operations on a database or view, and operations that are not bypassed will result in error +(see libmongocrypt: Auto Encryption Allow-List). To bypass automatic encryption for all operations, set bypassAutoEncryption=true in AutoEncryptionOpts.

+

Automatic encryption requires the authenticated user to have the listCollections privilege action.

+

If a MongoClient with a limited connection pool size (i.e a non-zero maxPoolSize) is configured with AutoEncryptionOptions, a separate internal MongoClient is created if any of the following are true:

+
    +
  • AutoEncryptionOptions.keyVaultClient is not passed.
  • +
  • AutoEncryptionOptions.bypassAutomaticEncryption is false.
  • +
+

If an internal MongoClient is created, it is configured with the same options as the parent MongoClient except minPoolSize is set to 0 and AutoEncryptionOptions is omitted.

+
autoSelectFamily?: boolean

v18.13.0

+
autoSelectFamilyAttemptTimeout?: number

v18.13.0

+
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
ca?: string | Buffer | (string | Buffer)[]

Optionally override the trusted CA certificates. Default is to trust +the well-known CAs curated by Mozilla. Mozilla's CAs are completely +replaced when CAs are explicitly specified using this option.

+
cert?: string | Buffer | (string | Buffer)[]

Cert chains in PEM format. One cert chain should be provided per +private key. Each cert chain should consist of the PEM formatted +certificate for a provided private key, followed by the PEM +formatted intermediate certificates (if any), in order, and not +including the root CA (the root CA must be pre-known to the peer, +see ca). When providing multiple cert chains, they do not have to +be in the same order as their private keys in key. If the +intermediate certificates are not provided, the peer will not be +able to validate the certificate, and the handshake will fail.

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
checkServerIdentity?: ((hostname: string, cert: PeerCertificate) => Error | undefined)

Type declaration

    • (hostname, cert): Error | undefined
    • Verifies the certificate cert is issued to hostname.

      +

      Returns Error object, populating it with reason, host, and cert on +failure. On success, returns undefined.

      +

      This function is intended to be used in combination with thecheckServerIdentity option that can be passed to connect and as +such operates on a certificate object. For other purposes, consider using x509.checkHost() instead.

      +

      This function can be overwritten by providing an alternative function as the options.checkServerIdentity option that is passed to tls.connect(). The +overwriting function can call tls.checkServerIdentity() of course, to augment +the checks done with additional verification.

      +

      This function is only called if the certificate passed all other checks, such as +being issued by trusted CA (options.ca).

      +

      Earlier versions of Node.js incorrectly accepted certificates for a givenhostname if a matching uniformResourceIdentifier subject alternative name +was present (see CVE-2021-44531). Applications that wish to acceptuniformResourceIdentifier subject alternative names can use +a custom options.checkServerIdentity function that implements the desired behavior.

      +

      Parameters

      • hostname: string

        The host name or IP address to verify the certificate against.

        +
      • cert: PeerCertificate

        A certificate object representing the peer's certificate.

        +

      Returns Error | undefined

      v0.8.4

      +
ciphers?: string

Cipher suite specification, replacing the default. For more +information, see modifying the default cipher suite. Permitted +ciphers can be obtained via tls.getCiphers(). Cipher names must be +uppercased in order for OpenSSL to accept them.

+
compressors?: string | (
    | "none"
    | "snappy"
    | "zlib"
    | "zstd")[]

An array or comma-delimited string of compressors to enable network compression for communication between this client and a mongod/mongos instance.

+
connectTimeoutMS?: number

The time in milliseconds to attempt a connection before timing out.

+
crl?: string | Buffer | (string | Buffer)[]

PEM formatted CRLs (Certificate Revocation Lists).

+
directConnection?: boolean

Allow a driver to force a Single topology type with a connection string containing one host

+
driverInfo?: DriverInfo

Allows a wrapping driver to amend the client metadata generated by the driver to include information about the wrapping driver

+
ecdhCurve?: string

A string describing a named curve or a colon separated list of curve +NIDs or names, for example P-521:P-384:P-256, to use for ECDH key +agreement. Set to auto to select the curve automatically. Use +crypto.getCurves() to obtain a list of available curve names. On +recent releases, openssl ecparam -list_curves will also display the +name and description of each available elliptic curve. Default: +tls.DEFAULT_ECDH_CURVE.

+
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+
family?: number
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
forceServerObjectId?: boolean

Force server to assign _id values instead of driver

+
heartbeatFrequencyMS?: number

heartbeatFrequencyMS controls when the driver checks the state of the MongoDB deployment. Specify the interval (in milliseconds) between checks, counted from the end of the previous check until the beginning of the next one.

+
hints?: number
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
journal?: boolean

The journal write concern

+

Please use the writeConcern option instead

+
key?: string | Buffer | (string | Buffer | KeyObject)[]

Private keys in PEM format. PEM allows the option of private keys +being encrypted. Encrypted keys will be decrypted with +options.passphrase. Multiple keys using different algorithms can be +provided either as an array of unencrypted key strings or buffers, +or an array of objects in the form {pem: <string|buffer>[, +passphrase: ]}. The object form can only occur in an array. +object.passphrase is optional. Encrypted keys will be decrypted with +object.passphrase if provided, or options.passphrase if it is not.

+
loadBalanced?: boolean

Instruct the driver it is connecting to a load balancer fronting a mongos like service

+
localAddress?: string
localPort?: number
localThresholdMS?: number

The size (in milliseconds) of the latency window for selecting among multiple suitable MongoDB instances.

+
lookup?: LookupFunction
maxConnecting?: number

The maximum number of connections that may be in the process of being established concurrently by the connection pool.

+
maxIdleTimeMS?: number

The maximum number of milliseconds that a connection can remain idle in the pool before being removed and closed.

+
maxPoolSize?: number

The maximum number of connections in the connection pool.

+
maxStalenessSeconds?: number

Specifies, in seconds, how stale a secondary can be before the client stops using it for read operations.

+
minDHSize?: number
minHeartbeatFrequencyMS?: number

Sets the minimum heartbeat frequency. In the event that the driver has to frequently re-check a server's availability, it will wait at least this long since the previous check to avoid wasted effort.

+
minPoolSize?: number

The minimum number of connections in the connection pool.

+
monitorCommands?: boolean

Enable command monitoring for this client

+
noDelay?: boolean

TCP Connection no delay

+
passphrase?: string

Shared passphrase used for a single private key and/or a PFX.

+
pfx?: string | Buffer | (string | Buffer | PxfObject)[]

PFX or PKCS12 encoded private key and certificate chain. pfx is an +alternative to providing key and cert individually. PFX is usually +encrypted, if it is, passphrase will be used to decrypt it. Multiple +PFX can be provided either as an array of unencrypted PFX buffers, +or an array of objects in the form {buf: <string|buffer>[, +passphrase: ]}. The object form can only occur in an array. +object.passphrase is optional. Encrypted PFX will be decrypted with +object.passphrase if provided, or options.passphrase if it is not.

+
pkFactory?: PkFactory

A primary key factory function for generation of custom _id keys

+
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
proxyHost?: string

Configures a Socks5 proxy host used for creating TCP connections.

+
proxyPassword?: string

Configures a Socks5 proxy password when the proxy in proxyHost requires username/password authentication.

+
proxyPort?: number

Configures a Socks5 proxy port used for creating TCP connections.

+
proxyUsername?: string

Configures a Socks5 proxy username when the proxy in proxyHost requires username/password authentication.

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern for the collection (only MongoDB 3.2 or higher supported)

+
readConcernLevel?: ReadConcernLevel

The level of isolation

+

Specifies the read preferences for this connection

+
readPreferenceTags?: TagSet[]

Specifies the tags document as a comma-separated list of colon-separated key-value pairs.

+
rejectUnauthorized?: boolean

If true the server will reject any connection which is not +authorized with the list of supplied CAs. This option only has an +effect if requestCert is true.

+
true
+
+ +
replicaSet?: string

Specifies the name of the replica set, if the mongod is a member of a replica set.

+
retryReads?: boolean

Enables retryable reads.

+
retryWrites?: boolean

Enable retryable writes.

+
secureContext?: SecureContext

An optional TLS context object from tls.createSecureContext()

+
secureProtocol?: string

Legacy mechanism to select the TLS protocol version to use, it does +not support independent control of the minimum and maximum version, +and does not support limiting the protocol to TLSv1.3. Use +minVersion and maxVersion instead. The possible values are listed as +SSL_METHODS, use the function names as strings. For example, use +'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow +any TLS protocol version up to TLSv1.3. It is not recommended to use +TLS versions less than 1.2, but it may be required for +interoperability. Default: none, see minVersion.

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
serverApi?: "1" | ServerApi

Server API version

+
serverMonitoringMode?: ServerMonitoringMode

Instructs the driver monitors to use a specific monitoring mode

+
servername?: string
serverSelectionTimeoutMS?: number

Specifies how long (in milliseconds) to block for server selection before throwing an exception.

+
session?: Buffer

An optional Buffer instance containing a TLS session.

+
socketTimeoutMS?: number

The time in milliseconds to attempt a send or receive on a socket before the attempt times out.

+
srvMaxHosts?: number

The maximum number of hosts to connect to when using an srv connection string, a setting of 0 means unlimited hosts

+
srvServiceName?: string

Modifies the srv URI to look like:

+

_{srvServiceName}._tcp.{hostname}.{domainname}

+

Querying this DNS URI is expected to respond with SRV records

+
ssl?: boolean

A boolean to enable or disables TLS/SSL for the connection. (The ssl option is equivalent to the tls option.)

+
tls?: boolean

Enables or disables TLS/SSL for the connection.

+
tlsAllowInvalidCertificates?: boolean

Bypasses validation of the certificates presented by the mongod/mongos instance

+
tlsAllowInvalidHostnames?: boolean

Disables hostname validation of the certificate presented by the mongod/mongos instance.

+
tlsCAFile?: string

Specifies the location of a local .pem file that contains the root certificate chain from the Certificate Authority. This file is used to validate the certificate presented by the mongod/mongos instance.

+
tlsCertificateKeyFile?: string

Specifies the location of a local .pem file that contains either the client's TLS/SSL certificate and key.

+
tlsCertificateKeyFilePassword?: string

Specifies the password to de-crypt the tlsCertificateKeyFile.

+
tlsCRLFile?: string

Specifies the location of a local CRL .pem file that contains the client revokation list.

+
tlsInsecure?: boolean

Disables various certificate validations.

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
w?: W

The write concern w value

+

Please use the writeConcern option instead

+
waitQueueTimeoutMS?: number

The maximum time in milliseconds that a thread can wait for a connection to become available.

+

A MongoDB WriteConcern, which describes the level of acknowledgement +requested from MongoDB for write operations.

+
wtimeoutMS?: number

The write concern timeout

+

Please use the writeConcern option instead

+
zlibCompressionLevel?:
    | 0
    | 5
    | 1
    | 3
    | 9
    | 4
    | 6
    | 2
    | 8
    | 7

An integer that specifies the compression level if using zlib for network compression.

+
diff --git a/docs/6.9/interfaces/MongoCredentialsOptions.html b/docs/6.9/interfaces/MongoCredentialsOptions.html new file mode 100644 index 0000000000..0062263007 --- /dev/null +++ b/docs/6.9/interfaces/MongoCredentialsOptions.html @@ -0,0 +1,7 @@ +MongoCredentialsOptions | mongodb

Interface MongoCredentialsOptions

interface MongoCredentialsOptions {
    db?: string;
    mechanism?: AuthMechanism;
    mechanismProperties: AuthMechanismProperties;
    password: string;
    source: string;
    username?: string;
}

Properties

db?: string
mechanism?: AuthMechanism
mechanismProperties: AuthMechanismProperties
password: string
source: string
username?: string
diff --git a/docs/6.9/interfaces/MongoNetworkErrorOptions.html b/docs/6.9/interfaces/MongoNetworkErrorOptions.html new file mode 100644 index 0000000000..0e9c0d20b6 --- /dev/null +++ b/docs/6.9/interfaces/MongoNetworkErrorOptions.html @@ -0,0 +1,4 @@ +MongoNetworkErrorOptions | mongodb

Interface MongoNetworkErrorOptions

interface MongoNetworkErrorOptions {
    beforeHandshake?: boolean;
    cause?: Error;
}

Properties

beforeHandshake?: boolean

Indicates the timeout happened before a connection handshake completed

+
cause?: Error
diff --git a/docs/6.9/interfaces/MongoOptions.html b/docs/6.9/interfaces/MongoOptions.html new file mode 100644 index 0000000000..1f71741d0a --- /dev/null +++ b/docs/6.9/interfaces/MongoOptions.html @@ -0,0 +1,277 @@ +MongoOptions | mongodb

Interface MongoOptions

Parsed Mongo Client Options.

+

User supplied options are documented by MongoClientOptions.

+

NOTE: The client's options parsing is subject to change to support new features. +This type is provided to aid with inspection of options after parsing, it should not be relied upon programmatically.

+

Options are sourced from:

+
    +
  • connection string
  • +
  • options object passed to the MongoClient constructor
  • +
  • file system (ex. tls settings)
  • +
  • environment variables
  • +
  • DNS SRV records and TXT records
  • +
+

Not all options may be present after client construction as some are obtained from asynchronous operations.

+
interface MongoOptions {
    allowPartialTrustChain?: boolean;
    ALPNProtocols?: Uint8Array | string[] | Uint8Array[];
    appName?: string;
    autoEncryption: AutoEncryptionOptions;
    autoSelectFamily?: boolean;
    autoSelectFamilyAttemptTimeout?: number;
    ca?: string | Buffer | (string | Buffer)[];
    cert?: string | Buffer | (string | Buffer)[];
    checkServerIdentity?: ((hostname: string, cert: PeerCertificate) => Error | undefined);
    ciphers?: string;
    compressors: (
        | "none"
        | "snappy"
        | "zlib"
        | "zstd")[];
    connectTimeoutMS: number;
    credentials?: MongoCredentials;
    crl?: string | Buffer | (string | Buffer)[];
    dbName: string;
    directConnection: boolean;
    driverInfo: DriverInfo;
    ecdhCurve?: string;
    family?: number;
    forceServerObjectId: boolean;
    heartbeatFrequencyMS: number;
    hints?: number;
    hosts: HostAddress[];
    key?: string | Buffer | (string | Buffer | KeyObject)[];
    loadBalanced: boolean;
    localAddress?: string;
    localPort?: number;
    localThresholdMS: number;
    lookup?: LookupFunction;
    maxConnecting: number;
    maxIdleTimeMS: number;
    maxPoolSize: number;
    metadata: ClientMetadata;
    minDHSize?: number;
    minHeartbeatFrequencyMS: number;
    minPoolSize: number;
    monitorCommands: boolean;
    noDelay: boolean;
    passphrase?: string;
    pfx?: string | Buffer | (string | Buffer | PxfObject)[];
    pkFactory: PkFactory;
    proxyHost?: string;
    proxyPassword?: string;
    proxyPort?: number;
    proxyUsername?: string;
    raw: boolean;
    readConcern: ReadConcern;
    readPreference: ReadPreference;
    rejectUnauthorized?: boolean;
    replicaSet: string;
    retryReads: boolean;
    retryWrites: boolean;
    secureContext?: SecureContext;
    secureProtocol?: string;
    serverApi: ServerApi;
    serverMonitoringMode: ServerMonitoringMode;
    servername?: string;
    serverSelectionTimeoutMS: number;
    session?: Buffer;
    socketTimeoutMS: number;
    srvHost?: string;
    srvMaxHosts: number;
    srvServiceName: string;
    tls: boolean;
    tlsAllowInvalidCertificates: boolean;
    tlsAllowInvalidHostnames: boolean;
    tlsCAFile?: string;
    tlsCertificateKeyFile?: string;
    tlsCRLFile?: string;
    tlsInsecure: boolean;
    waitQueueTimeoutMS: number;
    writeConcern: WriteConcern;
    zlibCompressionLevel:
        | 0
        | 1
        | 2
        | 3
        | 4
        | 5
        | 6
        | 7
        | 8
        | 9;
}

Hierarchy (view full)

  • Required<Pick<MongoClientOptions,
        | "autoEncryption"
        | "connectTimeoutMS"
        | "directConnection"
        | "driverInfo"
        | "forceServerObjectId"
        | "minHeartbeatFrequencyMS"
        | "heartbeatFrequencyMS"
        | "localThresholdMS"
        | "maxConnecting"
        | "maxIdleTimeMS"
        | "maxPoolSize"
        | "minPoolSize"
        | "monitorCommands"
        | "noDelay"
        | "pkFactory"
        | "raw"
        | "replicaSet"
        | "retryReads"
        | "retryWrites"
        | "serverSelectionTimeoutMS"
        | "socketTimeoutMS"
        | "srvMaxHosts"
        | "srvServiceName"
        | "tlsAllowInvalidCertificates"
        | "tlsAllowInvalidHostnames"
        | "tlsInsecure"
        | "waitQueueTimeoutMS"
        | "zlibCompressionLevel">>
  • SupportedNodeConnectionOptions
    • MongoOptions

Properties

allowPartialTrustChain?: boolean
ALPNProtocols?: Uint8Array | string[] | Uint8Array[]

An array of strings or a Buffer naming possible ALPN protocols. +(Protocols should be ordered by their priority.)

+
appName?: string
autoEncryption: AutoEncryptionOptions

Optionally enable in-use auto encryption

+

Automatic encryption is an enterprise only feature that only applies to operations on a collection. Automatic encryption is not supported for operations on a database or view, and operations that are not bypassed will result in error +(see libmongocrypt: Auto Encryption Allow-List). To bypass automatic encryption for all operations, set bypassAutoEncryption=true in AutoEncryptionOpts.

+

Automatic encryption requires the authenticated user to have the listCollections privilege action.

+

If a MongoClient with a limited connection pool size (i.e a non-zero maxPoolSize) is configured with AutoEncryptionOptions, a separate internal MongoClient is created if any of the following are true:

+
    +
  • AutoEncryptionOptions.keyVaultClient is not passed.
  • +
  • AutoEncryptionOptions.bypassAutomaticEncryption is false.
  • +
+

If an internal MongoClient is created, it is configured with the same options as the parent MongoClient except minPoolSize is set to 0 and AutoEncryptionOptions is omitted.

+
autoSelectFamily?: boolean

v18.13.0

+
autoSelectFamilyAttemptTimeout?: number

v18.13.0

+
ca?: string | Buffer | (string | Buffer)[]

Optionally override the trusted CA certificates. Default is to trust +the well-known CAs curated by Mozilla. Mozilla's CAs are completely +replaced when CAs are explicitly specified using this option.

+
cert?: string | Buffer | (string | Buffer)[]

Cert chains in PEM format. One cert chain should be provided per +private key. Each cert chain should consist of the PEM formatted +certificate for a provided private key, followed by the PEM +formatted intermediate certificates (if any), in order, and not +including the root CA (the root CA must be pre-known to the peer, +see ca). When providing multiple cert chains, they do not have to +be in the same order as their private keys in key. If the +intermediate certificates are not provided, the peer will not be +able to validate the certificate, and the handshake will fail.

+
checkServerIdentity?: ((hostname: string, cert: PeerCertificate) => Error | undefined)

Type declaration

    • (hostname, cert): Error | undefined
    • Verifies the certificate cert is issued to hostname.

      +

      Returns Error object, populating it with reason, host, and cert on +failure. On success, returns undefined.

      +

      This function is intended to be used in combination with thecheckServerIdentity option that can be passed to connect and as +such operates on a certificate object. For other purposes, consider using x509.checkHost() instead.

      +

      This function can be overwritten by providing an alternative function as the options.checkServerIdentity option that is passed to tls.connect(). The +overwriting function can call tls.checkServerIdentity() of course, to augment +the checks done with additional verification.

      +

      This function is only called if the certificate passed all other checks, such as +being issued by trusted CA (options.ca).

      +

      Earlier versions of Node.js incorrectly accepted certificates for a givenhostname if a matching uniformResourceIdentifier subject alternative name +was present (see CVE-2021-44531). Applications that wish to acceptuniformResourceIdentifier subject alternative names can use +a custom options.checkServerIdentity function that implements the desired behavior.

      +

      Parameters

      • hostname: string

        The host name or IP address to verify the certificate against.

        +
      • cert: PeerCertificate

        A certificate object representing the peer's certificate.

        +

      Returns Error | undefined

      v0.8.4

      +
ciphers?: string

Cipher suite specification, replacing the default. For more +information, see modifying the default cipher suite. Permitted +ciphers can be obtained via tls.getCiphers(). Cipher names must be +uppercased in order for OpenSSL to accept them.

+
compressors: (
    | "none"
    | "snappy"
    | "zlib"
    | "zstd")[]
connectTimeoutMS: number

The time in milliseconds to attempt a connection before timing out.

+
credentials?: MongoCredentials
crl?: string | Buffer | (string | Buffer)[]

PEM formatted CRLs (Certificate Revocation Lists).

+
dbName: string
directConnection: boolean

Allow a driver to force a Single topology type with a connection string containing one host

+
driverInfo: DriverInfo

Allows a wrapping driver to amend the client metadata generated by the driver to include information about the wrapping driver

+
ecdhCurve?: string

A string describing a named curve or a colon separated list of curve +NIDs or names, for example P-521:P-384:P-256, to use for ECDH key +agreement. Set to auto to select the curve automatically. Use +crypto.getCurves() to obtain a list of available curve names. On +recent releases, openssl ecparam -list_curves will also display the +name and description of each available elliptic curve. Default: +tls.DEFAULT_ECDH_CURVE.

+
family?: number
forceServerObjectId: boolean

Force server to assign _id values instead of driver

+
heartbeatFrequencyMS: number

heartbeatFrequencyMS controls when the driver checks the state of the MongoDB deployment. Specify the interval (in milliseconds) between checks, counted from the end of the previous check until the beginning of the next one.

+
hints?: number
hosts: HostAddress[]
key?: string | Buffer | (string | Buffer | KeyObject)[]

Private keys in PEM format. PEM allows the option of private keys +being encrypted. Encrypted keys will be decrypted with +options.passphrase. Multiple keys using different algorithms can be +provided either as an array of unencrypted key strings or buffers, +or an array of objects in the form {pem: <string|buffer>[, +passphrase: ]}. The object form can only occur in an array. +object.passphrase is optional. Encrypted keys will be decrypted with +object.passphrase if provided, or options.passphrase if it is not.

+
loadBalanced: boolean
localAddress?: string
localPort?: number
localThresholdMS: number

The size (in milliseconds) of the latency window for selecting among multiple suitable MongoDB instances.

+
lookup?: LookupFunction
maxConnecting: number

The maximum number of connections that may be in the process of being established concurrently by the connection pool.

+
maxIdleTimeMS: number

The maximum number of milliseconds that a connection can remain idle in the pool before being removed and closed.

+
maxPoolSize: number

The maximum number of connections in the connection pool.

+
metadata: ClientMetadata
minDHSize?: number
minHeartbeatFrequencyMS: number

Sets the minimum heartbeat frequency. In the event that the driver has to frequently re-check a server's availability, it will wait at least this long since the previous check to avoid wasted effort.

+
minPoolSize: number

The minimum number of connections in the connection pool.

+
monitorCommands: boolean

Enable command monitoring for this client

+
noDelay: boolean

TCP Connection no delay

+
passphrase?: string

Shared passphrase used for a single private key and/or a PFX.

+
pfx?: string | Buffer | (string | Buffer | PxfObject)[]

PFX or PKCS12 encoded private key and certificate chain. pfx is an +alternative to providing key and cert individually. PFX is usually +encrypted, if it is, passphrase will be used to decrypt it. Multiple +PFX can be provided either as an array of unencrypted PFX buffers, +or an array of objects in the form {buf: <string|buffer>[, +passphrase: ]}. The object form can only occur in an array. +object.passphrase is optional. Encrypted PFX will be decrypted with +object.passphrase if provided, or options.passphrase if it is not.

+
pkFactory: PkFactory

A primary key factory function for generation of custom _id keys

+
proxyHost?: string
proxyPassword?: string
proxyPort?: number
proxyUsername?: string
raw: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern: ReadConcern
readPreference: ReadPreference
rejectUnauthorized?: boolean

If true the server will reject any connection which is not +authorized with the list of supplied CAs. This option only has an +effect if requestCert is true.

+
true
+
+ +
replicaSet: string

Specifies the name of the replica set, if the mongod is a member of a replica set.

+
retryReads: boolean

Enables retryable reads.

+
retryWrites: boolean

Enable retryable writes.

+
secureContext?: SecureContext

An optional TLS context object from tls.createSecureContext()

+
secureProtocol?: string

Legacy mechanism to select the TLS protocol version to use, it does +not support independent control of the minimum and maximum version, +and does not support limiting the protocol to TLSv1.3. Use +minVersion and maxVersion instead. The possible values are listed as +SSL_METHODS, use the function names as strings. For example, use +'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow +any TLS protocol version up to TLSv1.3. It is not recommended to use +TLS versions less than 1.2, but it may be required for +interoperability. Default: none, see minVersion.

+
serverApi: ServerApi
serverMonitoringMode: ServerMonitoringMode
servername?: string
serverSelectionTimeoutMS: number

Specifies how long (in milliseconds) to block for server selection before throwing an exception.

+
session?: Buffer

An optional Buffer instance containing a TLS session.

+
socketTimeoutMS: number

The time in milliseconds to attempt a send or receive on a socket before the attempt times out.

+
srvHost?: string
srvMaxHosts: number

The maximum number of hosts to connect to when using an srv connection string, a setting of 0 means unlimited hosts

+
srvServiceName: string

Modifies the srv URI to look like:

+

_{srvServiceName}._tcp.{hostname}.{domainname}

+

Querying this DNS URI is expected to respond with SRV records

+
tls: boolean

NOTE ABOUT TLS Options

If tls is provided as an option, it is equivalent to setting the ssl option.

+

NodeJS native TLS options are passed through to the socket and retain their original types.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
nodejs native optiondriver spec equivalent option namedriver option type
catlsCAFilestring
crltlsCRLFilestring
certtlsCertificateKeyFilestring
keytlsCertificateKeyFilestring
passphrasetlsCertificateKeyFilePasswordstring
rejectUnauthorizedtlsAllowInvalidCertificatesboolean
checkServerIdentitytlsAllowInvalidHostnamesboolean
see note belowtlsInsecureboolean
+

If tlsInsecure is set to true, then it will set the node native options checkServerIdentity +to a no-op and rejectUnauthorized to false.

+

If tlsInsecure is set to false, then it will set the node native options checkServerIdentity +to a no-op and rejectUnauthorized to the inverse value of tlsAllowInvalidCertificates. If +tlsAllowInvalidCertificates is not set, then rejectUnauthorized will be set to true.

+

The files specified by the paths passed in to the tlsCAFile, tlsCertificateKeyFile and tlsCRLFile +fields are read lazily on the first call to MongoClient.connect. Once these files have been read and +the ca, cert, crl and key fields are populated, they will not be read again on subsequent calls to +MongoClient.connect. As a result, until the first call to MongoClient.connect, the ca, +cert, crl and key fields will be undefined.

+
tlsAllowInvalidCertificates: boolean

Bypasses validation of the certificates presented by the mongod/mongos instance

+
tlsAllowInvalidHostnames: boolean

Disables hostname validation of the certificate presented by the mongod/mongos instance.

+
tlsCAFile?: string
tlsCertificateKeyFile?: string
tlsCRLFile?: string
tlsInsecure: boolean

Disables various certificate validations.

+
waitQueueTimeoutMS: number

The maximum time in milliseconds that a thread can wait for a connection to become available.

+
writeConcern: WriteConcern
zlibCompressionLevel:
    | 0
    | 1
    | 2
    | 3
    | 4
    | 5
    | 6
    | 7
    | 8
    | 9

An integer that specifies the compression level if using zlib for network compression.

+
diff --git a/docs/6.9/interfaces/MonitorOptions.html b/docs/6.9/interfaces/MonitorOptions.html new file mode 100644 index 0000000000..216d0ad100 --- /dev/null +++ b/docs/6.9/interfaces/MonitorOptions.html @@ -0,0 +1,122 @@ +MonitorOptions | mongodb

Interface MonitorOptions

interface MonitorOptions {
    allowPartialTrustChain?: boolean;
    ALPNProtocols?: Uint8Array | string[] | Uint8Array[];
    autoSelectFamily?: boolean;
    autoSelectFamilyAttemptTimeout?: number;
    ca?: string | Buffer | (string | Buffer)[];
    cancellationToken?: CancellationToken;
    cert?: string | Buffer | (string | Buffer)[];
    checkServerIdentity?: ((hostname: string, cert: PeerCertificate) => Error | undefined);
    ciphers?: string;
    compressors?: (
        | "none"
        | "snappy"
        | "zlib"
        | "zstd")[];
    connectTimeoutMS: number;
    credentials?: MongoCredentials;
    crl?: string | Buffer | (string | Buffer)[];
    ecdhCurve?: string;
    family?: number;
    heartbeatFrequencyMS: number;
    hints?: number;
    key?: string | Buffer | (string | Buffer | KeyObject)[];
    loadBalanced: boolean;
    localAddress?: string;
    localPort?: number;
    logicalSessionTimeoutMinutes?: number;
    lookup?: LookupFunction;
    metadata: ClientMetadata;
    minDHSize?: number;
    minHeartbeatFrequencyMS: number;
    monitorCommands: boolean;
    noDelay?: boolean;
    passphrase?: string;
    pfx?: string | Buffer | (string | Buffer | PxfObject)[];
    proxyHost?: string;
    proxyPassword?: string;
    proxyPort?: number;
    proxyUsername?: string;
    rejectUnauthorized?: boolean;
    secureContext?: SecureContext;
    secureProtocol?: string;
    serverApi?: ServerApi;
    serverMonitoringMode: ServerMonitoringMode;
    servername?: string;
    session?: Buffer;
    socketTimeoutMS?: number;
    tls: boolean;
}

Hierarchy

Properties

allowPartialTrustChain?: boolean
ALPNProtocols?: Uint8Array | string[] | Uint8Array[]

An array of strings or a Buffer naming possible ALPN protocols. +(Protocols should be ordered by their priority.)

+
autoSelectFamily?: boolean

v18.13.0

+
autoSelectFamilyAttemptTimeout?: number

v18.13.0

+
ca?: string | Buffer | (string | Buffer)[]

Optionally override the trusted CA certificates. Default is to trust +the well-known CAs curated by Mozilla. Mozilla's CAs are completely +replaced when CAs are explicitly specified using this option.

+
cancellationToken?: CancellationToken
cert?: string | Buffer | (string | Buffer)[]

Cert chains in PEM format. One cert chain should be provided per +private key. Each cert chain should consist of the PEM formatted +certificate for a provided private key, followed by the PEM +formatted intermediate certificates (if any), in order, and not +including the root CA (the root CA must be pre-known to the peer, +see ca). When providing multiple cert chains, they do not have to +be in the same order as their private keys in key. If the +intermediate certificates are not provided, the peer will not be +able to validate the certificate, and the handshake will fail.

+
checkServerIdentity?: ((hostname: string, cert: PeerCertificate) => Error | undefined)

Type declaration

    • (hostname, cert): Error | undefined
    • Verifies the certificate cert is issued to hostname.

      +

      Returns Error object, populating it with reason, host, and cert on +failure. On success, returns undefined.

      +

      This function is intended to be used in combination with thecheckServerIdentity option that can be passed to connect and as +such operates on a certificate object. For other purposes, consider using x509.checkHost() instead.

      +

      This function can be overwritten by providing an alternative function as the options.checkServerIdentity option that is passed to tls.connect(). The +overwriting function can call tls.checkServerIdentity() of course, to augment +the checks done with additional verification.

      +

      This function is only called if the certificate passed all other checks, such as +being issued by trusted CA (options.ca).

      +

      Earlier versions of Node.js incorrectly accepted certificates for a givenhostname if a matching uniformResourceIdentifier subject alternative name +was present (see CVE-2021-44531). Applications that wish to acceptuniformResourceIdentifier subject alternative names can use +a custom options.checkServerIdentity function that implements the desired behavior.

      +

      Parameters

      • hostname: string

        The host name or IP address to verify the certificate against.

        +
      • cert: PeerCertificate

        A certificate object representing the peer's certificate.

        +

      Returns Error | undefined

      v0.8.4

      +
ciphers?: string

Cipher suite specification, replacing the default. For more +information, see modifying the default cipher suite. Permitted +ciphers can be obtained via tls.getCiphers(). Cipher names must be +uppercased in order for OpenSSL to accept them.

+
compressors?: (
    | "none"
    | "snappy"
    | "zlib"
    | "zstd")[]
connectTimeoutMS: number
credentials?: MongoCredentials
crl?: string | Buffer | (string | Buffer)[]

PEM formatted CRLs (Certificate Revocation Lists).

+
ecdhCurve?: string

A string describing a named curve or a colon separated list of curve +NIDs or names, for example P-521:P-384:P-256, to use for ECDH key +agreement. Set to auto to select the curve automatically. Use +crypto.getCurves() to obtain a list of available curve names. On +recent releases, openssl ecparam -list_curves will also display the +name and description of each available elliptic curve. Default: +tls.DEFAULT_ECDH_CURVE.

+
family?: number
heartbeatFrequencyMS: number
hints?: number
key?: string | Buffer | (string | Buffer | KeyObject)[]

Private keys in PEM format. PEM allows the option of private keys +being encrypted. Encrypted keys will be decrypted with +options.passphrase. Multiple keys using different algorithms can be +provided either as an array of unencrypted key strings or buffers, +or an array of objects in the form {pem: <string|buffer>[, +passphrase: ]}. The object form can only occur in an array. +object.passphrase is optional. Encrypted keys will be decrypted with +object.passphrase if provided, or options.passphrase if it is not.

+
loadBalanced: boolean
localAddress?: string
localPort?: number
logicalSessionTimeoutMinutes?: number
lookup?: LookupFunction
metadata: ClientMetadata
minDHSize?: number
minHeartbeatFrequencyMS: number
monitorCommands: boolean
noDelay?: boolean
passphrase?: string

Shared passphrase used for a single private key and/or a PFX.

+
pfx?: string | Buffer | (string | Buffer | PxfObject)[]

PFX or PKCS12 encoded private key and certificate chain. pfx is an +alternative to providing key and cert individually. PFX is usually +encrypted, if it is, passphrase will be used to decrypt it. Multiple +PFX can be provided either as an array of unencrypted PFX buffers, +or an array of objects in the form {buf: <string|buffer>[, +passphrase: ]}. The object form can only occur in an array. +object.passphrase is optional. Encrypted PFX will be decrypted with +object.passphrase if provided, or options.passphrase if it is not.

+
proxyHost?: string
proxyPassword?: string
proxyPort?: number
proxyUsername?: string
rejectUnauthorized?: boolean

If true the server will reject any connection which is not +authorized with the list of supplied CAs. This option only has an +effect if requestCert is true.

+
true
+
+ +
secureContext?: SecureContext

An optional TLS context object from tls.createSecureContext()

+
secureProtocol?: string

Legacy mechanism to select the TLS protocol version to use, it does +not support independent control of the minimum and maximum version, +and does not support limiting the protocol to TLSv1.3. Use +minVersion and maxVersion instead. The possible values are listed as +SSL_METHODS, use the function names as strings. For example, use +'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow +any TLS protocol version up to TLSv1.3. It is not recommended to use +TLS versions less than 1.2, but it may be required for +interoperability. Default: none, see minVersion.

+
serverApi?: ServerApi
serverMonitoringMode: ServerMonitoringMode
servername?: string
session?: Buffer

An optional Buffer instance containing a TLS session.

+
socketTimeoutMS?: number
tls: boolean
diff --git a/docs/6.9/interfaces/OIDCCallbackParams.html b/docs/6.9/interfaces/OIDCCallbackParams.html new file mode 100644 index 0000000000..d5d78b6748 --- /dev/null +++ b/docs/6.9/interfaces/OIDCCallbackParams.html @@ -0,0 +1,16 @@ +OIDCCallbackParams | mongodb

Interface OIDCCallbackParams

The parameters that the driver provides to the user supplied +human or machine callback.

+

The version number is used to communicate callback API changes that are not breaking but that +users may want to know about and review their implementation. Users may wish to check the version +number and throw an error if their expected version number and the one provided do not match.

+
interface OIDCCallbackParams {
    idpInfo?: IdPInfo;
    refreshToken?: string;
    timeoutContext: AbortSignal;
    username?: string;
    version: 1;
}

Properties

idpInfo?: IdPInfo

The IdP information returned from the server.

+
refreshToken?: string

The refresh token, if applicable, to be used by the callback to request a new token from the issuer.

+
timeoutContext: AbortSignal

The context in which to timeout the OIDC callback.

+
username?: string

Optional username.

+
version: 1

The current OIDC API version.

+
diff --git a/docs/6.9/interfaces/OIDCResponse.html b/docs/6.9/interfaces/OIDCResponse.html new file mode 100644 index 0000000000..dd530ed223 --- /dev/null +++ b/docs/6.9/interfaces/OIDCResponse.html @@ -0,0 +1,9 @@ +OIDCResponse | mongodb

Interface OIDCResponse

The response required to be returned from the machine or +human callback workflows' callback.

+
interface OIDCResponse {
    accessToken: string;
    expiresInSeconds?: number;
    refreshToken?: string;
}

Properties

accessToken: string

The OIDC access token.

+
expiresInSeconds?: number

The time when the access token expires. For future use.

+
refreshToken?: string

The refresh token, if applicable, to be used by the callback to request a new token from the issuer.

+
diff --git a/docs/6.9/interfaces/OperationOptions.html b/docs/6.9/interfaces/OperationOptions.html new file mode 100644 index 0000000000..c0ee6421be --- /dev/null +++ b/docs/6.9/interfaces/OperationOptions.html @@ -0,0 +1,49 @@ +OperationOptions | mongodb

Interface OperationOptions

interface OperationOptions {
    bsonRegExp?: boolean;
    checkKeys?: boolean;
    enableUtf8Validation?: boolean;
    fieldsAsRaw?: Document;
    ignoreUndefined?: boolean;
    omitReadPreference?: boolean;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readPreference?: ReadPreferenceLike;
    serializeFunctions?: boolean;
    session?: ClientSession;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
}

Hierarchy (view full)

Properties

bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
omitReadPreference?: boolean
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean
diff --git a/docs/6.9/interfaces/PkFactory.html b/docs/6.9/interfaces/PkFactory.html new file mode 100644 index 0000000000..48ce2ac8c3 --- /dev/null +++ b/docs/6.9/interfaces/PkFactory.html @@ -0,0 +1,2 @@ +PkFactory | mongodb

Interface PkFactory

interface PkFactory {
    createPk(): any;
}

Methods

Methods

diff --git a/docs/6.9/interfaces/ProxyOptions.html b/docs/6.9/interfaces/ProxyOptions.html new file mode 100644 index 0000000000..52b1da1e18 --- /dev/null +++ b/docs/6.9/interfaces/ProxyOptions.html @@ -0,0 +1,5 @@ +ProxyOptions | mongodb

Interface ProxyOptions

interface ProxyOptions {
    proxyHost?: string;
    proxyPassword?: string;
    proxyPort?: number;
    proxyUsername?: string;
}

Hierarchy (view full)

Properties

proxyHost?: string
proxyPassword?: string
proxyPort?: number
proxyUsername?: string
diff --git a/docs/6.9/interfaces/RangeOptions.html b/docs/6.9/interfaces/RangeOptions.html new file mode 100644 index 0000000000..0890e95015 --- /dev/null +++ b/docs/6.9/interfaces/RangeOptions.html @@ -0,0 +1,13 @@ +RangeOptions | mongodb

Interface RangeOptions

RangeOptions specifies index options for a Queryable Encryption field supporting "range" queries. +min, max, sparsity, trimFactor and range must match the values set in the encryptedFields of the destination collection. +For double and decimal128, min/max/precision must all be set, or all be unset.

+
interface RangeOptions {
    max?: any;
    min?: any;
    precision?: number;
    sparsity?: bigint | Long;
    trimFactor?: number | Int32;
}

Properties

max?: any

max is the minimum value for the encrypted index. Required if precision is set.

+
min?: any

min is the minimum value for the encrypted index. Required if precision is set.

+
precision?: number
sparsity?: bigint | Long

sparsity may be used to tune performance. must be non-negative. When omitted, a default value is used.

+
trimFactor?: number | Int32

trimFactor may be used to tune performance. must be non-negative. When omitted, a default value is used.

+
diff --git a/docs/6.9/interfaces/ReadPreferenceFromOptions.html b/docs/6.9/interfaces/ReadPreferenceFromOptions.html new file mode 100644 index 0000000000..24d6c1ebf5 --- /dev/null +++ b/docs/6.9/interfaces/ReadPreferenceFromOptions.html @@ -0,0 +1,8 @@ +ReadPreferenceFromOptions | mongodb

Interface ReadPreferenceFromOptions

interface ReadPreferenceFromOptions {
    hedge?: HedgeOptions;
    maxStalenessSeconds?: number;
    readPreference?: ReadPreferenceLike | {
        maxStalenessSeconds?: number;
        mode?: ReadPreferenceMode | undefined;
        preference?: ReadPreferenceMode | undefined;
        tags?: TagSet[];
    };
    readPreferenceTags?: TagSet[];
    session?: ClientSession;
}

Hierarchy (view full)

Properties

hedge?: HedgeOptions

Server mode in which the same query is dispatched in parallel to multiple replica set members.

+
maxStalenessSeconds?: number

Max secondary read staleness in seconds, Minimum value is 90 seconds.

+
readPreference?: ReadPreferenceLike | {
    maxStalenessSeconds?: number;
    mode?: ReadPreferenceMode | undefined;
    preference?: ReadPreferenceMode | undefined;
    tags?: TagSet[];
}
readPreferenceTags?: TagSet[]
session?: ClientSession
diff --git a/docs/6.9/interfaces/ReadPreferenceLikeOptions.html b/docs/6.9/interfaces/ReadPreferenceLikeOptions.html new file mode 100644 index 0000000000..14c6633796 --- /dev/null +++ b/docs/6.9/interfaces/ReadPreferenceLikeOptions.html @@ -0,0 +1,6 @@ +ReadPreferenceLikeOptions | mongodb

Interface ReadPreferenceLikeOptions

interface ReadPreferenceLikeOptions {
    hedge?: HedgeOptions;
    maxStalenessSeconds?: number;
    readPreference?: ReadPreferenceLike | {
        maxStalenessSeconds?: number;
        mode?: ReadPreferenceMode | undefined;
        preference?: ReadPreferenceMode | undefined;
        tags?: TagSet[];
    };
}

Hierarchy (view full)

Properties

hedge?: HedgeOptions

Server mode in which the same query is dispatched in parallel to multiple replica set members.

+
maxStalenessSeconds?: number

Max secondary read staleness in seconds, Minimum value is 90 seconds.

+
readPreference?: ReadPreferenceLike | {
    maxStalenessSeconds?: number;
    mode?: ReadPreferenceMode | undefined;
    preference?: ReadPreferenceMode | undefined;
    tags?: TagSet[];
}
diff --git a/docs/6.9/interfaces/ReadPreferenceOptions.html b/docs/6.9/interfaces/ReadPreferenceOptions.html new file mode 100644 index 0000000000..e84d524e43 --- /dev/null +++ b/docs/6.9/interfaces/ReadPreferenceOptions.html @@ -0,0 +1,5 @@ +ReadPreferenceOptions | mongodb

Interface ReadPreferenceOptions

interface ReadPreferenceOptions {
    hedge?: HedgeOptions;
    maxStalenessSeconds?: number;
}

Hierarchy (view full)

Properties

hedge?: HedgeOptions

Server mode in which the same query is dispatched in parallel to multiple replica set members.

+
maxStalenessSeconds?: number

Max secondary read staleness in seconds, Minimum value is 90 seconds.

+
diff --git a/docs/6.9/interfaces/RenameOptions.html b/docs/6.9/interfaces/RenameOptions.html new file mode 100644 index 0000000000..26a9ae6d03 --- /dev/null +++ b/docs/6.9/interfaces/RenameOptions.html @@ -0,0 +1,72 @@ +RenameOptions | mongodb

Interface RenameOptions

interface RenameOptions {
    authdb?: string;
    bsonRegExp?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    dbName?: string;
    dropTarget?: boolean;
    enableUtf8Validation?: boolean;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    ignoreUndefined?: boolean;
    maxTimeMS?: number;
    new_collection?: boolean;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    serializeFunctions?: boolean;
    session?: ClientSession;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

authdb?: string
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Collation

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
dbName?: string
dropTarget?: boolean

Drop the target name collection if it previously exists.

+
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
maxTimeMS?: number
new_collection?: boolean

Unclear

+
noResponse?: boolean
omitReadPreference?: boolean
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/ReplaceOneModel.html b/docs/6.9/interfaces/ReplaceOneModel.html new file mode 100644 index 0000000000..4a2be88ec6 --- /dev/null +++ b/docs/6.9/interfaces/ReplaceOneModel.html @@ -0,0 +1,11 @@ +ReplaceOneModel | mongodb

Interface ReplaceOneModel<TSchema>

interface ReplaceOneModel<TSchema> {
    collation?: CollationOptions;
    filter: Filter<TSchema>;
    hint?: Hint;
    replacement: WithoutId<TSchema>;
    upsert?: boolean;
}

Type Parameters

Properties

collation?: CollationOptions

Specifies a collation.

+
filter: Filter<TSchema>

The filter to limit the replaced document.

+
hint?: Hint

The index to use. If specified, then the query system will only consider plans using the hinted index.

+
replacement: WithoutId<TSchema>

The document with which to replace the matched document.

+
upsert?: boolean

When true, creates a new document if no document matches the query.

+
diff --git a/docs/6.9/interfaces/ReplaceOptions.html b/docs/6.9/interfaces/ReplaceOptions.html new file mode 100644 index 0000000000..de98c922f9 --- /dev/null +++ b/docs/6.9/interfaces/ReplaceOptions.html @@ -0,0 +1,76 @@ +ReplaceOptions | mongodb

Interface ReplaceOptions

interface ReplaceOptions {
    authdb?: string;
    bsonRegExp?: boolean;
    bypassDocumentValidation?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    dbName?: string;
    enableUtf8Validation?: boolean;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    hint?: string | Document;
    ignoreUndefined?: boolean;
    let?: Document;
    maxTimeMS?: number;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    serializeFunctions?: boolean;
    session?: ClientSession;
    upsert?: boolean;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

authdb?: string
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
bypassDocumentValidation?: boolean

If true, allows the write to opt-out of document level validation

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Specifies a collation

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
hint?: string | Document

Specify that the update query should only consider plans using the hinted index

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
let?: Document

Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

+
maxTimeMS?: number
noResponse?: boolean
omitReadPreference?: boolean
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
upsert?: boolean

When true, creates a new document if no document matches the query

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/ResumeOptions.html b/docs/6.9/interfaces/ResumeOptions.html new file mode 100644 index 0000000000..5f3e134e91 --- /dev/null +++ b/docs/6.9/interfaces/ResumeOptions.html @@ -0,0 +1,10 @@ +ResumeOptions | mongodb

Interface ResumeOptions

Please use the ChangeStreamCursorOptions type instead.

+
interface ResumeOptions {
    batchSize?: number;
    collation?: CollationOptions;
    fullDocument?: string;
    maxAwaitTimeMS?: number;
    readPreference?: ReadPreference;
    resumeAfter?: unknown;
    startAfter?: unknown;
    startAtOperationTime?: Timestamp;
}

Properties

batchSize?: number
collation?: CollationOptions
fullDocument?: string
maxAwaitTimeMS?: number
readPreference?: ReadPreference
resumeAfter?: unknown
startAfter?: unknown
startAtOperationTime?: Timestamp
diff --git a/docs/6.9/interfaces/RootFilterOperators.html b/docs/6.9/interfaces/RootFilterOperators.html new file mode 100644 index 0000000000..dfe106f1b5 --- /dev/null +++ b/docs/6.9/interfaces/RootFilterOperators.html @@ -0,0 +1,7 @@ +RootFilterOperators | mongodb

Interface RootFilterOperators<TSchema>

interface RootFilterOperators<TSchema> {
    $and?: Filter<TSchema>[];
    $comment?: string | Document;
    $nor?: Filter<TSchema>[];
    $or?: Filter<TSchema>[];
    $text?: {
        $caseSensitive?: boolean;
        $diacriticSensitive?: boolean;
        $language?: string;
        $search: string;
    };
    $where?: string | ((this: TSchema) => boolean);
}

Type Parameters

  • TSchema

Hierarchy (view full)

Properties

$and?: Filter<TSchema>[]
$comment?: string | Document
$nor?: Filter<TSchema>[]
$or?: Filter<TSchema>[]
$text?: {
    $caseSensitive?: boolean;
    $diacriticSensitive?: boolean;
    $language?: string;
    $search: string;
}
$where?: string | ((this: TSchema) => boolean)
diff --git a/docs/6.9/interfaces/SearchIndexDescription.html b/docs/6.9/interfaces/SearchIndexDescription.html new file mode 100644 index 0000000000..42660aa046 --- /dev/null +++ b/docs/6.9/interfaces/SearchIndexDescription.html @@ -0,0 +1,7 @@ +SearchIndexDescription | mongodb

Interface SearchIndexDescription

interface SearchIndexDescription {
    definition: Document;
    name?: string;
    type?: string;
}

Hierarchy (view full)

Properties

Properties

definition: Document

The index definition.

+
name?: string

The name of the index.

+
type?: string

The type of the index. Currently search or vectorSearch are supported.

+
diff --git a/docs/6.9/interfaces/SelectServerOptions.html b/docs/6.9/interfaces/SelectServerOptions.html new file mode 100644 index 0000000000..38ec0ee157 --- /dev/null +++ b/docs/6.9/interfaces/SelectServerOptions.html @@ -0,0 +1,7 @@ +SelectServerOptions | mongodb

Interface SelectServerOptions

interface SelectServerOptions {
    operationName: string;
    previousServer?: ServerDescription;
    readPreference?: ReadPreferenceLike;
    serverSelectionTimeoutMS?: number;
    session?: ClientSession;
}

Properties

operationName: string
previousServer?: ServerDescription
readPreference?: ReadPreferenceLike
serverSelectionTimeoutMS?: number

How long to block for server selection before throwing an error

+
session?: ClientSession
diff --git a/docs/6.9/interfaces/ServerApi.html b/docs/6.9/interfaces/ServerApi.html new file mode 100644 index 0000000000..496b4377a4 --- /dev/null +++ b/docs/6.9/interfaces/ServerApi.html @@ -0,0 +1,4 @@ +ServerApi | mongodb

Interface ServerApi

interface ServerApi {
    deprecationErrors?: boolean;
    strict?: boolean;
    version: "1";
}

Properties

deprecationErrors?: boolean
strict?: boolean
version: "1"
diff --git a/docs/6.9/interfaces/StreamDescriptionOptions.html b/docs/6.9/interfaces/StreamDescriptionOptions.html new file mode 100644 index 0000000000..772c29a672 --- /dev/null +++ b/docs/6.9/interfaces/StreamDescriptionOptions.html @@ -0,0 +1,4 @@ +StreamDescriptionOptions | mongodb

Interface StreamDescriptionOptions

interface StreamDescriptionOptions {
    compressors?: (
        | "none"
        | "snappy"
        | "zlib"
        | "zstd")[];
    loadBalanced: boolean;
    logicalSessionTimeoutMinutes?: number;
}

Hierarchy (view full)

Properties

compressors?: (
    | "none"
    | "snappy"
    | "zlib"
    | "zstd")[]
loadBalanced: boolean
logicalSessionTimeoutMinutes?: number
diff --git a/docs/6.9/interfaces/TimeSeriesCollectionOptions.html b/docs/6.9/interfaces/TimeSeriesCollectionOptions.html new file mode 100644 index 0000000000..2e55cca330 --- /dev/null +++ b/docs/6.9/interfaces/TimeSeriesCollectionOptions.html @@ -0,0 +1,8 @@ +TimeSeriesCollectionOptions | mongodb

Interface TimeSeriesCollectionOptions

Configuration options for timeseries collections

+
interface TimeSeriesCollectionOptions {
    bucketMaxSpanSeconds?: number;
    bucketRoundingSeconds?: number;
    granularity?: string;
    metaField?: string;
    timeField: string;
}

Hierarchy (view full)

Properties

bucketMaxSpanSeconds?: number
bucketRoundingSeconds?: number
granularity?: string
metaField?: string
timeField: string
diff --git a/docs/6.9/interfaces/TopologyDescriptionOptions.html b/docs/6.9/interfaces/TopologyDescriptionOptions.html new file mode 100644 index 0000000000..262eb204f3 --- /dev/null +++ b/docs/6.9/interfaces/TopologyDescriptionOptions.html @@ -0,0 +1,3 @@ +TopologyDescriptionOptions | mongodb

Interface TopologyDescriptionOptions

interface TopologyDescriptionOptions {
    heartbeatFrequencyMS?: number;
    localThresholdMS?: number;
}

Properties

heartbeatFrequencyMS?: number
localThresholdMS?: number
diff --git a/docs/6.9/interfaces/TopologyVersion.html b/docs/6.9/interfaces/TopologyVersion.html new file mode 100644 index 0000000000..9039d63f81 --- /dev/null +++ b/docs/6.9/interfaces/TopologyVersion.html @@ -0,0 +1,3 @@ +TopologyVersion | mongodb

Interface TopologyVersion

interface TopologyVersion {
    counter: Long;
    processId: ObjectId;
}

Properties

Properties

counter: Long
processId: ObjectId
diff --git a/docs/6.9/interfaces/TransactionOptions.html b/docs/6.9/interfaces/TransactionOptions.html new file mode 100644 index 0000000000..044e04eccd --- /dev/null +++ b/docs/6.9/interfaces/TransactionOptions.html @@ -0,0 +1,71 @@ +TransactionOptions | mongodb

Interface TransactionOptions

Configuration options for a transaction.

+
interface TransactionOptions {
    authdb?: string;
    bsonRegExp?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    dbName?: string;
    enableUtf8Validation?: boolean;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    ignoreUndefined?: boolean;
    maxCommitTimeMS?: number;
    maxTimeMS?: number;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    serializeFunctions?: boolean;
    session?: ClientSession;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
    writeConcern?: WriteConcern;
}

Hierarchy (view full)

Properties

authdb?: string
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Collation

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
maxCommitTimeMS?: number

Specifies the maximum amount of time to allow a commit action on a transaction to run in milliseconds

+
maxTimeMS?: number
noResponse?: boolean
omitReadPreference?: boolean
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

A default read concern for commands in this transaction

+
readPreference?: ReadPreferenceLike

A default read preference for commands in this transaction

+
retryWrites?: boolean

Should retry failed writes

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean
writeConcern?: WriteConcern

A default writeConcern for commands in this transaction

+
diff --git a/docs/6.9/interfaces/UpdateDescription.html b/docs/6.9/interfaces/UpdateDescription.html new file mode 100644 index 0000000000..89429a1eec --- /dev/null +++ b/docs/6.9/interfaces/UpdateDescription.html @@ -0,0 +1,27 @@ +UpdateDescription | mongodb

Interface UpdateDescription<TSchema>

interface UpdateDescription<TSchema> {
    disambiguatedPaths?: Document;
    removedFields?: string[];
    truncatedArrays?: {
        field: string;
        newSize: number;
    }[];
    updatedFields?: Partial<TSchema>;
}

Type Parameters

Properties

disambiguatedPaths?: Document

A document containing additional information about any ambiguous update paths from the update event. The document +maps the full ambiguous update path to an array containing the actual resolved components of the path. For example, +given a document shaped like { a: { '0': 0 } }, and an update of { $inc: 'a.0' }, disambiguated paths would look like +the following:

+
  {
'a.0': ['a', '0']
} +
+ +

This field is only present when there are ambiguous paths that are updated as a part of the update event and showExpandedEvents +is enabled for the change stream.

+

6.1.0

+
removedFields?: string[]

An array of field names that were removed from the document.

+
truncatedArrays?: {
    field: string;
    newSize: number;
}[]

An array of documents which record array truncations performed with pipeline-based updates using one or more of the following stages:

+
    +
  • $addFields
  • +
  • $set
  • +
  • $replaceRoot
  • +
  • $replaceWith
  • +
+

Type declaration

  • field: string

    The name of the truncated field.

    +
  • newSize: number

    The number of elements in the truncated array.

    +
updatedFields?: Partial<TSchema>

A document containing key:value pairs of names of the fields that were +changed, and the new value for those fields.

+
diff --git a/docs/6.9/interfaces/UpdateManyModel.html b/docs/6.9/interfaces/UpdateManyModel.html new file mode 100644 index 0000000000..5d1517d5cf --- /dev/null +++ b/docs/6.9/interfaces/UpdateManyModel.html @@ -0,0 +1,15 @@ +UpdateManyModel | mongodb

Interface UpdateManyModel<TSchema>

interface UpdateManyModel<TSchema> {
    arrayFilters?: Document[];
    collation?: CollationOptions;
    filter: Filter<TSchema>;
    hint?: Hint;
    update: Document[] | UpdateFilter<TSchema>;
    upsert?: boolean;
}

Type Parameters

Properties

arrayFilters?: Document[]

A set of filters specifying to which array elements an update should apply.

+
collation?: CollationOptions

Specifies a collation.

+
filter: Filter<TSchema>

The filter to limit the updated documents.

+
hint?: Hint

The index to use. If specified, then the query system will only consider plans using the hinted index.

+

The modifications to apply. The value can be either: +UpdateFilter - A document that contains update operator expressions, +Document[] - an aggregation pipeline.

+
upsert?: boolean

When true, creates a new document if no document matches the query.

+
diff --git a/docs/6.9/interfaces/UpdateOneModel.html b/docs/6.9/interfaces/UpdateOneModel.html new file mode 100644 index 0000000000..dbb91aaa30 --- /dev/null +++ b/docs/6.9/interfaces/UpdateOneModel.html @@ -0,0 +1,15 @@ +UpdateOneModel | mongodb

Interface UpdateOneModel<TSchema>

interface UpdateOneModel<TSchema> {
    arrayFilters?: Document[];
    collation?: CollationOptions;
    filter: Filter<TSchema>;
    hint?: Hint;
    update: Document[] | UpdateFilter<TSchema>;
    upsert?: boolean;
}

Type Parameters

Properties

arrayFilters?: Document[]

A set of filters specifying to which array elements an update should apply.

+
collation?: CollationOptions

Specifies a collation.

+
filter: Filter<TSchema>

The filter to limit the updated documents.

+
hint?: Hint

The index to use. If specified, then the query system will only consider plans using the hinted index.

+

The modifications to apply. The value can be either: +UpdateFilter - A document that contains update operator expressions, +Document[] - an aggregation pipeline.

+
upsert?: boolean

When true, creates a new document if no document matches the query.

+
diff --git a/docs/6.9/interfaces/UpdateOptions.html b/docs/6.9/interfaces/UpdateOptions.html new file mode 100644 index 0000000000..d6cf19b08d --- /dev/null +++ b/docs/6.9/interfaces/UpdateOptions.html @@ -0,0 +1,78 @@ +UpdateOptions | mongodb

Interface UpdateOptions

interface UpdateOptions {
    arrayFilters?: Document[];
    authdb?: string;
    bsonRegExp?: boolean;
    bypassDocumentValidation?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    dbName?: string;
    enableUtf8Validation?: boolean;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    hint?: Hint;
    ignoreUndefined?: boolean;
    let?: Document;
    maxTimeMS?: number;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    serializeFunctions?: boolean;
    session?: ClientSession;
    upsert?: boolean;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

arrayFilters?: Document[]

A set of filters specifying to which array elements an update should apply

+
authdb?: string
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
bypassDocumentValidation?: boolean

If true, allows the write to opt-out of document level validation

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Specifies a collation

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
hint?: Hint

Specify that the update query should only consider plans using the hinted index

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
let?: Document

Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

+
maxTimeMS?: number
noResponse?: boolean
omitReadPreference?: boolean
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
upsert?: boolean

When true, creates a new document if no document matches the query

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/UpdateResult.html b/docs/6.9/interfaces/UpdateResult.html new file mode 100644 index 0000000000..d9e991402a --- /dev/null +++ b/docs/6.9/interfaces/UpdateResult.html @@ -0,0 +1,12 @@ +UpdateResult | mongodb

Interface UpdateResult<TSchema>

TSchema is the schema of the collection

+
interface UpdateResult<TSchema> {
    acknowledged: boolean;
    matchedCount: number;
    modifiedCount: number;
    upsertedCount: number;
    upsertedId: null | InferIdType<TSchema>;
}

Type Parameters

Properties

acknowledged: boolean

Indicates whether this write result was acknowledged. If not, then all other members of this result will be undefined

+
matchedCount: number

The number of documents that matched the filter

+
modifiedCount: number

The number of documents that were modified

+
upsertedCount: number

The number of documents that were upserted

+
upsertedId: null | InferIdType<TSchema>

The identifier of the inserted document if an upsert took place

+
diff --git a/docs/6.9/interfaces/UpdateStatement.html b/docs/6.9/interfaces/UpdateStatement.html new file mode 100644 index 0000000000..435a219ed6 --- /dev/null +++ b/docs/6.9/interfaces/UpdateStatement.html @@ -0,0 +1,15 @@ +UpdateStatement | mongodb

Interface UpdateStatement

interface UpdateStatement {
    arrayFilters?: Document[];
    collation?: CollationOptions;
    hint?: Hint;
    multi?: boolean;
    q: Document;
    u: Document | Document[];
    upsert?: boolean;
}

Properties

arrayFilters?: Document[]

An array of filter documents that determines which array elements to modify for an update operation on an array field.

+
collation?: CollationOptions

Specifies the collation to use for the operation.

+
hint?: Hint

A document or string that specifies the index to use to support the query predicate.

+
multi?: boolean

If true, updates all documents that meet the query criteria.

+

The query that matches documents to update.

+

The modifications to apply.

+
upsert?: boolean

If true, perform an insert if no documents match the query.

+
diff --git a/docs/6.9/interfaces/ValidateCollectionOptions.html b/docs/6.9/interfaces/ValidateCollectionOptions.html new file mode 100644 index 0000000000..7eefe52d87 --- /dev/null +++ b/docs/6.9/interfaces/ValidateCollectionOptions.html @@ -0,0 +1,70 @@ +ValidateCollectionOptions | mongodb

Interface ValidateCollectionOptions

interface ValidateCollectionOptions {
    authdb?: string;
    background?: boolean;
    bsonRegExp?: boolean;
    checkKeys?: boolean;
    collation?: CollationOptions;
    comment?: unknown;
    dbName?: string;
    enableUtf8Validation?: boolean;
    explain?: ExplainVerbosityLike;
    fieldsAsRaw?: Document;
    ignoreUndefined?: boolean;
    maxTimeMS?: number;
    noResponse?: boolean;
    omitReadPreference?: boolean;
    promoteBuffers?: boolean;
    promoteLongs?: boolean;
    promoteValues?: boolean;
    raw?: boolean;
    readConcern?: ReadConcernLike;
    readPreference?: ReadPreferenceLike;
    retryWrites?: boolean;
    serializeFunctions?: boolean;
    session?: ClientSession;
    useBigInt64?: boolean;
    willRetryWrite?: boolean;
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

authdb?: string
background?: boolean

Validates a collection in the background, without interrupting read or write traffic (only in MongoDB 4.4+)

+
bsonRegExp?: boolean

return BSON regular expressions as BSONRegExp instances.

+

false

+
checkKeys?: boolean

the serializer will check if keys are valid.

+

false

+
collation?: CollationOptions

Collation

+
comment?: unknown

Comment to apply to the operation.

+

In server versions pre-4.4, 'comment' must be string. A server +error will be thrown if any other type is provided.

+

In server versions 4.4 and above, 'comment' can be any valid BSON type.

+
dbName?: string
enableUtf8Validation?: boolean

Enable utf8 validation when deserializing BSON documents. Defaults to true.

+

Specifies the verbosity mode for the explain output.

+
fieldsAsRaw?: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

+

null

+
ignoreUndefined?: boolean

serialize will not emit undefined fields +note that the driver sets this to false

+

true

+
maxTimeMS?: number
noResponse?: boolean
omitReadPreference?: boolean
promoteBuffers?: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

+

false

+
promoteLongs?: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

+

true

+
promoteValues?: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

+

true

+
raw?: boolean

Enabling the raw option will return a Node.js Buffer +which is allocated using allocUnsafe API. +See this section from the Node.js Docs here +for more detail about what "unsafe" refers to in this context. +If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate +your own buffer and clone the contents:

+
const raw = await collection.findOne({}, { raw: true });
const myBuffer = Buffer.alloc(raw.byteLength);
myBuffer.set(raw, 0);
// Only save and use `myBuffer` beyond this point +
+ +

Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). +It does correctly work at Db, Collection, and per operation the same as other BSON options work.

+
readConcern?: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

+
readPreference?: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

+
retryWrites?: boolean

Should retry failed writes

+
serializeFunctions?: boolean

serialize the javascript functions

+

false

+
session?: ClientSession

Specify ClientSession for this command

+
useBigInt64?: boolean

when deserializing a Long return as a BigInt.

+

false

+
willRetryWrite?: boolean

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/WriteConcernErrorData.html b/docs/6.9/interfaces/WriteConcernErrorData.html new file mode 100644 index 0000000000..6adcde1a2b --- /dev/null +++ b/docs/6.9/interfaces/WriteConcernErrorData.html @@ -0,0 +1,4 @@ +WriteConcernErrorData | mongodb

Interface WriteConcernErrorData

interface WriteConcernErrorData {
    code: number;
    errInfo?: Document;
    errmsg: string;
}

Properties

Properties

code: number
errInfo?: Document
errmsg: string
diff --git a/docs/6.9/interfaces/WriteConcernErrorResult.html b/docs/6.9/interfaces/WriteConcernErrorResult.html new file mode 100644 index 0000000000..4beeb613b8 --- /dev/null +++ b/docs/6.9/interfaces/WriteConcernErrorResult.html @@ -0,0 +1,6 @@ +WriteConcernErrorResult | mongodb

Interface WriteConcernErrorResult

The type of the result property of MongoWriteConcernError

+
interface WriteConcernErrorResult {
    code?: number;
    errorLabels?: string[];
    ok: number;
    writeConcernError: {
        code: number;
        codeName?: string;
        errInfo?: Document;
        errmsg: string;
    };
    [x: string | number]: unknown;
}

Indexable

  • [x: string | number]: unknown

Properties

code?: number
errorLabels?: string[]
ok: number
writeConcernError: {
    code: number;
    codeName?: string;
    errInfo?: Document;
    errmsg: string;
}
diff --git a/docs/6.9/interfaces/WriteConcernOptions.html b/docs/6.9/interfaces/WriteConcernOptions.html new file mode 100644 index 0000000000..551f09aea6 --- /dev/null +++ b/docs/6.9/interfaces/WriteConcernOptions.html @@ -0,0 +1,3 @@ +WriteConcernOptions | mongodb

Interface WriteConcernOptions

interface WriteConcernOptions {
    writeConcern?: WriteConcern | WriteConcernSettings;
}

Hierarchy (view full)

Properties

Properties

Write Concern as an object

+
diff --git a/docs/6.9/interfaces/WriteConcernSettings.html b/docs/6.9/interfaces/WriteConcernSettings.html new file mode 100644 index 0000000000..1896f4b793 --- /dev/null +++ b/docs/6.9/interfaces/WriteConcernSettings.html @@ -0,0 +1,16 @@ +WriteConcernSettings | mongodb

Interface WriteConcernSettings

interface WriteConcernSettings {
    fsync?: boolean | 1;
    j?: boolean;
    journal?: boolean;
    w?: W;
    wtimeout?: number;
    wtimeoutMS?: number;
}

Properties

fsync?: boolean | 1

The file sync write concern.

+

Will be removed in the next major version. Please use the journal option.

+
j?: boolean

The journal write concern.

+

Will be removed in the next major version. Please use the journal option.

+
journal?: boolean

The journal write concern

+
w?: W

The write concern

+
wtimeout?: number

The write concern timeout.

+

Will be removed in the next major version. Please use the wtimeoutMS option.

+
wtimeoutMS?: number

The write concern timeout

+
diff --git a/docs/6.9/media/LICENSE.md b/docs/6.9/media/LICENSE.md new file mode 100644 index 0000000000..ad410e1130 --- /dev/null +++ b/docs/6.9/media/LICENSE.md @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/docs/6.9/modules.html b/docs/6.9/modules.html new file mode 100644 index 0000000000..f94060c640 --- /dev/null +++ b/docs/6.9/modules.html @@ -0,0 +1,400 @@ +mongodb

mongodb

Error

Event

Other

Binary +BSONRegExp +BSONSymbol +BSONType +Code +DBRef +Decimal128 +deserialize +Document +Double +Int32 +Long +MaxKey +MinKey +ObjectId +serialize +Timestamp +UUID +BSON +AbstractCursor +Admin +AggregationCursor +Batch +BulkOperationBase +BulkWriteResult +CancellationToken +ChangeStream +ClientEncryption +ClientSession +Collection +Db +FindCursor +FindOperators +GridFSBucket +GridFSBucketReadStream +GridFSBucketWriteStream +HostAddress +ListCollectionsCursor +ListIndexesCursor +ListSearchIndexesCursor +MongoClient +MongoCredentials +MongoCryptAzureKMSRequestError +MongoCryptCreateDataKeyError +MongoCryptCreateEncryptedCollectionError +MongoCryptError +MongoCryptInvalidArgumentError +MongoCryptKMSRequestNetworkTimeoutError +MongoDBCollectionNamespace +MongoDBNamespace +OrderedBulkOperation +ReadConcern +ReadPreference +RunCommandCursor +ServerCapabilities +ServerDescription +ServerSession +StreamDescription +TopologyDescription +Transaction +TypedEventEmitter +UnorderedBulkOperation +WriteConcern +AbstractCursorOptions +AggregateOptions +AggregationCursorOptions +AsyncDisposable +Auth +AuthMechanismProperties +AutoEncryptionOptions +AWSEncryptionKeyOptions +AWSKMSProviderConfiguration +AzureEncryptionKeyOptions +BSONSerializeOptions +BulkWriteOperationError +BulkWriteOptions +ChangeStreamCollModDocument +ChangeStreamCreateDocument +ChangeStreamCreateIndexDocument +ChangeStreamDeleteDocument +ChangeStreamDocumentCollectionUUID +ChangeStreamDocumentCommon +ChangeStreamDocumentKey +ChangeStreamDocumentOperationDescription +ChangeStreamDropDatabaseDocument +ChangeStreamDropDocument +ChangeStreamDropIndexDocument +ChangeStreamInsertDocument +ChangeStreamInvalidateDocument +ChangeStreamNameSpace +ChangeStreamOptions +ChangeStreamRefineCollectionShardKeyDocument +ChangeStreamRenameDocument +ChangeStreamReplaceDocument +ChangeStreamReshardCollectionDocument +ChangeStreamShardCollectionDocument +ChangeStreamSplitEvent +ChangeStreamUpdateDocument +ClientEncryptionCreateDataKeyProviderOptions +ClientEncryptionEncryptOptions +ClientEncryptionOptions +ClientEncryptionRewrapManyDataKeyProviderOptions +ClientEncryptionRewrapManyDataKeyResult +ClientMetadata +ClientMetadataOptions +ClientSessionOptions +CloseOptions +ClusteredCollectionOptions +ClusterTime +CollationOptions +CollectionInfo +CollectionOptions +CommandOperationOptions +ConnectionOptions +ConnectionPoolOptions +ConnectOptions +CountDocumentsOptions +CountOptions +CreateCollectionOptions +CreateIndexesOptions +CursorStreamOptions +DataKey +DbOptions +DbStatsOptions +DeleteManyModel +DeleteOneModel +DeleteOptions +DeleteResult +DeleteStatement +DriverInfo +DropCollectionOptions +EndSessionOptions +ErrorDescription +EstimatedDocumentCountOptions +ExplainOptions +FilterOperators +FindOneAndDeleteOptions +FindOneAndReplaceOptions +FindOneAndUpdateOptions +FindOptions +GCPEncryptionKeyOptions +GridFSBucketOptions +GridFSBucketReadStreamOptions +GridFSBucketReadStreamOptionsWithRevision +GridFSBucketWriteStreamOptions +GridFSChunk +GridFSFile +HedgeOptions +IdPInfo +IdPServerResponse +IndexDescription +IndexInformationOptions +InsertManyResult +InsertOneModel +InsertOneOptions +InsertOneResult +KMIPEncryptionKeyOptions +KMIPKMSProviderConfiguration +KMSProviders +ListCollectionsOptions +ListDatabasesOptions +ListDatabasesResult +LocalKMSProviderConfiguration +ModifyResult +MongoClientOptions +MongoCredentialsOptions +MongoNetworkErrorOptions +MongoOptions +MonitorOptions +OIDCCallbackParams +OIDCResponse +OperationOptions +PkFactory +ProxyOptions +RangeOptions +ReadPreferenceFromOptions +ReadPreferenceLikeOptions +ReadPreferenceOptions +RenameOptions +ReplaceOneModel +ReplaceOptions +ResumeOptions +RootFilterOperators +SearchIndexDescription +SelectServerOptions +ServerApi +StreamDescriptionOptions +TimeSeriesCollectionOptions +TopologyDescriptionOptions +TopologyVersion +TransactionOptions +UpdateDescription +UpdateManyModel +UpdateOneModel +UpdateOptions +UpdateResult +UpdateStatement +ValidateCollectionOptions +WriteConcernErrorData +WriteConcernErrorResult +WriteConcernOptions +WriteConcernSettings +AbstractCursorEvents +AcceptedFields +AddToSetOperators +AlternativeType +AnyBulkWriteOperation +AnyError +ArrayElement +ArrayOperator +AuthMechanism +AutoEncryptionExtraOptions +AutoEncryptionLoggerLevel +AzureKMSProviderConfiguration +BatchType +BitwiseFilter +BSONTypeAlias +Callback +ChangeStreamDocument +ChangeStreamEvents +ClientEncryptionDataKeyProvider +ClientEncryptionSocketOptions +ClientEncryptionTlsOptions +ClientSessionEvents +CommonEvents +Compressor +CompressorName +Condition +ConnectionEvents +ConnectionPoolEvents +CSFLEKMSTlsOptions +CursorFlag +DistinctOptions +DropDatabaseOptions +DropIndexesOptions +EnhancedOmit +EventEmitterWithState +EventsDescription +ExplainVerbosity +ExplainVerbosityLike +Filter +FilterOperations +Flatten +GCPKMSProviderConfiguration +GenericListener +GridFSBucketEvents +GSSAPICanonicalizationValue +Hint +IndexDescriptionCompact +IndexDescriptionInfo +IndexDirection +IndexSpecification +InferIdType +IntegerType +IsAny +Join +KeysOfAType +KeysOfOtherType +ListIndexesOptions +ListSearchIndexesOptions +MatchKeysAndValues +MongoClientEvents +MongoErrorLabel +MonitorEvents +NestedPaths +NestedPathsOfType +NonObjectIdLikeDocument +NotAcceptedFields +NumericType +OIDCCallbackFunction +OneOrMore +OnlyFieldsOfType +OperationTime +OptionalId +OptionalUnlessRequiredId +ProfilingLevel +ProfilingLevelOptions +PropertyType +PullAllOperator +PullOperator +PushOperator +ReadConcernLevel +ReadConcernLike +ReadPreferenceLike +ReadPreferenceMode +RegExpOrString +RemoveUserOptions +ResumeToken +ReturnDocument +RunCommandOptions +RunCursorCommandOptions +SchemaMember +ServerApiVersion +ServerEvents +ServerMonitoringMode +ServerSessionId +ServerType +SetFields +SetProfilingLevelOptions +Sort +SortDirection +Stream +StrictFilter +StrictMatchKeysAndValues +StrictUpdateFilter +SupportedNodeConnectionOptions +SupportedSocketOptions +SupportedTLSConnectionOptions +SupportedTLSSocketOptions +TagSet +TopologyEvents +TopologyType +UpdateFilter +W +WithId +WithoutId +WithSessionCallback +WithTransactionCallback +AuthMechanism +AutoEncryptionLoggerLevel +BatchType +Compressor +CURSOR_FLAGS +ExplainVerbosity +GSSAPICanonicalizationValue +LEGAL_TCP_SOCKET_OPTIONS +LEGAL_TLS_SOCKET_OPTIONS +MONGO_CLIENT_EVENTS +MongoErrorLabel +ProfilingLevel +ReadConcernLevel +ReadPreferenceMode +ReturnDocument +ServerApiVersion +ServerMonitoringMode +ServerType +TopologyType +configureExplicitResourceManagement +

Other

Re-exports Binary
Re-exports BSONRegExp
Re-exports BSONSymbol
Re-exports BSONType
Re-exports Code
Re-exports DBRef
Re-exports Decimal128
Re-exports deserialize
Re-exports Document
Re-exports Double
Re-exports Int32
Re-exports Long
Re-exports MaxKey
Re-exports MinKey
Re-exports ObjectId
Re-exports serialize
Re-exports Timestamp
Re-exports UUID
diff --git a/docs/6.9/modules/BSON.html b/docs/6.9/modules/BSON.html new file mode 100644 index 0000000000..860c6ece56 --- /dev/null +++ b/docs/6.9/modules/BSON.html @@ -0,0 +1,69 @@ +BSON | mongodb

Namespace BSON

Index

BSONType

Error

Error + + + +An error generated when BSON bytes are invalid. +Reports the offset the parser was able to reach before encountering the error.

Error + +An error generated when BSON functions encounter an unexpected input +or reaches an unexpected/invalid internal state

Error + +`BSONError` objects are thrown when BSON encounters an error. + +This is the parent class for all the other errors thrown by this library.

Other

diff --git a/docs/6.9/types/AbstractCursorEvents.html b/docs/6.9/types/AbstractCursorEvents.html new file mode 100644 index 0000000000..59001ea8ce --- /dev/null +++ b/docs/6.9/types/AbstractCursorEvents.html @@ -0,0 +1 @@ +AbstractCursorEvents | mongodb

Type Alias AbstractCursorEvents

AbstractCursorEvents: {
    close(): void;
}
diff --git a/docs/6.9/types/AcceptedFields.html b/docs/6.9/types/AcceptedFields.html new file mode 100644 index 0000000000..280a75724c --- /dev/null +++ b/docs/6.9/types/AcceptedFields.html @@ -0,0 +1 @@ +AcceptedFields | mongodb

Type Alias AcceptedFields<TSchema, FieldType, AssignableType>

AcceptedFields<TSchema, FieldType, AssignableType>: {
    readonly [key in KeysOfAType<TSchema, FieldType>]?: AssignableType
}

Type Parameters

  • TSchema
  • FieldType
  • AssignableType
diff --git a/docs/6.9/types/AddToSetOperators.html b/docs/6.9/types/AddToSetOperators.html new file mode 100644 index 0000000000..a77e3b5623 --- /dev/null +++ b/docs/6.9/types/AddToSetOperators.html @@ -0,0 +1 @@ +AddToSetOperators | mongodb

Type Alias AddToSetOperators<Type>

AddToSetOperators<Type>: {
    $each?: Flatten<Type>[];
}

Type Parameters

  • Type
diff --git a/docs/6.9/types/AlternativeType.html b/docs/6.9/types/AlternativeType.html new file mode 100644 index 0000000000..87e7f9157c --- /dev/null +++ b/docs/6.9/types/AlternativeType.html @@ -0,0 +1,4 @@ +AlternativeType | mongodb

Type Alias AlternativeType<T>

AlternativeType<T>: T extends ReadonlyArray<infer U>
    ? T | RegExpOrString<U>
    : RegExpOrString<T>

It is possible to search using alternative types in mongodb e.g. +string types can be searched using a regex in mongo +array types can be searched using their element type

+

Type Parameters

  • T
diff --git a/docs/6.9/types/AnyBulkWriteOperation.html b/docs/6.9/types/AnyBulkWriteOperation.html new file mode 100644 index 0000000000..5fec747b5c --- /dev/null +++ b/docs/6.9/types/AnyBulkWriteOperation.html @@ -0,0 +1 @@ +AnyBulkWriteOperation | mongodb

Type Alias AnyBulkWriteOperation<TSchema>

AnyBulkWriteOperation<TSchema>:
    | {
        insertOne: InsertOneModel<TSchema>;
    }
    | {
        replaceOne: ReplaceOneModel<TSchema>;
    }
    | {
        updateOne: UpdateOneModel<TSchema>;
    }
    | {
        updateMany: UpdateManyModel<TSchema>;
    }
    | {
        deleteOne: DeleteOneModel<TSchema>;
    }
    | {
        deleteMany: DeleteManyModel<TSchema>;
    }

Type Parameters

diff --git a/docs/6.9/types/AnyError.html b/docs/6.9/types/AnyError.html new file mode 100644 index 0000000000..8d68207520 --- /dev/null +++ b/docs/6.9/types/AnyError.html @@ -0,0 +1 @@ +AnyError | mongodb

Type Alias AnyError

AnyError: MongoError | Error
diff --git a/docs/6.9/types/ArrayElement.html b/docs/6.9/types/ArrayElement.html new file mode 100644 index 0000000000..5060225a62 --- /dev/null +++ b/docs/6.9/types/ArrayElement.html @@ -0,0 +1 @@ +ArrayElement | mongodb

Type Alias ArrayElement<Type>

ArrayElement<Type>: Type extends ReadonlyArray<infer Item>
    ? Item
    : never

Type Parameters

  • Type
diff --git a/docs/6.9/types/ArrayOperator.html b/docs/6.9/types/ArrayOperator.html new file mode 100644 index 0000000000..62cda49faa --- /dev/null +++ b/docs/6.9/types/ArrayOperator.html @@ -0,0 +1 @@ +ArrayOperator | mongodb

Type Alias ArrayOperator<Type>

ArrayOperator<Type>: {
    $each?: Flatten<Type>[];
    $position?: number;
    $slice?: number;
    $sort?: Sort;
}

Type Parameters

  • Type
diff --git a/docs/6.9/types/AuthMechanism.html b/docs/6.9/types/AuthMechanism.html new file mode 100644 index 0000000000..79a75cf289 --- /dev/null +++ b/docs/6.9/types/AuthMechanism.html @@ -0,0 +1 @@ +AuthMechanism | mongodb

Type Alias AuthMechanism

AuthMechanism: typeof AuthMechanism[keyof typeof AuthMechanism]
diff --git a/docs/6.9/types/AutoEncryptionExtraOptions.html b/docs/6.9/types/AutoEncryptionExtraOptions.html new file mode 100644 index 0000000000..2ac066508e --- /dev/null +++ b/docs/6.9/types/AutoEncryptionExtraOptions.html @@ -0,0 +1,3 @@ +AutoEncryptionExtraOptions | mongodb

Type Alias AutoEncryptionExtraOptions

AutoEncryptionExtraOptions: NonNullable<AutoEncryptionOptions["extraOptions"]>

Extra options related to the mongocryptd process +* Available in MongoDB 6.0 or higher.

+
diff --git a/docs/6.9/types/AutoEncryptionLoggerLevel.html b/docs/6.9/types/AutoEncryptionLoggerLevel.html new file mode 100644 index 0000000000..9f1dedc788 --- /dev/null +++ b/docs/6.9/types/AutoEncryptionLoggerLevel.html @@ -0,0 +1,32 @@ +AutoEncryptionLoggerLevel | mongodb

Type Alias AutoEncryptionLoggerLevel

AutoEncryptionLoggerLevel: typeof AutoEncryptionLoggerLevel[keyof typeof AutoEncryptionLoggerLevel]

The level of severity of the log message

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueLevel
0Fatal Error
1Error
2Warning
3Info
4Trace
+
diff --git a/docs/6.9/types/AzureKMSProviderConfiguration.html b/docs/6.9/types/AzureKMSProviderConfiguration.html new file mode 100644 index 0000000000..a65ff4b825 --- /dev/null +++ b/docs/6.9/types/AzureKMSProviderConfiguration.html @@ -0,0 +1,9 @@ +AzureKMSProviderConfiguration | mongodb

Type Alias AzureKMSProviderConfiguration

AzureKMSProviderConfiguration: {
    clientId: string;
    clientSecret: string;
    identityPlatformEndpoint?: string;
    tenantId: string;
} | {
    accessToken: string;
}

Type declaration

  • clientId: string

    The client ID to authenticate a registered application

    +
  • clientSecret: string

    The client secret to authenticate a registered application

    +
  • OptionalidentityPlatformEndpoint?: string

    If present, a host with optional port. E.g. "example.com" or "example.com:443". +This is optional, and only needed if customer is using a non-commercial Azure instance +(e.g. a government or China account, which use different URLs). +Defaults to "login.microsoftonline.com"

    +
  • tenantId: string

    The tenant ID identifies the organization for the account

    +

Type declaration

  • accessToken: string

    If present, an access token to authenticate with Azure.

    +
diff --git a/docs/6.9/types/BSON.BSONType.html b/docs/6.9/types/BSON.BSONType.html new file mode 100644 index 0000000000..0cf7a7b376 --- /dev/null +++ b/docs/6.9/types/BSON.BSONType.html @@ -0,0 +1 @@ +BSONType | mongodb

Type Alias BSONType

BSONType: typeof BSON.BSONType[keyof typeof BSON.BSONType]
diff --git a/docs/6.9/types/BSON.BinarySequence.html b/docs/6.9/types/BSON.BinarySequence.html new file mode 100644 index 0000000000..c1333eeedb --- /dev/null +++ b/docs/6.9/types/BSON.BinarySequence.html @@ -0,0 +1 @@ +BinarySequence | mongodb

Type Alias BinarySequence

BinarySequence: Uint8Array | number[]
diff --git a/docs/6.9/types/BSON.CalculateObjectSizeOptions.html b/docs/6.9/types/BSON.CalculateObjectSizeOptions.html new file mode 100644 index 0000000000..058d89c174 --- /dev/null +++ b/docs/6.9/types/BSON.CalculateObjectSizeOptions.html @@ -0,0 +1 @@ +CalculateObjectSizeOptions | mongodb

Type Alias CalculateObjectSizeOptions

CalculateObjectSizeOptions: Pick<SerializeOptions, "serializeFunctions" | "ignoreUndefined">
diff --git a/docs/6.9/types/BSON.EJSONOptions.html b/docs/6.9/types/BSON.EJSONOptions.html new file mode 100644 index 0000000000..2a850f0540 --- /dev/null +++ b/docs/6.9/types/BSON.EJSONOptions.html @@ -0,0 +1,7 @@ +EJSONOptions | mongodb

Type Alias EJSONOptions

EJSONOptions: {
    legacy?: boolean;
    relaxed?: boolean;
    useBigInt64?: boolean;
}

Type declaration

  • Optionallegacy?: boolean

    Output using the Extended JSON v1 spec

    +

    false

    +
  • Optionalrelaxed?: boolean

    Enable Extended JSON's relaxed mode, which attempts to return native JS types where possible, rather than BSON types

    +

    false

    +
  • OptionaluseBigInt64?: boolean

    Enable native bigint support

    +

    false

    +
diff --git a/docs/6.9/types/BSON.LongWithoutOverrides.html b/docs/6.9/types/BSON.LongWithoutOverrides.html new file mode 100644 index 0000000000..53b7ebcf78 --- /dev/null +++ b/docs/6.9/types/BSON.LongWithoutOverrides.html @@ -0,0 +1 @@ +LongWithoutOverrides | mongodb

Type Alias LongWithoutOverrides

LongWithoutOverrides: (new (low: unknown, high?: number | boolean, unsigned?: boolean) => {
    [P in Exclude<keyof Long, TimestampOverrides>]: Long[P]
})
diff --git a/docs/6.9/types/BSON.OnDemand.html b/docs/6.9/types/BSON.OnDemand.html new file mode 100644 index 0000000000..976625d473 --- /dev/null +++ b/docs/6.9/types/BSON.OnDemand.html @@ -0,0 +1,2 @@ +OnDemand | mongodb

Type Alias OnDemandExperimental

OnDemand: {
    BSONElement: BSONElement;
    ByteUtils: ByteUtils;
    NumberUtils: NumberUtils;
    parseToElements: ((this: void, bytes: Uint8Array, startOffset?: number) => Iterable<BSONElement>);
}

A new set of BSON APIs that are currently experimental and not intended for production use.

+
diff --git a/docs/6.9/types/BSON.TimestampOverrides.html b/docs/6.9/types/BSON.TimestampOverrides.html new file mode 100644 index 0000000000..80bd681ed5 --- /dev/null +++ b/docs/6.9/types/BSON.TimestampOverrides.html @@ -0,0 +1 @@ +TimestampOverrides | mongodb

Type Alias TimestampOverrides

TimestampOverrides:
    | "_bsontype"
    | "toExtendedJSON"
    | "fromExtendedJSON"
    | "inspect"
diff --git a/docs/6.9/types/BSON.UUIDExtended.html b/docs/6.9/types/BSON.UUIDExtended.html new file mode 100644 index 0000000000..d3586ce02f --- /dev/null +++ b/docs/6.9/types/BSON.UUIDExtended.html @@ -0,0 +1 @@ +UUIDExtended | mongodb

Type Alias UUIDExtended

UUIDExtended: {
    $uuid: string;
}
diff --git a/docs/6.9/types/BSONTypeAlias.html b/docs/6.9/types/BSONTypeAlias.html new file mode 100644 index 0000000000..0e8999791e --- /dev/null +++ b/docs/6.9/types/BSONTypeAlias.html @@ -0,0 +1 @@ +BSONTypeAlias | mongodb

Type Alias BSONTypeAlias

BSONTypeAlias: keyof typeof BSON.BSONType
diff --git a/docs/6.9/types/BatchType.html b/docs/6.9/types/BatchType.html new file mode 100644 index 0000000000..e687240201 --- /dev/null +++ b/docs/6.9/types/BatchType.html @@ -0,0 +1 @@ +BatchType | mongodb

Type Alias BatchType

BatchType: typeof BatchType[keyof typeof BatchType]
diff --git a/docs/6.9/types/BitwiseFilter.html b/docs/6.9/types/BitwiseFilter.html new file mode 100644 index 0000000000..848dc98a1a --- /dev/null +++ b/docs/6.9/types/BitwiseFilter.html @@ -0,0 +1 @@ +BitwiseFilter | mongodb

Type Alias BitwiseFilter

BitwiseFilter: number | Binary | ReadonlyArray<number>
diff --git a/docs/6.9/types/CSFLEKMSTlsOptions.html b/docs/6.9/types/CSFLEKMSTlsOptions.html new file mode 100644 index 0000000000..553f1091d6 --- /dev/null +++ b/docs/6.9/types/CSFLEKMSTlsOptions.html @@ -0,0 +1 @@ +CSFLEKMSTlsOptions | mongodb

Type Alias CSFLEKMSTlsOptions

CSFLEKMSTlsOptions: {
    aws?: ClientEncryptionTlsOptions;
    azure?: ClientEncryptionTlsOptions;
    gcp?: ClientEncryptionTlsOptions;
    kmip?: ClientEncryptionTlsOptions;
    local?: ClientEncryptionTlsOptions;
    [key: string]: ClientEncryptionTlsOptions | undefined;
}
diff --git a/docs/6.9/types/Callback.html b/docs/6.9/types/Callback.html new file mode 100644 index 0000000000..b50beaa701 --- /dev/null +++ b/docs/6.9/types/Callback.html @@ -0,0 +1,2 @@ +Callback | mongodb

Type Alias Callback<T>

Callback<T>: ((error?: AnyError, result?: T) => void)

MongoDB Driver style callback

+

Type Parameters

  • T = any
diff --git a/docs/6.9/types/ChangeStreamDocument.html b/docs/6.9/types/ChangeStreamDocument.html new file mode 100644 index 0000000000..47533dffd7 --- /dev/null +++ b/docs/6.9/types/ChangeStreamDocument.html @@ -0,0 +1 @@ +ChangeStreamDocument | mongodb
diff --git a/docs/6.9/types/ChangeStreamEvents.html b/docs/6.9/types/ChangeStreamEvents.html new file mode 100644 index 0000000000..3a3b4e4a51 --- /dev/null +++ b/docs/6.9/types/ChangeStreamEvents.html @@ -0,0 +1 @@ +ChangeStreamEvents | mongodb

Type Alias ChangeStreamEvents<TSchema, TChange>

ChangeStreamEvents<TSchema, TChange>: {
    change(change: TChange): void;
    end(): void;
    error(error: Error): void;
    init(response: any): void;
    more(response?: any): void;
    response(): void;
    resumeTokenChanged(token: unknown): void;
} & AbstractCursorEvents

Type Parameters

diff --git a/docs/6.9/types/ClientEncryptionDataKeyProvider.html b/docs/6.9/types/ClientEncryptionDataKeyProvider.html new file mode 100644 index 0000000000..0cb4a16373 --- /dev/null +++ b/docs/6.9/types/ClientEncryptionDataKeyProvider.html @@ -0,0 +1,8 @@ +ClientEncryptionDataKeyProvider | mongodb

Type Alias ClientEncryptionDataKeyProvider

ClientEncryptionDataKeyProvider: keyof KMSProviders

A data key provider. Allowed values:

+
    +
  • aws, gcp, local, kmip or azure
  • +
  • (mongodb-client-encryption>=6.0.1 only) a named key, in the form of: +aws:<name>, gcp:<name>, local:<name>, kmip:<name>, azure:<name> +where name is an alphanumeric string, underscores allowed.
  • +
+
diff --git a/docs/6.9/types/ClientEncryptionSocketOptions.html b/docs/6.9/types/ClientEncryptionSocketOptions.html new file mode 100644 index 0000000000..72a1ac50e2 --- /dev/null +++ b/docs/6.9/types/ClientEncryptionSocketOptions.html @@ -0,0 +1,2 @@ +ClientEncryptionSocketOptions | mongodb

Type Alias ClientEncryptionSocketOptions

ClientEncryptionSocketOptions: Pick<MongoClientOptions, "autoSelectFamily" | "autoSelectFamilyAttemptTimeout">

Socket options to use for KMS requests.

+
diff --git a/docs/6.9/types/ClientEncryptionTlsOptions.html b/docs/6.9/types/ClientEncryptionTlsOptions.html new file mode 100644 index 0000000000..382b9606f0 --- /dev/null +++ b/docs/6.9/types/ClientEncryptionTlsOptions.html @@ -0,0 +1,9 @@ +ClientEncryptionTlsOptions | mongodb

Type Alias ClientEncryptionTlsOptions

ClientEncryptionTlsOptions: Pick<MongoClientOptions, "tlsCAFile" | "tlsCertificateKeyFile" | "tlsCertificateKeyFilePassword">

TLS options to use when connecting. The spec specifically calls out which insecure +tls options are not allowed:

+
    +
  • tlsAllowInvalidCertificates
  • +
  • tlsAllowInvalidHostnames
  • +
  • tlsInsecure
  • +
+

These options are not included in the type, and are ignored if provided.

+
diff --git a/docs/6.9/types/ClientSessionEvents.html b/docs/6.9/types/ClientSessionEvents.html new file mode 100644 index 0000000000..78e18693b9 --- /dev/null +++ b/docs/6.9/types/ClientSessionEvents.html @@ -0,0 +1 @@ +ClientSessionEvents | mongodb

Type Alias ClientSessionEvents

ClientSessionEvents: {
    ended(session: ClientSession): void;
}
diff --git a/docs/6.9/types/CommonEvents.html b/docs/6.9/types/CommonEvents.html new file mode 100644 index 0000000000..824437db1a --- /dev/null +++ b/docs/6.9/types/CommonEvents.html @@ -0,0 +1 @@ +CommonEvents | mongodb

Type Alias CommonEvents

CommonEvents: "newListener" | "removeListener"
diff --git a/docs/6.9/types/Compressor.html b/docs/6.9/types/Compressor.html new file mode 100644 index 0000000000..2ca1edfd44 --- /dev/null +++ b/docs/6.9/types/Compressor.html @@ -0,0 +1 @@ +Compressor | mongodb
diff --git a/docs/6.9/types/CompressorName.html b/docs/6.9/types/CompressorName.html new file mode 100644 index 0000000000..eb139b5ac6 --- /dev/null +++ b/docs/6.9/types/CompressorName.html @@ -0,0 +1 @@ +CompressorName | mongodb

Type Alias CompressorName

CompressorName: keyof typeof Compressor
diff --git a/docs/6.9/types/Condition.html b/docs/6.9/types/Condition.html new file mode 100644 index 0000000000..b0a879f895 --- /dev/null +++ b/docs/6.9/types/Condition.html @@ -0,0 +1 @@ +Condition | mongodb

Type Alias Condition<T>

Type Parameters

  • T
diff --git a/docs/6.9/types/ConnectionEvents.html b/docs/6.9/types/ConnectionEvents.html new file mode 100644 index 0000000000..f7742d7c62 --- /dev/null +++ b/docs/6.9/types/ConnectionEvents.html @@ -0,0 +1 @@ +ConnectionEvents | mongodb

Type Alias ConnectionEvents

ConnectionEvents: {
    close(): void;
    clusterTimeReceived(clusterTime: Document): void;
    commandFailed(event: CommandFailedEvent): void;
    commandStarted(event: CommandStartedEvent): void;
    commandSucceeded(event: CommandSucceededEvent): void;
    pinned(pinType: string): void;
    unpinned(pinType: string): void;
}
diff --git a/docs/6.9/types/ConnectionPoolEvents.html b/docs/6.9/types/ConnectionPoolEvents.html new file mode 100644 index 0000000000..67e6e1f8d2 --- /dev/null +++ b/docs/6.9/types/ConnectionPoolEvents.html @@ -0,0 +1 @@ +ConnectionPoolEvents | mongodb

Type Alias ConnectionPoolEvents

ConnectionPoolEvents: {
    connectionCheckedIn(event: ConnectionCheckedInEvent): void;
    connectionCheckedOut(event: ConnectionCheckedOutEvent): void;
    connectionCheckOutFailed(event: ConnectionCheckOutFailedEvent): void;
    connectionCheckOutStarted(event: ConnectionCheckOutStartedEvent): void;
    connectionClosed(event: ConnectionClosedEvent): void;
    connectionCreated(event: ConnectionCreatedEvent): void;
    connectionPoolCleared(event: ConnectionPoolClearedEvent): void;
    connectionPoolClosed(event: ConnectionPoolClosedEvent): void;
    connectionPoolCreated(event: ConnectionPoolCreatedEvent): void;
    connectionPoolReady(event: ConnectionPoolReadyEvent): void;
    connectionReady(event: ConnectionReadyEvent): void;
} & Omit<ConnectionEvents, "close" | "message">
diff --git a/docs/6.9/types/CursorFlag.html b/docs/6.9/types/CursorFlag.html new file mode 100644 index 0000000000..30bf58808f --- /dev/null +++ b/docs/6.9/types/CursorFlag.html @@ -0,0 +1 @@ +CursorFlag | mongodb

Type Alias CursorFlag

CursorFlag: typeof CURSOR_FLAGS[number]
diff --git a/docs/6.9/types/DistinctOptions.html b/docs/6.9/types/DistinctOptions.html new file mode 100644 index 0000000000..2d0b09bdb6 --- /dev/null +++ b/docs/6.9/types/DistinctOptions.html @@ -0,0 +1 @@ +DistinctOptions | mongodb

Type Alias DistinctOptions

DistinctOptions: CommandOperationOptions
diff --git a/docs/6.9/types/DropDatabaseOptions.html b/docs/6.9/types/DropDatabaseOptions.html new file mode 100644 index 0000000000..0b615bf651 --- /dev/null +++ b/docs/6.9/types/DropDatabaseOptions.html @@ -0,0 +1 @@ +DropDatabaseOptions | mongodb

Type Alias DropDatabaseOptions

DropDatabaseOptions: CommandOperationOptions
diff --git a/docs/6.9/types/DropIndexesOptions.html b/docs/6.9/types/DropIndexesOptions.html new file mode 100644 index 0000000000..bf261cbd3c --- /dev/null +++ b/docs/6.9/types/DropIndexesOptions.html @@ -0,0 +1 @@ +DropIndexesOptions | mongodb

Type Alias DropIndexesOptions

DropIndexesOptions: CommandOperationOptions
diff --git a/docs/6.9/types/EnhancedOmit.html b/docs/6.9/types/EnhancedOmit.html new file mode 100644 index 0000000000..ce56190979 --- /dev/null +++ b/docs/6.9/types/EnhancedOmit.html @@ -0,0 +1,2 @@ +EnhancedOmit | mongodb

Type Alias EnhancedOmit<TRecordOrUnion, KeyUnion>

EnhancedOmit<TRecordOrUnion, KeyUnion>: string extends keyof TRecordOrUnion
    ? TRecordOrUnion
    : TRecordOrUnion extends any
        ? Pick<TRecordOrUnion, Exclude<keyof TRecordOrUnion, KeyUnion>>
        : never

TypeScript Omit (Exclude to be specific) does not work for objects with an "any" indexed type, and breaks discriminated unions

+

Type Parameters

  • TRecordOrUnion
  • KeyUnion
diff --git a/docs/6.9/types/EventEmitterWithState.html b/docs/6.9/types/EventEmitterWithState.html new file mode 100644 index 0000000000..74b78c9e25 --- /dev/null +++ b/docs/6.9/types/EventEmitterWithState.html @@ -0,0 +1 @@ +EventEmitterWithState | mongodb

Type Alias EventEmitterWithState

EventEmitterWithState: {}
diff --git a/docs/6.9/types/EventsDescription.html b/docs/6.9/types/EventsDescription.html new file mode 100644 index 0000000000..c25e8aa49d --- /dev/null +++ b/docs/6.9/types/EventsDescription.html @@ -0,0 +1,2 @@ +EventsDescription | mongodb

Type Alias EventsDescription

EventsDescription: Record<string, GenericListener>

Event description type

+
diff --git a/docs/6.9/types/ExplainVerbosity.html b/docs/6.9/types/ExplainVerbosity.html new file mode 100644 index 0000000000..709923e1f5 --- /dev/null +++ b/docs/6.9/types/ExplainVerbosity.html @@ -0,0 +1 @@ +ExplainVerbosity | mongodb

Type Alias ExplainVerbosity

ExplainVerbosity: string
diff --git a/docs/6.9/types/ExplainVerbosityLike.html b/docs/6.9/types/ExplainVerbosityLike.html new file mode 100644 index 0000000000..af1965e906 --- /dev/null +++ b/docs/6.9/types/ExplainVerbosityLike.html @@ -0,0 +1,4 @@ +ExplainVerbosityLike | mongodb

Type Alias ExplainVerbosityLike

ExplainVerbosityLike: ExplainVerbosity | boolean

For backwards compatibility, true is interpreted as "allPlansExecution" +and false as "queryPlanner". Prior to server version 3.6, aggregate() +ignores the verbosity parameter and executes in "queryPlanner".

+
diff --git a/docs/6.9/types/Filter.html b/docs/6.9/types/Filter.html new file mode 100644 index 0000000000..1003ed75df --- /dev/null +++ b/docs/6.9/types/Filter.html @@ -0,0 +1,2 @@ +Filter | mongodb

Type Alias Filter<TSchema>

Filter<TSchema>: {
    [P in keyof WithId<TSchema>]?: Condition<WithId<TSchema>[P]>
} & RootFilterOperators<WithId<TSchema>>

A MongoDB filter can be some portion of the schema or a set of operators

+

Type Parameters

  • TSchema
diff --git a/docs/6.9/types/FilterOperations.html b/docs/6.9/types/FilterOperations.html new file mode 100644 index 0000000000..c6664e7b6c --- /dev/null +++ b/docs/6.9/types/FilterOperations.html @@ -0,0 +1 @@ +FilterOperations | mongodb

Type Alias FilterOperations<T>

FilterOperations<T>: T extends Record<string, any>
    ? {
        [key in keyof T]?: FilterOperators<T[key]>
    }
    : FilterOperators<T>

Type Parameters

  • T
diff --git a/docs/6.9/types/Flatten.html b/docs/6.9/types/Flatten.html new file mode 100644 index 0000000000..c35f7c5415 --- /dev/null +++ b/docs/6.9/types/Flatten.html @@ -0,0 +1 @@ +Flatten | mongodb

Type Alias Flatten<Type>

Flatten<Type>: Type extends ReadonlyArray<infer Item>
    ? Item
    : Type

Type Parameters

  • Type
diff --git a/docs/6.9/types/GCPKMSProviderConfiguration.html b/docs/6.9/types/GCPKMSProviderConfiguration.html new file mode 100644 index 0000000000..15a52fef77 --- /dev/null +++ b/docs/6.9/types/GCPKMSProviderConfiguration.html @@ -0,0 +1,6 @@ +GCPKMSProviderConfiguration | mongodb

Type Alias GCPKMSProviderConfiguration

GCPKMSProviderConfiguration: {
    email: string;
    endpoint?: string;
    privateKey: string | Buffer;
} | {
    accessToken: string;
}

Type declaration

  • email: string

    The service account email to authenticate

    +
  • Optionalendpoint?: string

    If present, a host with optional port. E.g. "example.com" or "example.com:443". +Defaults to "oauth2.googleapis.com"

    +
  • privateKey: string | Buffer

    A PKCS#8 encrypted key. This can either be a base64 string or a binary representation

    +

Type declaration

  • accessToken: string

    If present, an access token to authenticate with GCP.

    +
diff --git a/docs/6.9/types/GSSAPICanonicalizationValue.html b/docs/6.9/types/GSSAPICanonicalizationValue.html new file mode 100644 index 0000000000..a434b14c48 --- /dev/null +++ b/docs/6.9/types/GSSAPICanonicalizationValue.html @@ -0,0 +1 @@ +GSSAPICanonicalizationValue | mongodb

Type Alias GSSAPICanonicalizationValue

GSSAPICanonicalizationValue: typeof GSSAPICanonicalizationValue[keyof typeof GSSAPICanonicalizationValue]
diff --git a/docs/6.9/types/GenericListener.html b/docs/6.9/types/GenericListener.html new file mode 100644 index 0000000000..8597daa8f7 --- /dev/null +++ b/docs/6.9/types/GenericListener.html @@ -0,0 +1 @@ +GenericListener | mongodb

Type Alias GenericListener

GenericListener: ((...args: any[]) => void)
diff --git a/docs/6.9/types/GridFSBucketEvents.html b/docs/6.9/types/GridFSBucketEvents.html new file mode 100644 index 0000000000..df2fe6e071 --- /dev/null +++ b/docs/6.9/types/GridFSBucketEvents.html @@ -0,0 +1 @@ +GridFSBucketEvents | mongodb

Type Alias GridFSBucketEvents

GridFSBucketEvents: {
    index(): void;
}
diff --git a/docs/6.9/types/Hint.html b/docs/6.9/types/Hint.html new file mode 100644 index 0000000000..46a4587b36 --- /dev/null +++ b/docs/6.9/types/Hint.html @@ -0,0 +1 @@ +Hint | mongodb

Type Alias Hint

Hint: string | Document
diff --git a/docs/6.9/types/IndexDescriptionCompact.html b/docs/6.9/types/IndexDescriptionCompact.html new file mode 100644 index 0000000000..3e6606c11a --- /dev/null +++ b/docs/6.9/types/IndexDescriptionCompact.html @@ -0,0 +1 @@ +IndexDescriptionCompact | mongodb

Type Alias IndexDescriptionCompact

IndexDescriptionCompact: Record<string, [name: string, direction: IndexDirection][]>
diff --git a/docs/6.9/types/IndexDescriptionInfo.html b/docs/6.9/types/IndexDescriptionInfo.html new file mode 100644 index 0000000000..6d4f9bd611 --- /dev/null +++ b/docs/6.9/types/IndexDescriptionInfo.html @@ -0,0 +1,2 @@ +IndexDescriptionInfo | mongodb

Type Alias IndexDescriptionInfo

IndexDescriptionInfo: Omit<IndexDescription, "key" | "version"> & {
    key: {
        [key: string]: IndexDirection;
    };
    v?: IndexDescription["version"];
} & Document
diff --git a/docs/6.9/types/IndexDirection.html b/docs/6.9/types/IndexDirection.html new file mode 100644 index 0000000000..b4487fe29c --- /dev/null +++ b/docs/6.9/types/IndexDirection.html @@ -0,0 +1 @@ +IndexDirection | mongodb

Type Alias IndexDirection

IndexDirection:
    | -1
    | 1
    | "2d"
    | "2dsphere"
    | "text"
    | "geoHaystack"
    | "hashed"
    | number
diff --git a/docs/6.9/types/IndexSpecification.html b/docs/6.9/types/IndexSpecification.html new file mode 100644 index 0000000000..bafe8095a8 --- /dev/null +++ b/docs/6.9/types/IndexSpecification.html @@ -0,0 +1 @@ +IndexSpecification | mongodb

Type Alias IndexSpecification

IndexSpecification: OneOrMore<
    | string
    | [string, IndexDirection]
    | {
        [key: string]: IndexDirection;
    }
    | Map<string, IndexDirection>>
diff --git a/docs/6.9/types/InferIdType.html b/docs/6.9/types/InferIdType.html new file mode 100644 index 0000000000..d1cb4ceaec --- /dev/null +++ b/docs/6.9/types/InferIdType.html @@ -0,0 +1,2 @@ +InferIdType | mongodb

Type Alias InferIdType<TSchema>

InferIdType<TSchema>: TSchema extends {
        _id: infer IdType;
    }
    ? Record<any, never> extends IdType
        ? never
        : IdType
    : TSchema extends {
            _id?: infer IdType;
        }
        ? unknown extends IdType
            ? ObjectId
            : IdType
        : ObjectId

Given an object shaped type, return the type of the _id field or default to ObjectId

+

Type Parameters

  • TSchema
diff --git a/docs/6.9/types/IntegerType.html b/docs/6.9/types/IntegerType.html new file mode 100644 index 0000000000..7313a29f30 --- /dev/null +++ b/docs/6.9/types/IntegerType.html @@ -0,0 +1 @@ +IntegerType | mongodb

Type Alias IntegerType

IntegerType:
    | number
    | Int32
    | Long
    | bigint
diff --git a/docs/6.9/types/IsAny.html b/docs/6.9/types/IsAny.html new file mode 100644 index 0000000000..c23765642a --- /dev/null +++ b/docs/6.9/types/IsAny.html @@ -0,0 +1 @@ +IsAny | mongodb

Type Alias IsAny<Type, ResultIfAny, ResultIfNotAny>

IsAny<Type, ResultIfAny, ResultIfNotAny>: true extends false & Type
    ? ResultIfAny
    : ResultIfNotAny

Type Parameters

  • Type
  • ResultIfAny
  • ResultIfNotAny
diff --git a/docs/6.9/types/Join.html b/docs/6.9/types/Join.html new file mode 100644 index 0000000000..e2e5738624 --- /dev/null +++ b/docs/6.9/types/Join.html @@ -0,0 +1 @@ +Join | mongodb

Type Alias Join<T, D>

Join<T, D>: T extends []
    ? ""
    : T extends [string | number]
        ? `${T[0]}`
        : T extends [string | number, ...(infer R)]
            ? `${T[0]}${D}${Join<R, D>}`
            : string

Type Parameters

  • T extends unknown[]
  • D extends string
diff --git a/docs/6.9/types/KeysOfAType.html b/docs/6.9/types/KeysOfAType.html new file mode 100644 index 0000000000..71a854bea0 --- /dev/null +++ b/docs/6.9/types/KeysOfAType.html @@ -0,0 +1 @@ +KeysOfAType | mongodb

Type Alias KeysOfAType<TSchema, Type>

KeysOfAType<TSchema, Type>: {
    [key in keyof TSchema]: NonNullable<TSchema[key]> extends Type
        ? key
        : never
}[keyof TSchema]

Type Parameters

  • TSchema
  • Type
diff --git a/docs/6.9/types/KeysOfOtherType.html b/docs/6.9/types/KeysOfOtherType.html new file mode 100644 index 0000000000..9d3e85d067 --- /dev/null +++ b/docs/6.9/types/KeysOfOtherType.html @@ -0,0 +1 @@ +KeysOfOtherType | mongodb

Type Alias KeysOfOtherType<TSchema, Type>

KeysOfOtherType<TSchema, Type>: {
    [key in keyof TSchema]: NonNullable<TSchema[key]> extends Type
        ? never
        : key
}[keyof TSchema]

Type Parameters

  • TSchema
  • Type
diff --git a/docs/6.9/types/ListIndexesOptions.html b/docs/6.9/types/ListIndexesOptions.html new file mode 100644 index 0000000000..390d6d222d --- /dev/null +++ b/docs/6.9/types/ListIndexesOptions.html @@ -0,0 +1 @@ +ListIndexesOptions | mongodb

Type Alias ListIndexesOptions

ListIndexesOptions: AbstractCursorOptions
diff --git a/docs/6.9/types/ListSearchIndexesOptions.html b/docs/6.9/types/ListSearchIndexesOptions.html new file mode 100644 index 0000000000..40b9b91f24 --- /dev/null +++ b/docs/6.9/types/ListSearchIndexesOptions.html @@ -0,0 +1 @@ +ListSearchIndexesOptions | mongodb

Type Alias ListSearchIndexesOptions

ListSearchIndexesOptions: Omit<AggregateOptions, "readConcern" | "writeConcern">
diff --git a/docs/6.9/types/MatchKeysAndValues.html b/docs/6.9/types/MatchKeysAndValues.html new file mode 100644 index 0000000000..47d57e0e74 --- /dev/null +++ b/docs/6.9/types/MatchKeysAndValues.html @@ -0,0 +1 @@ +MatchKeysAndValues | mongodb

Type Alias MatchKeysAndValues<TSchema>

MatchKeysAndValues<TSchema>: Readonly<Partial<TSchema>> & Record<string, any>

Type Parameters

  • TSchema
diff --git a/docs/6.9/types/MongoClientEvents.html b/docs/6.9/types/MongoClientEvents.html new file mode 100644 index 0000000000..1195f75561 --- /dev/null +++ b/docs/6.9/types/MongoClientEvents.html @@ -0,0 +1 @@ +MongoClientEvents | mongodb

Type Alias MongoClientEvents

MongoClientEvents: Pick<TopologyEvents, typeof MONGO_CLIENT_EVENTS[number]> & {
    open(mongoClient: MongoClient): void;
}
diff --git a/docs/6.9/types/MongoErrorLabel.html b/docs/6.9/types/MongoErrorLabel.html new file mode 100644 index 0000000000..8aedac0c28 --- /dev/null +++ b/docs/6.9/types/MongoErrorLabel.html @@ -0,0 +1 @@ +MongoErrorLabel | mongodb

Type Alias MongoErrorLabel

MongoErrorLabel: typeof MongoErrorLabel[keyof typeof MongoErrorLabel]
diff --git a/docs/6.9/types/MonitorEvents.html b/docs/6.9/types/MonitorEvents.html new file mode 100644 index 0000000000..5df5a7188c --- /dev/null +++ b/docs/6.9/types/MonitorEvents.html @@ -0,0 +1 @@ +MonitorEvents | mongodb

Type Alias MonitorEvents

MonitorEvents: {
    close(): void;
    resetConnectionPool(): void;
    resetServer(error?: MongoError): void;
    serverHeartbeatFailed(event: ServerHeartbeatFailedEvent): void;
    serverHeartbeatStarted(event: ServerHeartbeatStartedEvent): void;
    serverHeartbeatSucceeded(event: ServerHeartbeatSucceededEvent): void;
} & EventEmitterWithState
diff --git a/docs/6.9/types/NestedPaths.html b/docs/6.9/types/NestedPaths.html new file mode 100644 index 0000000000..daa7024541 --- /dev/null +++ b/docs/6.9/types/NestedPaths.html @@ -0,0 +1,8 @@ +NestedPaths | mongodb

Type Alias NestedPaths<Type, Depth>

NestedPaths<Type, Depth>: Depth["length"] extends 8
    ? []
    : Type extends
            | string
            | number
            | bigint
            | boolean
            | Date
            | RegExp
            | Buffer
            | Uint8Array
            | ((...args: any[]) => any)
            | {
                _bsontype: string;
            }
        ? []
        : Type extends ReadonlyArray<infer ArrayType>
            ? [] | [number, ...NestedPaths<ArrayType, [...Depth, 1]>]
            : Type extends Map<string, any>
                ? [string]
                : Type extends object
                    ? {
                        [Key in Extract<keyof Type, string>]: Type[Key] extends Type
                            ? [Key]
                            : Type extends Type[Key]
                                ? [Key]
                                : (...)[(...)] extends ReadonlyArray<(...)>
                                    ? (...) extends (...)
                                        ? (...)
                                        : (...)
                                    : (...) | (...)
                    }[Extract<keyof Type, string>]
                    : []

returns tuple of strings (keys to be joined on '.') that represent every path into a schema +https://www.mongodb.com/docs/manual/tutorial/query-embedded-documents/

+

Type Parameters

  • Type
  • Depth extends number[]

Through testing we determined that a depth of 8 is safe for the typescript compiler +and provides reasonable compilation times. This number is otherwise not special and +should be changed if issues are found with this level of checking. Beyond this +depth any helpers that make use of NestedPaths should devolve to not asserting any +type safety on the input.

+
diff --git a/docs/6.9/types/NestedPathsOfType.html b/docs/6.9/types/NestedPathsOfType.html new file mode 100644 index 0000000000..8432e05fbb --- /dev/null +++ b/docs/6.9/types/NestedPathsOfType.html @@ -0,0 +1,3 @@ +NestedPathsOfType | mongodb

Type Alias NestedPathsOfType<TSchema, Type>

NestedPathsOfType<TSchema, Type>: KeysOfAType<{
    [Property in Join<NestedPaths<TSchema, []>, ".">]: PropertyType<TSchema, Property>
}, Type>

returns keys (strings) for every path into a schema with a value of type +https://www.mongodb.com/docs/manual/tutorial/query-embedded-documents/

+

Type Parameters

  • TSchema
  • Type
diff --git a/docs/6.9/types/NonObjectIdLikeDocument.html b/docs/6.9/types/NonObjectIdLikeDocument.html new file mode 100644 index 0000000000..ee67545911 --- /dev/null +++ b/docs/6.9/types/NonObjectIdLikeDocument.html @@ -0,0 +1,2 @@ +NonObjectIdLikeDocument | mongodb

Type Alias NonObjectIdLikeDocument

NonObjectIdLikeDocument: {
    [key in keyof ObjectIdLike]?: never
} & Document

A type that extends Document but forbids anything that "looks like" an object id.

+
diff --git a/docs/6.9/types/NotAcceptedFields.html b/docs/6.9/types/NotAcceptedFields.html new file mode 100644 index 0000000000..8d56385e38 --- /dev/null +++ b/docs/6.9/types/NotAcceptedFields.html @@ -0,0 +1,2 @@ +NotAcceptedFields | mongodb

Type Alias NotAcceptedFields<TSchema, FieldType>

NotAcceptedFields<TSchema, FieldType>: {
    readonly [key in KeysOfOtherType<TSchema, FieldType>]?: never
}

It avoids using fields with not acceptable types

+

Type Parameters

  • TSchema
  • FieldType
diff --git a/docs/6.9/types/NumericType.html b/docs/6.9/types/NumericType.html new file mode 100644 index 0000000000..d4cf7cf9d2 --- /dev/null +++ b/docs/6.9/types/NumericType.html @@ -0,0 +1 @@ +NumericType | mongodb

Type Alias NumericType

NumericType: IntegerType | Decimal128 | Double
diff --git a/docs/6.9/types/OIDCCallbackFunction.html b/docs/6.9/types/OIDCCallbackFunction.html new file mode 100644 index 0000000000..a45de7a353 --- /dev/null +++ b/docs/6.9/types/OIDCCallbackFunction.html @@ -0,0 +1,2 @@ +OIDCCallbackFunction | mongodb

Type Alias OIDCCallbackFunction

OIDCCallbackFunction: ((params: OIDCCallbackParams) => Promise<OIDCResponse>)

The signature of the human or machine callback functions.

+
diff --git a/docs/6.9/types/OneOrMore.html b/docs/6.9/types/OneOrMore.html new file mode 100644 index 0000000000..732132c6f5 --- /dev/null +++ b/docs/6.9/types/OneOrMore.html @@ -0,0 +1 @@ +OneOrMore | mongodb

Type Alias OneOrMore<T>

OneOrMore<T>: T | ReadonlyArray<T>

Type Parameters

  • T
diff --git a/docs/6.9/types/OnlyFieldsOfType.html b/docs/6.9/types/OnlyFieldsOfType.html new file mode 100644 index 0000000000..e329d2c36c --- /dev/null +++ b/docs/6.9/types/OnlyFieldsOfType.html @@ -0,0 +1 @@ +OnlyFieldsOfType | mongodb

Type Alias OnlyFieldsOfType<TSchema, FieldType, AssignableType>

OnlyFieldsOfType<TSchema, FieldType, AssignableType>: IsAny<TSchema[keyof TSchema], AssignableType extends FieldType
    ? Record<string, FieldType>
    : Record<string, AssignableType>, AcceptedFields<TSchema, FieldType, AssignableType> & NotAcceptedFields<TSchema, FieldType> & Record<string, AssignableType>>

Type Parameters

  • TSchema
  • FieldType = any
  • AssignableType = FieldType
diff --git a/docs/6.9/types/OperationTime.html b/docs/6.9/types/OperationTime.html new file mode 100644 index 0000000000..cd6c5a1248 --- /dev/null +++ b/docs/6.9/types/OperationTime.html @@ -0,0 +1,3 @@ +OperationTime | mongodb

Type Alias OperationTime

OperationTime: Timestamp

Represents a specific point in time on a server. Can be retrieved by using db.command()

+
diff --git a/docs/6.9/types/OptionalId.html b/docs/6.9/types/OptionalId.html new file mode 100644 index 0000000000..76f1fb92b9 --- /dev/null +++ b/docs/6.9/types/OptionalId.html @@ -0,0 +1,2 @@ +OptionalId | mongodb

Type Alias OptionalId<TSchema>

OptionalId<TSchema>: EnhancedOmit<TSchema, "_id"> & {
    _id?: InferIdType<TSchema>;
}

Add an optional _id field to an object shaped type

+

Type Parameters

  • TSchema
diff --git a/docs/6.9/types/OptionalUnlessRequiredId.html b/docs/6.9/types/OptionalUnlessRequiredId.html new file mode 100644 index 0000000000..474e490ae6 --- /dev/null +++ b/docs/6.9/types/OptionalUnlessRequiredId.html @@ -0,0 +1,3 @@ +OptionalUnlessRequiredId | mongodb

Type Alias OptionalUnlessRequiredId<TSchema>

OptionalUnlessRequiredId<TSchema>: TSchema extends {
        _id: any;
    }
    ? TSchema
    : OptionalId<TSchema>

Adds an optional _id field to an object shaped type, unless the _id field is required on that type. +In the case _id is required, this method continues to require_id.

+

Type Parameters

  • TSchema
diff --git a/docs/6.9/types/ProfilingLevel.html b/docs/6.9/types/ProfilingLevel.html new file mode 100644 index 0000000000..d732a2d0cd --- /dev/null +++ b/docs/6.9/types/ProfilingLevel.html @@ -0,0 +1 @@ +ProfilingLevel | mongodb
diff --git a/docs/6.9/types/ProfilingLevelOptions.html b/docs/6.9/types/ProfilingLevelOptions.html new file mode 100644 index 0000000000..4faf78c136 --- /dev/null +++ b/docs/6.9/types/ProfilingLevelOptions.html @@ -0,0 +1 @@ +ProfilingLevelOptions | mongodb

Type Alias ProfilingLevelOptions

ProfilingLevelOptions: CommandOperationOptions
diff --git a/docs/6.9/types/PropertyType.html b/docs/6.9/types/PropertyType.html new file mode 100644 index 0000000000..cc819fc5e3 --- /dev/null +++ b/docs/6.9/types/PropertyType.html @@ -0,0 +1 @@ +PropertyType | mongodb

Type Alias PropertyType<Type, Property>

PropertyType<Type, Property>: string extends Property
    ? unknown
    : Property extends keyof Type
        ? Type[Property]
        : Property extends `${number}`
            ? Type extends ReadonlyArray<infer ArrayType>
                ? ArrayType
                : unknown
            : Property extends `${infer Key}.${infer Rest}`
                ? Key extends `${number}`
                    ? Type extends ReadonlyArray<infer ArrayType>
                        ? PropertyType<ArrayType, Rest>
                        : unknown
                    : Key extends keyof Type
                        ? Type[Key] extends Map<string, infer MapType>
                            ? MapType
                            : PropertyType<Type[Key], Rest>
                        : unknown
                : unknown

Type Parameters

  • Type
  • Property extends string
diff --git a/docs/6.9/types/PullAllOperator.html b/docs/6.9/types/PullAllOperator.html new file mode 100644 index 0000000000..fb7a9448e8 --- /dev/null +++ b/docs/6.9/types/PullAllOperator.html @@ -0,0 +1 @@ +PullAllOperator | mongodb

Type Alias PullAllOperator<TSchema>

PullAllOperator<TSchema>: {
    readonly [key in KeysOfAType<TSchema, ReadonlyArray<any>>]?: TSchema[key]
} & NotAcceptedFields<TSchema, ReadonlyArray<any>> & {
    [key: string]: ReadonlyArray<any>;
}

Type Parameters

  • TSchema
diff --git a/docs/6.9/types/PullOperator.html b/docs/6.9/types/PullOperator.html new file mode 100644 index 0000000000..36c9dd5334 --- /dev/null +++ b/docs/6.9/types/PullOperator.html @@ -0,0 +1 @@ +PullOperator | mongodb

Type Alias PullOperator<TSchema>

PullOperator<TSchema>: {
    readonly [key in KeysOfAType<TSchema, ReadonlyArray<any>>]?: Partial<Flatten<TSchema[key]>> | FilterOperations<Flatten<TSchema[key]>>
} & NotAcceptedFields<TSchema, ReadonlyArray<any>> & {
    [key: string]: FilterOperators<any> | any;
}

Type Parameters

  • TSchema
diff --git a/docs/6.9/types/PushOperator.html b/docs/6.9/types/PushOperator.html new file mode 100644 index 0000000000..3a137afe86 --- /dev/null +++ b/docs/6.9/types/PushOperator.html @@ -0,0 +1 @@ +PushOperator | mongodb

Type Alias PushOperator<TSchema>

PushOperator<TSchema>: {
    readonly [key in KeysOfAType<TSchema, ReadonlyArray<any>>]?: Flatten<TSchema[key]> | ArrayOperator<Flatten<TSchema[key]>[]>
} & NotAcceptedFields<TSchema, ReadonlyArray<any>> & {
    [key: string]: ArrayOperator<any> | any;
}

Type Parameters

  • TSchema
diff --git a/docs/6.9/types/ReadConcernLevel.html b/docs/6.9/types/ReadConcernLevel.html new file mode 100644 index 0000000000..b4feb862e5 --- /dev/null +++ b/docs/6.9/types/ReadConcernLevel.html @@ -0,0 +1 @@ +ReadConcernLevel | mongodb

Type Alias ReadConcernLevel

ReadConcernLevel: typeof ReadConcernLevel[keyof typeof ReadConcernLevel]
diff --git a/docs/6.9/types/ReadConcernLike.html b/docs/6.9/types/ReadConcernLike.html new file mode 100644 index 0000000000..0ce8bfe7b5 --- /dev/null +++ b/docs/6.9/types/ReadConcernLike.html @@ -0,0 +1 @@ +ReadConcernLike | mongodb

Type Alias ReadConcernLike

ReadConcernLike: ReadConcern | {
    level: ReadConcernLevel;
} | ReadConcernLevel
diff --git a/docs/6.9/types/ReadPreferenceLike.html b/docs/6.9/types/ReadPreferenceLike.html new file mode 100644 index 0000000000..3c5a45dc59 --- /dev/null +++ b/docs/6.9/types/ReadPreferenceLike.html @@ -0,0 +1 @@ +ReadPreferenceLike | mongodb

Type Alias ReadPreferenceLike

ReadPreferenceLike: ReadPreference | ReadPreferenceMode
diff --git a/docs/6.9/types/ReadPreferenceMode.html b/docs/6.9/types/ReadPreferenceMode.html new file mode 100644 index 0000000000..bf95faacb7 --- /dev/null +++ b/docs/6.9/types/ReadPreferenceMode.html @@ -0,0 +1 @@ +ReadPreferenceMode | mongodb

Type Alias ReadPreferenceMode

ReadPreferenceMode: typeof ReadPreferenceMode[keyof typeof ReadPreferenceMode]
diff --git a/docs/6.9/types/RegExpOrString.html b/docs/6.9/types/RegExpOrString.html new file mode 100644 index 0000000000..8562326a48 --- /dev/null +++ b/docs/6.9/types/RegExpOrString.html @@ -0,0 +1 @@ +RegExpOrString | mongodb

Type Alias RegExpOrString<T>

RegExpOrString<T>: T extends string
    ? BSONRegExp | RegExp | T
    : T

Type Parameters

  • T
diff --git a/docs/6.9/types/RemoveUserOptions.html b/docs/6.9/types/RemoveUserOptions.html new file mode 100644 index 0000000000..d4f111630c --- /dev/null +++ b/docs/6.9/types/RemoveUserOptions.html @@ -0,0 +1 @@ +RemoveUserOptions | mongodb

Type Alias RemoveUserOptions

RemoveUserOptions: CommandOperationOptions
diff --git a/docs/6.9/types/ResumeToken.html b/docs/6.9/types/ResumeToken.html new file mode 100644 index 0000000000..482449deba --- /dev/null +++ b/docs/6.9/types/ResumeToken.html @@ -0,0 +1,3 @@ +ResumeToken | mongodb

Type Alias ResumeToken

ResumeToken: unknown

Represents the logical starting point for a new ChangeStream or resuming a ChangeStream on the server.

+
diff --git a/docs/6.9/types/ReturnDocument.html b/docs/6.9/types/ReturnDocument.html new file mode 100644 index 0000000000..0d88680355 --- /dev/null +++ b/docs/6.9/types/ReturnDocument.html @@ -0,0 +1 @@ +ReturnDocument | mongodb

Type Alias ReturnDocument

ReturnDocument: typeof ReturnDocument[keyof typeof ReturnDocument]
diff --git a/docs/6.9/types/RunCommandOptions.html b/docs/6.9/types/RunCommandOptions.html new file mode 100644 index 0000000000..f7aff9a799 --- /dev/null +++ b/docs/6.9/types/RunCommandOptions.html @@ -0,0 +1,3 @@ +RunCommandOptions | mongodb

Type Alias RunCommandOptions

RunCommandOptions: {
    readPreference?: ReadPreferenceLike;
    session?: ClientSession;
} & BSONSerializeOptions

Type declaration

diff --git a/docs/6.9/types/RunCursorCommandOptions.html b/docs/6.9/types/RunCursorCommandOptions.html new file mode 100644 index 0000000000..cf4c9f9d45 --- /dev/null +++ b/docs/6.9/types/RunCursorCommandOptions.html @@ -0,0 +1 @@ +RunCursorCommandOptions | mongodb

Type Alias RunCursorCommandOptions

RunCursorCommandOptions: {
    readPreference?: ReadPreferenceLike;
    session?: ClientSession;
} & BSONSerializeOptions
diff --git a/docs/6.9/types/SchemaMember.html b/docs/6.9/types/SchemaMember.html new file mode 100644 index 0000000000..7401b8a89e --- /dev/null +++ b/docs/6.9/types/SchemaMember.html @@ -0,0 +1 @@ +SchemaMember | mongodb

Type Alias SchemaMember<T, V>

SchemaMember<T, V>: {
    [P in keyof T]?: V
} | {
    [key: string]: V;
}

Type Parameters

  • T
  • V
diff --git a/docs/6.9/types/ServerApiVersion.html b/docs/6.9/types/ServerApiVersion.html new file mode 100644 index 0000000000..2d66b4c127 --- /dev/null +++ b/docs/6.9/types/ServerApiVersion.html @@ -0,0 +1 @@ +ServerApiVersion | mongodb

Type Alias ServerApiVersion

ServerApiVersion: typeof ServerApiVersion[keyof typeof ServerApiVersion]
diff --git a/docs/6.9/types/ServerEvents.html b/docs/6.9/types/ServerEvents.html new file mode 100644 index 0000000000..af6a905a49 --- /dev/null +++ b/docs/6.9/types/ServerEvents.html @@ -0,0 +1 @@ +ServerEvents | mongodb

Type Alias ServerEvents

ServerEvents: {
    closed(): void;
    descriptionReceived(description: ServerDescription): void;
    ended(): void;
    serverHeartbeatFailed(event: ServerHeartbeatFailedEvent): void;
    serverHeartbeatStarted(event: ServerHeartbeatStartedEvent): void;
    serverHeartbeatSucceeded(event: ServerHeartbeatSucceededEvent): void;
} & ConnectionPoolEvents & EventEmitterWithState
diff --git a/docs/6.9/types/ServerMonitoringMode.html b/docs/6.9/types/ServerMonitoringMode.html new file mode 100644 index 0000000000..9b1493f081 --- /dev/null +++ b/docs/6.9/types/ServerMonitoringMode.html @@ -0,0 +1 @@ +ServerMonitoringMode | mongodb

Type Alias ServerMonitoringMode

ServerMonitoringMode: typeof ServerMonitoringMode[keyof typeof ServerMonitoringMode]
diff --git a/docs/6.9/types/ServerSessionId.html b/docs/6.9/types/ServerSessionId.html new file mode 100644 index 0000000000..8e79471f41 --- /dev/null +++ b/docs/6.9/types/ServerSessionId.html @@ -0,0 +1 @@ +ServerSessionId | mongodb

Type Alias ServerSessionId

ServerSessionId: {
    id: Binary;
}
diff --git a/docs/6.9/types/ServerType.html b/docs/6.9/types/ServerType.html new file mode 100644 index 0000000000..b218789491 --- /dev/null +++ b/docs/6.9/types/ServerType.html @@ -0,0 +1 @@ +ServerType | mongodb

Type Alias ServerType

ServerType: typeof ServerType[keyof typeof ServerType]
diff --git a/docs/6.9/types/SetFields.html b/docs/6.9/types/SetFields.html new file mode 100644 index 0000000000..17d0f4472f --- /dev/null +++ b/docs/6.9/types/SetFields.html @@ -0,0 +1 @@ +SetFields | mongodb

Type Alias SetFields<TSchema>

SetFields<TSchema>: {
    readonly [key in KeysOfAType<TSchema, ReadonlyArray<any> | undefined>]?: OptionalId<Flatten<TSchema[key]>> | AddToSetOperators<OptionalId<Flatten<TSchema[key]>>[]>
} & IsAny<TSchema[keyof TSchema], object, NotAcceptedFields<TSchema, ReadonlyArray<any> | undefined>> & {
    [key: string]: AddToSetOperators<any> | any;
}

Type Parameters

  • TSchema
diff --git a/docs/6.9/types/SetProfilingLevelOptions.html b/docs/6.9/types/SetProfilingLevelOptions.html new file mode 100644 index 0000000000..fbb844d3d1 --- /dev/null +++ b/docs/6.9/types/SetProfilingLevelOptions.html @@ -0,0 +1 @@ +SetProfilingLevelOptions | mongodb

Type Alias SetProfilingLevelOptions

SetProfilingLevelOptions: CommandOperationOptions
diff --git a/docs/6.9/types/Sort.html b/docs/6.9/types/Sort.html new file mode 100644 index 0000000000..52422fd22d --- /dev/null +++ b/docs/6.9/types/Sort.html @@ -0,0 +1 @@ +Sort | mongodb

Type Alias Sort

Sort:
    | string
    | Exclude<SortDirection, {
        $meta: string;
    }>
    | string[]
    | {
        [key: string]: SortDirection;
    }
    | Map<string, SortDirection>
    | [string, SortDirection][]
    | [string, SortDirection]
diff --git a/docs/6.9/types/SortDirection.html b/docs/6.9/types/SortDirection.html new file mode 100644 index 0000000000..f1430c78a6 --- /dev/null +++ b/docs/6.9/types/SortDirection.html @@ -0,0 +1 @@ +SortDirection | mongodb

Type Alias SortDirection

SortDirection:
    | 1
    | -1
    | "asc"
    | "desc"
    | "ascending"
    | "descending"
    | {
        $meta: string;
    }
diff --git a/docs/6.9/types/Stream.html b/docs/6.9/types/Stream.html new file mode 100644 index 0000000000..7e3d977343 --- /dev/null +++ b/docs/6.9/types/Stream.html @@ -0,0 +1 @@ +Stream | mongodb

Type Alias Stream

Stream: Socket | TLSSocket
diff --git a/docs/6.9/types/StrictFilter.html b/docs/6.9/types/StrictFilter.html new file mode 100644 index 0000000000..d00fdb652b --- /dev/null +++ b/docs/6.9/types/StrictFilter.html @@ -0,0 +1 @@ +StrictFilter | mongodb

Type Alias StrictFilter<TSchema>Experimental

StrictFilter<TSchema>: Partial<TSchema> | {
    [Property in Join<NestedPaths<WithId<TSchema>, []>, ".">]?: Condition<PropertyType<WithId<TSchema>, Property>>
} & RootFilterOperators<WithId<TSchema>>

Type Parameters

  • TSchema
diff --git a/docs/6.9/types/StrictMatchKeysAndValues.html b/docs/6.9/types/StrictMatchKeysAndValues.html new file mode 100644 index 0000000000..f221b9997c --- /dev/null +++ b/docs/6.9/types/StrictMatchKeysAndValues.html @@ -0,0 +1 @@ +StrictMatchKeysAndValues | mongodb

Type Alias StrictMatchKeysAndValues<TSchema>Experimental

StrictMatchKeysAndValues<TSchema>: Readonly<{
    [Property in Join<NestedPaths<TSchema, []>, ".">]?: PropertyType<TSchema, Property>
} & {
    [Property in `${NestedPathsOfType<TSchema, any[]>}.$${`[${string}]` | ""}`]?: ArrayElement<PropertyType<TSchema, Property extends `${infer Key}.$${string}`
        ? Key
        : never>>
} & {
    [Property in `${NestedPathsOfType<TSchema, Record<string, any>[]>}.$${`[${string}]` | ""}.${string}`]?: any
} & Document>

Type Parameters

  • TSchema
diff --git a/docs/6.9/types/StrictUpdateFilter.html b/docs/6.9/types/StrictUpdateFilter.html new file mode 100644 index 0000000000..2eb0cddf52 --- /dev/null +++ b/docs/6.9/types/StrictUpdateFilter.html @@ -0,0 +1 @@ +StrictUpdateFilter | mongodb

Type Alias StrictUpdateFilter<TSchema>Experimental

StrictUpdateFilter<TSchema>: {
    $addToSet?: SetFields<TSchema>;
    $bit?: OnlyFieldsOfType<TSchema, NumericType | undefined, {
        and: IntegerType;
    } | {
        or: IntegerType;
    } | {
        xor: IntegerType;
    }>;
    $currentDate?: OnlyFieldsOfType<TSchema, Date | Timestamp, true | {
        $type: "date" | "timestamp";
    }>;
    $inc?: OnlyFieldsOfType<TSchema, NumericType | undefined>;
    $max?: StrictMatchKeysAndValues<TSchema>;
    $min?: StrictMatchKeysAndValues<TSchema>;
    $mul?: OnlyFieldsOfType<TSchema, NumericType | undefined>;
    $pop?: OnlyFieldsOfType<TSchema, ReadonlyArray<any>, 1 | -1>;
    $pull?: PullOperator<TSchema>;
    $pullAll?: PullAllOperator<TSchema>;
    $push?: PushOperator<TSchema>;
    $rename?: Record<string, string>;
    $set?: StrictMatchKeysAndValues<TSchema>;
    $setOnInsert?: StrictMatchKeysAndValues<TSchema>;
    $unset?: OnlyFieldsOfType<TSchema, any, "" | true | 1>;
} & Document

Type Parameters

  • TSchema
diff --git a/docs/6.9/types/SupportedNodeConnectionOptions.html b/docs/6.9/types/SupportedNodeConnectionOptions.html new file mode 100644 index 0000000000..af527ed02a --- /dev/null +++ b/docs/6.9/types/SupportedNodeConnectionOptions.html @@ -0,0 +1 @@ +SupportedNodeConnectionOptions | mongodb
diff --git a/docs/6.9/types/SupportedSocketOptions.html b/docs/6.9/types/SupportedSocketOptions.html new file mode 100644 index 0000000000..0cb303b180 --- /dev/null +++ b/docs/6.9/types/SupportedSocketOptions.html @@ -0,0 +1 @@ +SupportedSocketOptions | mongodb

Type Alias SupportedSocketOptions

SupportedSocketOptions: Pick<TcpNetConnectOpts & {
    autoSelectFamily?: boolean;
    autoSelectFamilyAttemptTimeout?: number;
}, typeof LEGAL_TCP_SOCKET_OPTIONS[number]>
diff --git a/docs/6.9/types/SupportedTLSConnectionOptions.html b/docs/6.9/types/SupportedTLSConnectionOptions.html new file mode 100644 index 0000000000..976e80c67d --- /dev/null +++ b/docs/6.9/types/SupportedTLSConnectionOptions.html @@ -0,0 +1 @@ +SupportedTLSConnectionOptions | mongodb

Type Alias SupportedTLSConnectionOptions

SupportedTLSConnectionOptions: Pick<TLSConnectionOptions & {
    allowPartialTrustChain?: boolean;
}, typeof LEGAL_TLS_SOCKET_OPTIONS[number]>
diff --git a/docs/6.9/types/SupportedTLSSocketOptions.html b/docs/6.9/types/SupportedTLSSocketOptions.html new file mode 100644 index 0000000000..b2344982b7 --- /dev/null +++ b/docs/6.9/types/SupportedTLSSocketOptions.html @@ -0,0 +1 @@ +SupportedTLSSocketOptions | mongodb

Type Alias SupportedTLSSocketOptions

SupportedTLSSocketOptions: Pick<TLSSocketOptions, Extract<keyof TLSSocketOptions, typeof LEGAL_TLS_SOCKET_OPTIONS[number]>>
diff --git a/docs/6.9/types/TagSet.html b/docs/6.9/types/TagSet.html new file mode 100644 index 0000000000..6f2c6cdca0 --- /dev/null +++ b/docs/6.9/types/TagSet.html @@ -0,0 +1 @@ +TagSet | mongodb

Type Alias TagSet

TagSet: {
    [key: string]: string;
}
diff --git a/docs/6.9/types/TopologyEvents.html b/docs/6.9/types/TopologyEvents.html new file mode 100644 index 0000000000..bbaeda4903 --- /dev/null +++ b/docs/6.9/types/TopologyEvents.html @@ -0,0 +1 @@ +TopologyEvents | mongodb

Type Alias TopologyEvents

TopologyEvents: {
    close(): void;
    error(error: Error): void;
    serverClosed(event: ServerClosedEvent): void;
    serverDescriptionChanged(event: ServerDescriptionChangedEvent): void;
    serverOpening(event: ServerOpeningEvent): void;
    timeout(): void;
    topologyClosed(event: TopologyClosedEvent): void;
    topologyDescriptionChanged(event: TopologyDescriptionChangedEvent): void;
    topologyOpening(event: TopologyOpeningEvent): void;
} & Omit<ServerEvents, "connect"> & ConnectionPoolEvents & ConnectionEvents & EventEmitterWithState
diff --git a/docs/6.9/types/TopologyType.html b/docs/6.9/types/TopologyType.html new file mode 100644 index 0000000000..f0f99e7ca6 --- /dev/null +++ b/docs/6.9/types/TopologyType.html @@ -0,0 +1 @@ +TopologyType | mongodb

Type Alias TopologyType

TopologyType: typeof TopologyType[keyof typeof TopologyType]
diff --git a/docs/6.9/types/UpdateFilter.html b/docs/6.9/types/UpdateFilter.html new file mode 100644 index 0000000000..40ebd6c25f --- /dev/null +++ b/docs/6.9/types/UpdateFilter.html @@ -0,0 +1 @@ +UpdateFilter | mongodb

Type Alias UpdateFilter<TSchema>

UpdateFilter<TSchema>: {
    $addToSet?: SetFields<TSchema>;
    $bit?: OnlyFieldsOfType<TSchema, NumericType | undefined, {
        and: IntegerType;
    } | {
        or: IntegerType;
    } | {
        xor: IntegerType;
    }>;
    $currentDate?: OnlyFieldsOfType<TSchema, Date | Timestamp, true | {
        $type: "date" | "timestamp";
    }>;
    $inc?: OnlyFieldsOfType<TSchema, NumericType | undefined>;
    $max?: MatchKeysAndValues<TSchema>;
    $min?: MatchKeysAndValues<TSchema>;
    $mul?: OnlyFieldsOfType<TSchema, NumericType | undefined>;
    $pop?: OnlyFieldsOfType<TSchema, ReadonlyArray<any>, 1 | -1>;
    $pull?: PullOperator<TSchema>;
    $pullAll?: PullAllOperator<TSchema>;
    $push?: PushOperator<TSchema>;
    $rename?: Record<string, string>;
    $set?: MatchKeysAndValues<TSchema>;
    $setOnInsert?: MatchKeysAndValues<TSchema>;
    $unset?: OnlyFieldsOfType<TSchema, any, "" | true | 1>;
} & Document

Type Parameters

  • TSchema
diff --git a/docs/6.9/types/W.html b/docs/6.9/types/W.html new file mode 100644 index 0000000000..c4cb401d55 --- /dev/null +++ b/docs/6.9/types/W.html @@ -0,0 +1 @@ +W | mongodb

Type Alias W

W: number | "majority"
diff --git a/docs/6.9/types/WithId.html b/docs/6.9/types/WithId.html new file mode 100644 index 0000000000..0f2251eea5 --- /dev/null +++ b/docs/6.9/types/WithId.html @@ -0,0 +1,2 @@ +WithId | mongodb

Type Alias WithId<TSchema>

WithId<TSchema>: EnhancedOmit<TSchema, "_id"> & {
    _id: InferIdType<TSchema>;
}

Add an _id field to an object shaped type

+

Type Parameters

  • TSchema
diff --git a/docs/6.9/types/WithSessionCallback.html b/docs/6.9/types/WithSessionCallback.html new file mode 100644 index 0000000000..92062de878 --- /dev/null +++ b/docs/6.9/types/WithSessionCallback.html @@ -0,0 +1 @@ +WithSessionCallback | mongodb

Type Alias WithSessionCallback<T>

WithSessionCallback<T>: ((session: ClientSession) => Promise<T>)

Type Parameters

  • T = unknown
diff --git a/docs/6.9/types/WithTransactionCallback.html b/docs/6.9/types/WithTransactionCallback.html new file mode 100644 index 0000000000..7306066d15 --- /dev/null +++ b/docs/6.9/types/WithTransactionCallback.html @@ -0,0 +1 @@ +WithTransactionCallback | mongodb

Type Alias WithTransactionCallback<T>

WithTransactionCallback<T>: ((session: ClientSession) => Promise<T>)

Type Parameters

  • T = any
diff --git a/docs/6.9/types/WithoutId.html b/docs/6.9/types/WithoutId.html new file mode 100644 index 0000000000..eaeb1b987a --- /dev/null +++ b/docs/6.9/types/WithoutId.html @@ -0,0 +1,2 @@ +WithoutId | mongodb

Type Alias WithoutId<TSchema>

WithoutId<TSchema>: Omit<TSchema, "_id">

Remove the _id field from an object shaped type

+

Type Parameters

  • TSchema
diff --git a/docs/6.9/variables/AuthMechanism-1.html b/docs/6.9/variables/AuthMechanism-1.html new file mode 100644 index 0000000000..e4c45d8368 --- /dev/null +++ b/docs/6.9/variables/AuthMechanism-1.html @@ -0,0 +1 @@ +AuthMechanism | mongodb

Variable AuthMechanismConst

AuthMechanism: Readonly<{
    MONGODB_AWS: "MONGODB-AWS";
    MONGODB_CR: "MONGODB-CR";
    MONGODB_DEFAULT: "DEFAULT";
    MONGODB_GSSAPI: "GSSAPI";
    MONGODB_OIDC: "MONGODB-OIDC";
    MONGODB_PLAIN: "PLAIN";
    MONGODB_SCRAM_SHA1: "SCRAM-SHA-1";
    MONGODB_SCRAM_SHA256: "SCRAM-SHA-256";
    MONGODB_X509: "MONGODB-X509";
}> = ...
diff --git a/docs/6.9/variables/AutoEncryptionLoggerLevel-1.html b/docs/6.9/variables/AutoEncryptionLoggerLevel-1.html new file mode 100644 index 0000000000..1c9d7ced90 --- /dev/null +++ b/docs/6.9/variables/AutoEncryptionLoggerLevel-1.html @@ -0,0 +1 @@ +AutoEncryptionLoggerLevel | mongodb

Variable AutoEncryptionLoggerLevelConst

AutoEncryptionLoggerLevel: Readonly<{
    Error: 1;
    FatalError: 0;
    Info: 3;
    Trace: 4;
    Warning: 2;
}> = ...
diff --git a/docs/6.9/variables/BSON.BSONType-1.html b/docs/6.9/variables/BSON.BSONType-1.html new file mode 100644 index 0000000000..782485e99c --- /dev/null +++ b/docs/6.9/variables/BSON.BSONType-1.html @@ -0,0 +1 @@ +BSONType | mongodb

Variable BSONTypeConst

BSONType: Readonly<{
    array: 4;
    binData: 5;
    bool: 8;
    date: 9;
    dbPointer: 12;
    decimal: 19;
    double: 1;
    int: 16;
    javascript: 13;
    javascriptWithScope: 15;
    long: 18;
    maxKey: 127;
    minKey: -1;
    null: 10;
    object: 3;
    objectId: 7;
    regex: 11;
    string: 2;
    symbol: 14;
    timestamp: 17;
    undefined: 6;
}>
diff --git a/docs/6.9/variables/BSON.EJSON.html b/docs/6.9/variables/BSON.EJSON.html new file mode 100644 index 0000000000..8d02df6652 --- /dev/null +++ b/docs/6.9/variables/BSON.EJSON.html @@ -0,0 +1 @@ +EJSON | mongodb

Variable EJSONConst

EJSON: {
    deserialize: typeof EJSONdeserialize;
    parse: typeof parse;
    serialize: typeof EJSONserialize;
    stringify: typeof stringify;
}
diff --git a/docs/6.9/variables/BSON.LongWithoutOverridesClass.html b/docs/6.9/variables/BSON.LongWithoutOverridesClass.html new file mode 100644 index 0000000000..41c25b68c3 --- /dev/null +++ b/docs/6.9/variables/BSON.LongWithoutOverridesClass.html @@ -0,0 +1 @@ +LongWithoutOverridesClass | mongodb

Variable LongWithoutOverridesClassConst

LongWithoutOverridesClass: LongWithoutOverrides
diff --git a/docs/6.9/variables/BSON.onDemand-1.html b/docs/6.9/variables/BSON.onDemand-1.html new file mode 100644 index 0000000000..4d9bad1571 --- /dev/null +++ b/docs/6.9/variables/BSON.onDemand-1.html @@ -0,0 +1 @@ +onDemand | mongodb

Variable onDemandConst Experimental

onDemand: OnDemand
diff --git a/docs/6.9/variables/BatchType-1.html b/docs/6.9/variables/BatchType-1.html new file mode 100644 index 0000000000..eca7bbbf08 --- /dev/null +++ b/docs/6.9/variables/BatchType-1.html @@ -0,0 +1 @@ +BatchType | mongodb

Variable BatchTypeConst

BatchType: Readonly<{
    DELETE: 3;
    INSERT: 1;
    UPDATE: 2;
}> = ...
diff --git a/docs/6.9/variables/CURSOR_FLAGS.html b/docs/6.9/variables/CURSOR_FLAGS.html new file mode 100644 index 0000000000..db3f9e34c5 --- /dev/null +++ b/docs/6.9/variables/CURSOR_FLAGS.html @@ -0,0 +1 @@ +CURSOR_FLAGS | mongodb

Variable CURSOR_FLAGSConst

CURSOR_FLAGS: readonly ["tailable", "oplogReplay", "noCursorTimeout", "awaitData", "exhaust", "partial"] = ...
diff --git a/docs/6.9/variables/Compressor-1.html b/docs/6.9/variables/Compressor-1.html new file mode 100644 index 0000000000..143c82b3fc --- /dev/null +++ b/docs/6.9/variables/Compressor-1.html @@ -0,0 +1 @@ +Compressor | mongodb

Variable CompressorConst

Compressor: Readonly<{
    none: 0;
    snappy: 1;
    zlib: 2;
    zstd: 3;
}> = ...
diff --git a/docs/6.9/variables/ExplainVerbosity-1.html b/docs/6.9/variables/ExplainVerbosity-1.html new file mode 100644 index 0000000000..0fbc3f8098 --- /dev/null +++ b/docs/6.9/variables/ExplainVerbosity-1.html @@ -0,0 +1 @@ +ExplainVerbosity | mongodb

Variable ExplainVerbosityConst

ExplainVerbosity: Readonly<{
    allPlansExecution: "allPlansExecution";
    executionStats: "executionStats";
    queryPlanner: "queryPlanner";
    queryPlannerExtended: "queryPlannerExtended";
}> = ...
diff --git a/docs/6.9/variables/GSSAPICanonicalizationValue-1.html b/docs/6.9/variables/GSSAPICanonicalizationValue-1.html new file mode 100644 index 0000000000..dae43e159d --- /dev/null +++ b/docs/6.9/variables/GSSAPICanonicalizationValue-1.html @@ -0,0 +1 @@ +GSSAPICanonicalizationValue | mongodb

Variable GSSAPICanonicalizationValueConst

GSSAPICanonicalizationValue: Readonly<{
    forward: "forward";
    forwardAndReverse: "forwardAndReverse";
    none: "none";
    off: false;
    on: true;
}> = ...
diff --git a/docs/6.9/variables/LEGAL_TCP_SOCKET_OPTIONS.html b/docs/6.9/variables/LEGAL_TCP_SOCKET_OPTIONS.html new file mode 100644 index 0000000000..196443d65e --- /dev/null +++ b/docs/6.9/variables/LEGAL_TCP_SOCKET_OPTIONS.html @@ -0,0 +1 @@ +LEGAL_TCP_SOCKET_OPTIONS | mongodb

Variable LEGAL_TCP_SOCKET_OPTIONSConst

LEGAL_TCP_SOCKET_OPTIONS: readonly ["autoSelectFamily", "autoSelectFamilyAttemptTimeout", "family", "hints", "localAddress", "localPort", "lookup"] = ...
diff --git a/docs/6.9/variables/LEGAL_TLS_SOCKET_OPTIONS.html b/docs/6.9/variables/LEGAL_TLS_SOCKET_OPTIONS.html new file mode 100644 index 0000000000..c9293a1dea --- /dev/null +++ b/docs/6.9/variables/LEGAL_TLS_SOCKET_OPTIONS.html @@ -0,0 +1 @@ +LEGAL_TLS_SOCKET_OPTIONS | mongodb

Variable LEGAL_TLS_SOCKET_OPTIONSConst

LEGAL_TLS_SOCKET_OPTIONS: readonly ["allowPartialTrustChain", "ALPNProtocols", "ca", "cert", "checkServerIdentity", "ciphers", "crl", "ecdhCurve", "key", "minDHSize", "passphrase", "pfx", "rejectUnauthorized", "secureContext", "secureProtocol", "servername", "session"] = ...
diff --git a/docs/6.9/variables/MONGO_CLIENT_EVENTS.html b/docs/6.9/variables/MONGO_CLIENT_EVENTS.html new file mode 100644 index 0000000000..8903aed8e4 --- /dev/null +++ b/docs/6.9/variables/MONGO_CLIENT_EVENTS.html @@ -0,0 +1 @@ +MONGO_CLIENT_EVENTS | mongodb

Variable MONGO_CLIENT_EVENTSConst

MONGO_CLIENT_EVENTS: readonly ["connectionPoolCreated", "connectionPoolReady", "connectionPoolCleared", "connectionPoolClosed", "connectionCreated", "connectionReady", "connectionClosed", "connectionCheckOutStarted", "connectionCheckOutFailed", "connectionCheckedOut", "connectionCheckedIn", "commandStarted", "commandSucceeded", "commandFailed", "serverOpening", "serverClosed", "serverDescriptionChanged", "topologyOpening", "topologyClosed", "topologyDescriptionChanged", "error", "timeout", "close", "serverHeartbeatStarted", "serverHeartbeatSucceeded", "serverHeartbeatFailed"] = ...
diff --git a/docs/6.9/variables/MongoErrorLabel-1.html b/docs/6.9/variables/MongoErrorLabel-1.html new file mode 100644 index 0000000000..1242e8fa08 --- /dev/null +++ b/docs/6.9/variables/MongoErrorLabel-1.html @@ -0,0 +1 @@ +MongoErrorLabel | mongodb

Variable MongoErrorLabelConst

MongoErrorLabel: Readonly<{
    HandshakeError: "HandshakeError";
    InterruptInUseConnections: "InterruptInUseConnections";
    NoWritesPerformed: "NoWritesPerformed";
    PoolRequstedRetry: "PoolRequstedRetry";
    ResetPool: "ResetPool";
    ResumableChangeStreamError: "ResumableChangeStreamError";
    RetryableWriteError: "RetryableWriteError";
    TransientTransactionError: "TransientTransactionError";
    UnknownTransactionCommitResult: "UnknownTransactionCommitResult";
}> = ...
diff --git a/docs/6.9/variables/ProfilingLevel-1.html b/docs/6.9/variables/ProfilingLevel-1.html new file mode 100644 index 0000000000..7f29630708 --- /dev/null +++ b/docs/6.9/variables/ProfilingLevel-1.html @@ -0,0 +1 @@ +ProfilingLevel | mongodb

Variable ProfilingLevelConst

ProfilingLevel: Readonly<{
    all: "all";
    off: "off";
    slowOnly: "slow_only";
}> = ...
diff --git a/docs/6.9/variables/ReadConcernLevel-1.html b/docs/6.9/variables/ReadConcernLevel-1.html new file mode 100644 index 0000000000..70fd081db6 --- /dev/null +++ b/docs/6.9/variables/ReadConcernLevel-1.html @@ -0,0 +1 @@ +ReadConcernLevel | mongodb

Variable ReadConcernLevelConst

ReadConcernLevel: Readonly<{
    available: "available";
    linearizable: "linearizable";
    local: "local";
    majority: "majority";
    snapshot: "snapshot";
}> = ...
diff --git a/docs/6.9/variables/ReadPreferenceMode-1.html b/docs/6.9/variables/ReadPreferenceMode-1.html new file mode 100644 index 0000000000..724612d0f6 --- /dev/null +++ b/docs/6.9/variables/ReadPreferenceMode-1.html @@ -0,0 +1 @@ +ReadPreferenceMode | mongodb

Variable ReadPreferenceModeConst

ReadPreferenceMode: Readonly<{
    nearest: "nearest";
    primary: "primary";
    primaryPreferred: "primaryPreferred";
    secondary: "secondary";
    secondaryPreferred: "secondaryPreferred";
}> = ...
diff --git a/docs/6.9/variables/ReturnDocument-1.html b/docs/6.9/variables/ReturnDocument-1.html new file mode 100644 index 0000000000..2cb2b2ee1b --- /dev/null +++ b/docs/6.9/variables/ReturnDocument-1.html @@ -0,0 +1 @@ +ReturnDocument | mongodb

Variable ReturnDocumentConst

ReturnDocument: Readonly<{
    AFTER: "after";
    BEFORE: "before";
}> = ...
diff --git a/docs/6.9/variables/ServerApiVersion-1.html b/docs/6.9/variables/ServerApiVersion-1.html new file mode 100644 index 0000000000..18b843c99b --- /dev/null +++ b/docs/6.9/variables/ServerApiVersion-1.html @@ -0,0 +1 @@ +ServerApiVersion | mongodb

Variable ServerApiVersionConst

ServerApiVersion: Readonly<{
    v1: "1";
}> = ...
diff --git a/docs/6.9/variables/ServerMonitoringMode-1.html b/docs/6.9/variables/ServerMonitoringMode-1.html new file mode 100644 index 0000000000..e9c6decb7a --- /dev/null +++ b/docs/6.9/variables/ServerMonitoringMode-1.html @@ -0,0 +1 @@ +ServerMonitoringMode | mongodb

Variable ServerMonitoringModeConst

ServerMonitoringMode: Readonly<{
    auto: "auto";
    poll: "poll";
    stream: "stream";
}> = ...
diff --git a/docs/6.9/variables/ServerType-1.html b/docs/6.9/variables/ServerType-1.html new file mode 100644 index 0000000000..d9dc1206bb --- /dev/null +++ b/docs/6.9/variables/ServerType-1.html @@ -0,0 +1,2 @@ +ServerType | mongodb

Variable ServerTypeConst

ServerType: Readonly<{
    LoadBalancer: "LoadBalancer";
    Mongos: "Mongos";
    PossiblePrimary: "PossiblePrimary";
    RSArbiter: "RSArbiter";
    RSGhost: "RSGhost";
    RSOther: "RSOther";
    RSPrimary: "RSPrimary";
    RSSecondary: "RSSecondary";
    Standalone: "Standalone";
    Unknown: "Unknown";
}> = ...

An enumeration of server types we know about

+
diff --git a/docs/6.9/variables/TopologyType-1.html b/docs/6.9/variables/TopologyType-1.html new file mode 100644 index 0000000000..5e1e46e32f --- /dev/null +++ b/docs/6.9/variables/TopologyType-1.html @@ -0,0 +1,2 @@ +TopologyType | mongodb

Variable TopologyTypeConst

TopologyType: Readonly<{
    LoadBalanced: "LoadBalanced";
    ReplicaSetNoPrimary: "ReplicaSetNoPrimary";
    ReplicaSetWithPrimary: "ReplicaSetWithPrimary";
    Sharded: "Sharded";
    Single: "Single";
    Unknown: "Unknown";
}> = ...

An enumeration of topology types we know about

+
diff --git a/docs/index.html b/docs/index.html index 366c32019c..f89313b407 100644 --- a/docs/index.html +++ b/docs/index.html @@ -155,7 +155,22 @@

Releases

- 6.8 Driver + 6.9 Driver + + + + Reference + + + | + + API + + + + + + 6.8 Driver diff --git a/docs/versions.json b/docs/versions.json index 583daa9e19..fb19036daa 100644 --- a/docs/versions.json +++ b/docs/versions.json @@ -2,6 +2,9 @@ { "version": "Next" }, + { + "version": "6.9" + }, { "version": "6.8" }, diff --git a/etc/docs/template/data/releases.toml b/etc/docs/template/data/releases.toml index d286720d46..f3ece5ff60 100644 --- a/etc/docs/template/data/releases.toml +++ b/etc/docs/template/data/releases.toml @@ -1,4 +1,4 @@ -current = "6.8 Driver" +current = "6.9 Driver" mongoDBManual = "https://www.mongodb.com/docs/drivers/node/" [[versions]] @@ -9,8 +9,15 @@ usesMongoDBManual = true tag = "Next" [[versions]] -version = "6.8 Driver" +version = "6.9 Driver" status = "latest" +api = "./6.9" +usesMongoDBManual = true +tag = "6.9" + +[[versions]] +version = "6.8 Driver" +status = "supported" api = "./6.8" usesMongoDBManual = true tag = "6.8" diff --git a/etc/docs/template/static/versions.json b/etc/docs/template/static/versions.json index 583daa9e19..fb19036daa 100644 --- a/etc/docs/template/static/versions.json +++ b/etc/docs/template/static/versions.json @@ -2,6 +2,9 @@ { "version": "Next" }, + { + "version": "6.9" + }, { "version": "6.8" },