InterfaceSampleData
talawa-api • Docs
talawa-api / models/SampleData / InterfaceSampleData
Interface: InterfaceSampleData
Interface representing a document for sample data in the database (MongoDB).
Extends
Document
Properties
$locals
> $locals: Record
<string
, unknown
>
Empty object that you can use for storing properties on the document. This is handy for passing data to middleware without conflicting with Mongoose internals.
Inherited from
Document.$locals
Defined in
node_modules/mongoose/types/document.d.ts:71
$op
> $op: null
| "validate"
| "save"
| "remove"
A string containing the current operation that Mongoose is executing
on this document. Can be null
, 'save'
, 'validate'
, or 'remove'
.
Inherited from
Document.$op
Defined in
node_modules/mongoose/types/document.d.ts:84
$where
> $where: Record
<string
, unknown
>
Set this property to add additional query filters when Mongoose saves this document and isNew
is false.
Inherited from
Document.$where
Defined in
node_modules/mongoose/types/document.d.ts:99
__v?
> optional
__v: any
This documents __v.
Inherited from
Document.__v
Defined in
node_modules/mongoose/types/document.d.ts:26
_id?
> optional
_id: any
This documents _id.
Inherited from
Document._id
Defined in
node_modules/mongoose/types/document.d.ts:23
baseModelName?
> optional
baseModelName: string
If this is a discriminator model, baseModelName
is the name of the base model.
Inherited from
Document.baseModelName
Defined in
node_modules/mongoose/types/document.d.ts:102
collection
> collection: Collection
<Document
>
Collection the model uses.
Inherited from
Document.collection
Defined in
node_modules/mongoose/types/document.d.ts:105
collectionName
> collectionName: "User"
| "Organization"
| "Post"
| "Event"
| "AppUserProfile"
| "Plugin"
Defined in
db
> db: Connection
Connection the model uses.
Inherited from
Document.db
Defined in
node_modules/mongoose/types/document.d.ts:108
documentId
> documentId: string
Defined in
errors?
> optional
errors: ValidationError
Returns the current validation errors.
Inherited from
Document.errors
Defined in
node_modules/mongoose/types/document.d.ts:142
id?
> optional
id: any
The string version of this documents _id.
Inherited from
Document.id
Defined in
node_modules/mongoose/types/document.d.ts:155
isNew
> isNew: boolean
Boolean flag specifying if the document is new.
Inherited from
Document.isNew
Defined in
node_modules/mongoose/types/document.d.ts:191
schema
> schema: Schema
<any
, Model
<any
, any
, any
, any
, any
, any
>, object
, object
, object
, object
, DefaultSchemaOptions
, object
, Document
<unknown
, object
, FlatRecord
<object
>> & FlatRecord
<object
> & Required
<object
>>
The document's schema.
Inherited from
Document.schema
Defined in
node_modules/mongoose/types/document.d.ts:235
Methods
$assertPopulated()
> $assertPopulated<Paths
>(path
, values
?): Omit
<InterfaceSampleData
, keyof Paths
> & Paths
Assert that a given path or paths is populated. Throws an error if not populated.
Type Parameters
• Paths = object
Parameters
• path: string
| string
[]
• values?: Partial
<Paths
>
Returns
Omit
<InterfaceSampleData
, keyof Paths
> & Paths
Inherited from
Document.$assertPopulated
Defined in
node_modules/mongoose/types/document.d.ts:29
$clone()
> $clone(): this
Returns a deep clone of this document
Returns
this
Inherited from
Document.$clone
Defined in
node_modules/mongoose/types/document.d.ts:32
$getAllSubdocs()
> $getAllSubdocs(): Document
<any
, any
, any
>[]
Returns
Document
<any
, any
, any
>[]
Inherited from
Document.$getAllSubdocs
Defined in
node_modules/mongoose/types/document.d.ts:35
$getPopulatedDocs()
> $getPopulatedDocs(): Document
<any
, any
, any
>[]
Returns an array of all populated documents associated with the query
Returns
Document
<any
, any
, any
>[]
Inherited from
Document.$getPopulatedDocs
Defined in
node_modules/mongoose/types/document.d.ts:47
$ignore()
> $ignore(path
): void
Don't run validation on this path or persist changes to this path.
Parameters
• path: string
Returns
void
Inherited from
Document.$ignore
Defined in
node_modules/mongoose/types/document.d.ts:38
$inc()
> $inc(path
, val
?): this
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
.
Parameters
• path: string
| string
[]
• val?: number