@orion-js/mongodb 4.0.0-alpha.2 → 4.0.0-alpha.3
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/dist/index.cjs +40 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +40 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -46800,7 +46800,8 @@ __export(exports_src, {
|
|
|
46800
46800
|
connections: () => connections,
|
|
46801
46801
|
allConnectionPromises: () => allConnectionPromises,
|
|
46802
46802
|
Repository: () => Repository,
|
|
46803
|
-
MongoCollection: () => MongoCollection
|
|
46803
|
+
MongoCollection: () => MongoCollection,
|
|
46804
|
+
Collection: () => Collection
|
|
46804
46805
|
});
|
|
46805
46806
|
module.exports = __toCommonJS(exports_src);
|
|
46806
46807
|
|
|
@@ -80679,6 +80680,44 @@ var getMongoConnection = ({ name, uri }) => {
|
|
|
80679
80680
|
connections[name] = mongoClient;
|
|
80680
80681
|
return mongoClient;
|
|
80681
80682
|
};
|
|
80683
|
+
// src/types/index.ts
|
|
80684
|
+
class Collection {
|
|
80685
|
+
name;
|
|
80686
|
+
connectionName;
|
|
80687
|
+
schema;
|
|
80688
|
+
model;
|
|
80689
|
+
indexes;
|
|
80690
|
+
generateId;
|
|
80691
|
+
getSchema;
|
|
80692
|
+
db;
|
|
80693
|
+
client;
|
|
80694
|
+
rawCollection;
|
|
80695
|
+
initItem;
|
|
80696
|
+
findOne;
|
|
80697
|
+
find;
|
|
80698
|
+
insertOne;
|
|
80699
|
+
insertMany;
|
|
80700
|
+
insertAndFind;
|
|
80701
|
+
deleteMany;
|
|
80702
|
+
deleteOne;
|
|
80703
|
+
updateOne;
|
|
80704
|
+
updateMany;
|
|
80705
|
+
upsert;
|
|
80706
|
+
findOneAndUpdate;
|
|
80707
|
+
updateAndFind;
|
|
80708
|
+
updateItem;
|
|
80709
|
+
estimatedDocumentCount;
|
|
80710
|
+
countDocuments;
|
|
80711
|
+
aggregate;
|
|
80712
|
+
watch;
|
|
80713
|
+
loadData;
|
|
80714
|
+
loadOne;
|
|
80715
|
+
loadMany;
|
|
80716
|
+
loadById;
|
|
80717
|
+
createIndexes;
|
|
80718
|
+
createIndexesPromise;
|
|
80719
|
+
connectionPromise;
|
|
80720
|
+
}
|
|
80682
80721
|
// ../services/dist/index.js
|
|
80683
80722
|
var __create6 = Object.create;
|
|
80684
80723
|
var __getProtoOf6 = Object.getPrototypeOf;
|
package/dist/index.d.ts
CHANGED
|
@@ -517,7 +517,7 @@ export interface CreateCollectionOptions<ModelClass extends ModelClassBase = Mod
|
|
|
517
517
|
export type EstimatedDocumentCount<ModelClass extends ModelClassBase> = (options?: MongoDB.EstimatedDocumentCountOptions) => Promise<number>;
|
|
518
518
|
export type CountDocuments<ModelClass extends ModelClassBase> = (selector: ModelToMongoSelector<ModelClass>, options?: MongoDB.CountDocumentsOptions) => Promise<number>;
|
|
519
519
|
export type CreateCollection = <ModelClass extends ModelClassBase = any>(options: CreateCollectionOptions<ModelClass>) => Collection<ModelClass>;
|
|
520
|
-
export
|
|
520
|
+
export declare class Collection<ModelClass extends ModelClassBase = ModelClassBase> {
|
|
521
521
|
name: string;
|
|
522
522
|
connectionName?: string;
|
|
523
523
|
schema?: Schema$1;
|
package/dist/index.js
CHANGED
|
@@ -80644,6 +80644,44 @@ var getMongoConnection = ({ name, uri }) => {
|
|
|
80644
80644
|
connections[name] = mongoClient;
|
|
80645
80645
|
return mongoClient;
|
|
80646
80646
|
};
|
|
80647
|
+
// src/types/index.ts
|
|
80648
|
+
class Collection {
|
|
80649
|
+
name;
|
|
80650
|
+
connectionName;
|
|
80651
|
+
schema;
|
|
80652
|
+
model;
|
|
80653
|
+
indexes;
|
|
80654
|
+
generateId;
|
|
80655
|
+
getSchema;
|
|
80656
|
+
db;
|
|
80657
|
+
client;
|
|
80658
|
+
rawCollection;
|
|
80659
|
+
initItem;
|
|
80660
|
+
findOne;
|
|
80661
|
+
find;
|
|
80662
|
+
insertOne;
|
|
80663
|
+
insertMany;
|
|
80664
|
+
insertAndFind;
|
|
80665
|
+
deleteMany;
|
|
80666
|
+
deleteOne;
|
|
80667
|
+
updateOne;
|
|
80668
|
+
updateMany;
|
|
80669
|
+
upsert;
|
|
80670
|
+
findOneAndUpdate;
|
|
80671
|
+
updateAndFind;
|
|
80672
|
+
updateItem;
|
|
80673
|
+
estimatedDocumentCount;
|
|
80674
|
+
countDocuments;
|
|
80675
|
+
aggregate;
|
|
80676
|
+
watch;
|
|
80677
|
+
loadData;
|
|
80678
|
+
loadOne;
|
|
80679
|
+
loadMany;
|
|
80680
|
+
loadById;
|
|
80681
|
+
createIndexes;
|
|
80682
|
+
createIndexesPromise;
|
|
80683
|
+
connectionPromise;
|
|
80684
|
+
}
|
|
80647
80685
|
// ../services/dist/index.js
|
|
80648
80686
|
var __create6 = Object.create;
|
|
80649
80687
|
var __getProtoOf6 = Object.getPrototypeOf;
|
|
@@ -81939,5 +81977,6 @@ export {
|
|
|
81939
81977
|
connections,
|
|
81940
81978
|
allConnectionPromises,
|
|
81941
81979
|
Repository,
|
|
81942
|
-
MongoCollection
|
|
81980
|
+
MongoCollection,
|
|
81981
|
+
Collection
|
|
81943
81982
|
};
|