Skip to main content
Module

x/denodb/deps.ts>MongoDBDatabase

MySQL, SQLite, MariaDB, PostgreSQL and MongoDB ORM for Deno
Go to Latest
class MongoDBDatabase
import { MongoDBDatabase } from "https://deno.land/x/denodb@v1.0.40/deps.ts";

Constructors

new
MongoDBDatabase(cluster: Cluster, name: string)

Methods

collection<T = Document>(name: string): Collection<T>
createUser(
username: string,
password: string,
options?: CreateUserOptions,
)
dropUser(username: string, options?: { writeConcern?: Document; comment?: Document; })
listCollectionNames(options?: { filter?: Document; authorizedCollections?: boolean; comment?: Document; }): Promise<string[]>
listCollections(options?: { filter?: Document; nameOnly?: boolean; authorizedCollections?: boolean; comment?: Document; }): CommandCursor<ListCollectionsResult>