Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
class Schema
import { Schema } from "https://deno.land/x/darkflare@v5.0.3/realm/mod.ts";

Constructors

new
Schema(name: string)

Type Parameters

T extends Record<string, unknown>

Properties

aggregate: (pipeline: globalThis.Realm.Services.MongoDB.AggregatePipelineStage[]) => Promise<unknown>
count: (filter?: globalThis.Realm.Services.MongoDB.Filter | undefined, options?: globalThis.Realm.Services.MongoDB.CountOptions | undefined) => Promise<number>
deleteMany: (filter: globalThis.Realm.Services.MongoDB.Filter) => Promise<globalThis.Realm.Services.MongoDB.DeleteResult>
deleteOne: (filter: globalThis.Realm.Services.MongoDB.Filter) => Promise<globalThis.Realm.Services.MongoDB.DeleteResult>
find: (filter?: globalThis.Realm.Services.MongoDB.Filter | undefined, options?: globalThis.Realm.Services.MongoDB.FindOptions | undefined) => Promise<(T & Document)[]>
findOne: (filter?: globalThis.Realm.Services.MongoDB.Filter | undefined, options?: globalThis.Realm.Services.MongoDB.FindOneOptions | undefined) => Promise<(T & Document) | null>
findOneAndDelete: (filter: globalThis.Realm.Services.MongoDB.Filter, options?: globalThis.Realm.Services.MongoDB.FindOneOptions | undefined) => Promise<(T & Document) | null>
findOneAndReplace: (
filter: globalThis.Realm.Services.MongoDB.Filter,
replacement: globalThis.Realm.Services.MongoDB.NewDocument<T & Document>,
options?: globalThis.Realm.Services.MongoDB.FindOneAndModifyOptions | undefined,
) => Promise<(T & Document) | null>
findOneAndUpdate: (
filter: globalThis.Realm.Services.MongoDB.Filter,
update: globalThis.Realm.Services.MongoDB.Update,
options?: globalThis.Realm.Services.MongoDB.FindOneAndModifyOptions | undefined,
) => Promise<(T & Document) | null>
insertMany: (documents: globalThis.Realm.Services.MongoDB.NewDocument<T & Document>[]) => Promise<globalThis.Realm.Services.MongoDB.InsertManyResult<(T & Document)["_id"]>>
insertOne: (document: globalThis.Realm.Services.MongoDB.NewDocument<T & Document>) => Promise<globalThis.Realm.Services.MongoDB.InsertOneResult<(T & Document)["_id"]>>
updateMany: (
filter: globalThis.Realm.Services.MongoDB.Filter,
update: globalThis.Realm.Services.MongoDB.Update,
options?: globalThis.Realm.Services.MongoDB.UpdateOptions | undefined,
) => Promise<globalThis.Realm.Services.MongoDB.UpdateResult<(T & Document)["_id"]>>
updateOne: (
filter: globalThis.Realm.Services.MongoDB.Filter,
update: globalThis.Realm.Services.MongoDB.Update,
options?: globalThis.Realm.Services.MongoDB.UpdateOptions | undefined,
) => Promise<globalThis.Realm.Services.MongoDB.UpdateResult<(T & Document)["_id"]>>
watch: (options?: unknown) => AsyncGenerator<globalThis.Realm.Services.MongoDB.ChangeEvent<T & Document>, unknown, unknown>