mongoose 6.4.3 → 6.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/aggregate.js +3 -2
- package/lib/connection.js +9 -9
- package/lib/cursor/AggregationCursor.js +3 -2
- package/lib/cursor/QueryCursor.js +5 -4
- package/lib/document.js +43 -15
- package/lib/error/index.js +12 -12
- package/lib/error/messages.js +2 -2
- package/lib/helpers/query/castUpdate.js +4 -4
- package/lib/index.js +5 -2
- package/lib/model.js +22 -21
- package/lib/options/SchemaArrayOptions.js +2 -2
- package/lib/options/SchemaBufferOptions.js +1 -1
- package/lib/options/SchemaDateOptions.js +3 -3
- package/lib/options/SchemaDocumentArrayOptions.js +2 -2
- package/lib/options/SchemaMapOptions.js +1 -1
- package/lib/options/SchemaNumberOptions.js +4 -4
- package/lib/options/SchemaObjectIdOptions.js +2 -2
- package/lib/options/SchemaStringOptions.js +8 -8
- package/lib/options/SchemaSubdocumentOptions.js +1 -1
- package/lib/options/SchemaTypeOptions.js +14 -14
- package/lib/options/VirtualOptions.js +11 -11
- package/lib/query.js +74 -71
- package/lib/schema/SubdocumentPath.js +10 -6
- package/lib/schema/array.js +3 -3
- package/lib/schema/boolean.js +5 -5
- package/lib/schema/buffer.js +2 -2
- package/lib/schema/date.js +2 -2
- package/lib/schema/decimal128.js +2 -2
- package/lib/schema/documentarray.js +12 -8
- package/lib/schema/mixed.js +2 -2
- package/lib/schema/number.js +2 -2
- package/lib/schema/objectid.js +2 -2
- package/lib/schema/string.js +2 -2
- package/lib/schema.js +69 -34
- package/lib/schematype.js +7 -9
- package/lib/types/DocumentArray/methods/index.js +1 -1
- package/lib/types/buffer.js +8 -4
- package/lib/types/decimal128.js +1 -1
- package/lib/types/map.js +1 -1
- package/lib/types/objectid.js +1 -1
- package/lib/types/subdocument.js +1 -1
- package/lib/virtualtype.js +5 -5
- package/package.json +5 -5
- package/types/models.d.ts +2 -1
- package/types/query.d.ts +6 -1
package/types/query.d.ts
CHANGED
|
@@ -90,6 +90,11 @@ declare module 'mongoose' {
|
|
|
90
90
|
[key: string]: any;
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
+
interface QueryTimestampsConfig {
|
|
94
|
+
createdAt?: boolean;
|
|
95
|
+
updatedAt?: boolean;
|
|
96
|
+
}
|
|
97
|
+
|
|
93
98
|
interface QueryOptions<DocType = unknown> extends
|
|
94
99
|
PopulateOption,
|
|
95
100
|
SessionOption {
|
|
@@ -157,7 +162,7 @@ declare module 'mongoose' {
|
|
|
157
162
|
* skip timestamps for this update. Note that this allows you to overwrite
|
|
158
163
|
* timestamps. Does nothing if schema-level timestamps are not set.
|
|
159
164
|
*/
|
|
160
|
-
timestamps?: boolean;
|
|
165
|
+
timestamps?: boolean | QueryTimestampsConfig;
|
|
161
166
|
upsert?: boolean;
|
|
162
167
|
writeConcern?: mongodb.WriteConcern;
|
|
163
168
|
|