Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/model/dependencies/mongo.ts>Database

model based mongo for deno
Latest
class Database
import { Database } from "https://deno.land/x/model@v1.2/dependencies/mongo.ts";

Constructors

new
Database(cluster: Cluster, name: string)

Methods

collection<T = Document>(name: string): Collection<T>
createUser(
username: string,
password: string,
)
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>