Interface podcast. IPodcastEpisode
source · [−]Properties
Methods
$assertPopulated
$assertPopulated
<Paths>(path: string | string[], values?: Partial<Paths>): Omit<IPodcastEpisode, keyof Paths> & Paths
<Paths>(path: string | string[], values?: Partial<Paths>): Omit<IPodcastEpisode, keyof Paths> & Paths
Assert that a given path or paths is populated. Throws an error if not populated.
$inc
$inc
(path: string | string[], val?: number): IPodcastEpisode
(path: string | string[], val?: number): IPodcastEpisode
Increments the numeric value at path by the given val.
When you call save() on this document, Mongoose will send a
$inc as opposed to a $set.
$isEmpty
$isEmpty
(path: string): boolean
(path: string): boolean
Returns true if the given path is nullish or only contains empty objects. Useful for determining whether this subdoc will get stripped out by the minimize option.
$set
$set
(path: string, val: any, type: any, options?: DocumentSetOptions): IPodcastEpisode
(path: string, val: any, type: any, options?: DocumentSetOptions): IPodcastEpisode
Alias for set(), used internally to avoid conflicts
(path: string, val: any, options?: DocumentSetOptions): IPodcastEpisode
(path: string, val: any, options?: DocumentSetOptions): IPodcastEpisode
(value: any): IPodcastEpisode
(value: any): IPodcastEpisode
depopulate
depopulate
(path?: string | string[]): IPodcastEpisode
(path?: string | string[]): IPodcastEpisode
Takes a populated field and returns it to its unpopulated state. If called with no arguments, then all populated fields are returned to their unpopulated state.
getChanges
getChanges
(): UpdateQuery<IPodcastEpisode>
(): UpdateQuery<IPodcastEpisode>
Returns the changes that happened to the document in the format that will be sent to MongoDB.
increment
increment
(): IPodcastEpisode
(): IPodcastEpisode
Signal that we desire an increment of this documents version.
init
init
(obj: AnyObject, opts?: AnyObject, callback?: Callback<IPodcastEpisode>): IPodcastEpisode
(obj: AnyObject, opts?: AnyObject, callback?: Callback<IPodcastEpisode>): IPodcastEpisode
Initializes the document without setters or marking anything modified. Called internally after a document is returned from mongodb. Normally, you do not need to call this function on your own.
overwrite
overwrite
(obj: AnyObject): IPodcastEpisode
(obj: AnyObject): IPodcastEpisode
Overwrite all values in this document with the values of obj, except
for immutable properties. Behaves similarly to set(), except for it
unsets all properties that aren't in obj.
populate
populate
<Paths>(path: string | PopulateOptions | (string | PopulateOptions)[]): Promise<MergeType<IPodcastEpisode, Paths>>
<Paths>(path: string | PopulateOptions | (string | PopulateOptions)[]): Promise<MergeType<IPodcastEpisode, Paths>>
Populates document references.
<Paths>(path: string | PopulateOptions | (string | PopulateOptions)[], callback: Callback<MergeType<IPodcastEpisode, Paths>>): void
<Paths>(path: string | PopulateOptions | (string | PopulateOptions)[], callback: Callback<MergeType<IPodcastEpisode, Paths>>): void
<Paths>(path: string, select?: string | AnyObject, model?: Model<any, {}, {}, {}, any>, match?: AnyObject, options?: PopulateOptions): Promise<MergeType<IPodcastEpisode, Paths>>
<Paths>(path: string, select?: string | AnyObject, model?: Model<any, {}, {}, {}, any>, match?: AnyObject, options?: PopulateOptions): Promise<MergeType<IPodcastEpisode, Paths>>
<Paths>(path: string, select?: string | AnyObject, model?: Model<any, {}, {}, {}, any>, match?: AnyObject, options?: PopulateOptions, callback?: Callback<MergeType<IPodcastEpisode, Paths>>): void
<Paths>(path: string, select?: string | AnyObject, model?: Model<any, {}, {}, {}, any>, match?: AnyObject, options?: PopulateOptions, callback?: Callback<MergeType<IPodcastEpisode, Paths>>): void
remove
remove
(options?: QueryOptions<unknown>): Promise<IPodcastEpisode>
(options?: QueryOptions<unknown>): Promise<IPodcastEpisode>
replaceOne
replaceOne
(replacement?: AnyObject, options?: null | QueryOptions<unknown>, callback?: Callback<any>): Query<any, IPodcastEpisode, {}, IPodcastEpisode>
(replacement?: AnyObject, options?: null | QueryOptions<unknown>, callback?: Callback<any>): Query<any, IPodcastEpisode, {}, IPodcastEpisode>
Sends a replaceOne command with this document _id as the query selector.
save
save
(options: SaveOptions, callback: Callback<IPodcastEpisode>): void
(options: SaveOptions, callback: Callback<IPodcastEpisode>): void
Saves this document by inserting a new document into the database if document.isNew is true, or sends an updateOne operation with just the modified paths if isNew is false.
(callback: Callback<IPodcastEpisode>): void
(callback: Callback<IPodcastEpisode>): void
(options?: SaveOptions): Promise<IPodcastEpisode>
(options?: SaveOptions): Promise<IPodcastEpisode>
set
set
(path: string, val: any, type: any, options?: any): IPodcastEpisode
(path: string, val: any, type: any, options?: any): IPodcastEpisode
Sets the value of a path, or many paths.
(path: string, val: any, options?: any): IPodcastEpisode
(path: string, val: any, options?: any): IPodcastEpisode
(value: any): IPodcastEpisode
(value: any): IPodcastEpisode
toObject
toObject
<T>(options?: ToObjectOptions): Require_id<T>
<T>(options?: ToObjectOptions): Require_id<T>
Converts this document into a plain-old JavaScript object (POJO).
update
update
(update?: UpdateWithAggregationPipeline | UpdateQuery<IPodcastEpisode>, options?: null | QueryOptions<unknown>, callback?: Callback<any>): Query<any, IPodcastEpisode, {}, IPodcastEpisode>
(update?: UpdateWithAggregationPipeline | UpdateQuery<IPodcastEpisode>, options?: null | QueryOptions<unknown>, callback?: Callback<any>): Query<any, IPodcastEpisode, {}, IPodcastEpisode>
Sends an update command with this document _id as the query selector.
updateOne
updateOne
(update?: UpdateWithAggregationPipeline | UpdateQuery<IPodcastEpisode>, options?: null | QueryOptions<unknown>, callback?: Callback<any>): Query<any, IPodcastEpisode, {}, IPodcastEpisode>
(update?: UpdateWithAggregationPipeline | UpdateQuery<IPodcastEpisode>, options?: null | QueryOptions<unknown>, callback?: Callback<any>): Query<any, IPodcastEpisode, {}, IPodcastEpisode>
Sends an updateOne command with this document _id as the query selector.