mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Merge pull request #12826 from guncebektas/devel
add: depracated notices added for the old methods that are depracated in version 2.8
This commit is contained in:
21
packages/mongo/mongo.d.ts
vendored
21
packages/mongo/mongo.d.ts
vendored
@@ -107,6 +107,11 @@ export namespace Mongo {
|
||||
byteSize?: number,
|
||||
maxDocuments?: number
|
||||
): Promise<void>;
|
||||
|
||||
/**
|
||||
* @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration}
|
||||
* @see createIndexAsync
|
||||
*/
|
||||
createIndex(
|
||||
indexSpec: NpmModuleMongodb.IndexSpecification,
|
||||
options?: NpmModuleMongodb.CreateIndexesOptions
|
||||
@@ -150,11 +155,15 @@ export namespace Mongo {
|
||||
): Cursor<T, DispatchTransform<O['transform'], T, U>>;
|
||||
/**
|
||||
* Finds the first document that matches the selector, as ordered by sort and skip options. Returns `undefined` if no matching document is found.
|
||||
* @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration}
|
||||
* @see findOneAsync
|
||||
* @param selector A query describing the documents to find
|
||||
*/
|
||||
findOne(selector?: Selector<T> | ObjectID | string): U | undefined;
|
||||
/**
|
||||
* Finds the first document that matches the selector, as ordered by sort and skip options. Returns `undefined` if no matching document is found.
|
||||
* @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration}
|
||||
* @see findOneAsync
|
||||
* @param selector A query describing the documents to find
|
||||
*/
|
||||
findOne<O extends Omit<Options<T>, 'limit'>>(
|
||||
@@ -189,6 +198,8 @@ export namespace Mongo {
|
||||
estimatedDocumentCount(options?: NpmModuleMongodb.EstimatedDocumentCountOptions): Promise<number>;
|
||||
/**
|
||||
* Insert a document in the collection. Returns its unique _id.
|
||||
* @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration}
|
||||
* @see insertAsync
|
||||
* @param doc The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.
|
||||
* @param callback If present, called with an error object as the first argument and, if no error, the _id as the second.
|
||||
*/
|
||||
@@ -211,6 +222,8 @@ export namespace Mongo {
|
||||
rawDatabase(): NpmModuleMongodb.Db;
|
||||
/**
|
||||
* Remove documents from the collection
|
||||
* @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration}
|
||||
* @see removeAsync
|
||||
* @param selector Specifies which documents to remove
|
||||
* @param callback If present, called with an error object as its argument.
|
||||
*/
|
||||
@@ -229,6 +242,8 @@ export namespace Mongo {
|
||||
): Promise<number>;
|
||||
/**
|
||||
* Modify one or more documents in the collection. Returns the number of matched documents.
|
||||
* @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration}
|
||||
* @see updateAsync
|
||||
* @param selector Specifies which documents to modify
|
||||
* @param modifier Specifies how to modify the documents
|
||||
* @param callback If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.
|
||||
@@ -274,6 +289,8 @@ export namespace Mongo {
|
||||
/**
|
||||
* Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and
|
||||
* `insertedId` (the unique _id of the document that was inserted, if any).
|
||||
* @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration}
|
||||
* @see upsertAsync
|
||||
* @param selector Specifies which documents to modify
|
||||
* @param modifier Specifies how to modify the documents
|
||||
* @param callback If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.
|
||||
@@ -316,6 +333,10 @@ export namespace Mongo {
|
||||
options?: NpmModuleMongodb.CreateIndexesOptions
|
||||
): void;
|
||||
_dropCollection(): Promise<void>;
|
||||
/**
|
||||
* @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration}
|
||||
* @see dropIndexAsync
|
||||
*/
|
||||
_dropIndex(indexName: string): void;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user