Usage

import * as mongo from "https://deno.land/x/mongo@v0.31.0/mod.ts";

§Namespaces

Bson
Bson.b64
Bson.EJSON
Bson.hex

§Classes

Binary
Bson.Binary
Bson.BSONError
Bson.BSONRegExp

A class representation of the BSON RegExp type.

Bson.BSONSymbol

A class representation of the BSON Symbol type.

Bson.BSONTypeError
Bson.BufReader

BufReader implements buffering for a Reader object.

Bson.Code

A class representation of the BSON Code type.

Bson.DBRef

A class representation of the BSON DBRef type.

Bson.Decimal128

A class representation of the BSON Decimal128 type.

Bson.Double

A class representation of the BSON Double type.

Bson.Int32

A class representation of a BSON Int32 type.

Bson.Long

A class representing a 64-bit integer

Bson.MaxKey

A class representation of the BSON MaxKey type.

Bson.MinKey

A class representation of the BSON MinKey type.

Bson.ObjectId

A class representation of the BSON ObjectId type.

Bson.Timestamp
Bson.UUID

A class representation of the BSON UUID type.

BSONRegExp

A class representation of the BSON RegExp type.

BSONSymbol

A class representation of the BSON Symbol type.

Code

A class representation of the BSON Code type.

Collection
Database
DBRef

A class representation of the BSON DBRef type.

Decimal128

A class representation of the BSON Decimal128 type.

Double

A class representation of the BSON Double type.

GridFSBucket
Int32

A class representation of a BSON Int32 type.

Long

A class representing a 64-bit integer

MaxKey

A class representation of the BSON MaxKey type.

MinKey

A class representation of the BSON MinKey type.

MongoClient
ObjectId

A class representation of the BSON ObjectId type.

Timestamp
UUID

A class representation of the BSON UUID type.

§Enums

Bson.BinarySizes
Bson.BSONData
ReadPreference

§Variables

Bson.BSON_BINARY_SUBTYPE_DEFAULT

Binary Default Type @internal

Bson.BSON_INT32_MAX
Bson.BSON_INT32_MIN
Bson.crypto

An wrapper for WebCrypto adding support for additional non-standard algorithms, but delegating to the runtime WebCrypto implementation whenever possible.

Bson.JS_INT_MAX

Any integer up to 2^53 can be precisely represented by a double.

Bson.JS_INT_MIN

Any integer down to -2^53 can be precisely represented by a double.

Bson.LongWithoutOverridesClass

§Functions

Bson.b64.decode

Decodes a given RFC4648 base64 encoded string

Bson.b64.encode

CREDIT: https://gist.github.com/enepomnyaschih/72c423f727d395eeaa09697058238727 Encodes a given Uint8Array, ArrayBuffer or string into RFC4648 base64 representation

Bson.calculateObjectSize

Calculate the bson size for a passed in Javascript object.

Bson.deferred

Creates a Promise with the reject and resolve functions placed as methods on the promise object itself. It allows you to do:

Bson.deserialize

Deserialize data as BSON.

Bson.deserializeStream

Deserialize stream data as BSON documents.

Bson.EJSON.deserialize

Deserializes an Extended JSON object into a plain JavaScript object with native/BSON types

Bson.EJSON.isBSONType
Bson.EJSON.parse

Parse an Extended JSON string, constructing the JavaScript value or object described by that string.

Bson.EJSON.serialize

Serializes an object to an Extended JSON string, and reparse it as a JavaScript object.

Bson.EJSON.stringify

Converts a BSON document to an Extended JSON string, optionally replacing values if a replacer function is specified or optionally including only the specified properties if a replacer array is specified.

Bson.hex.decode

Decodes src into src.length / 2 bytes. If the input is malformed, an error will be thrown.

Bson.hex.encode

Encodes src into src.length * 2 bytes.

Bson.serialize

Serialize a Javascript object.

Bson.serializeWithBufferAndIndex

Serialize a Javascript object using a predefined Buffer and index into the buffer, useful when pre-allocating the space for serialization.

Bson.setInternalBufferSize

Sets the size of the internal serialization buffer.

Bson.writeAll

Write all the content of the array buffer (arr) to the writer (w).

§Interfaces

AggregateOptions
Bson.DBRefLike
Bson.Deferred
Bson.DeserializeOptions
Bson.Document
Bson.EJSON.Options

EJSON parse / stringify API

Bson.SerializeOptions
BuildInfo

The document returned by the buildInfo command.

CollationOptions

Options for controlling the collation of strings in a query

ConnectOptions
CountOptions
CreateCollectionOptions

https://www.mongodb.com/docs/manual/reference/method/db.createCollection/

CreateIndexOptions
CreateUserOptions
Credential
DeleteOptions
DistinctOptions
Document
DropIndexOptions
DropOptions
FindAndModifyOptions

Options for the findAndModify operation

FindOptions
IndexOptions
InsertOptions
ListDatabaseInfo
Server
UpdateOptions

§Type Aliases

AggregatePipeline
Bson.CalculateObjectSizeOptions
Bson.EJSON.EJSONOptions
Bson.EJSON.JSONPrimitive
Bson.EJSON.SerializableTypes
Bson.LongWithoutOverrides
Filter
InsertDocument
TimeSeriesGranularity
UpdateFilter
ValidationAction
ValidationLevel