Merge pull request #5379 from jsangmeister/change-return-types

Change return type of getAll and filter
This commit is contained in:
jsangmeister 2020-05-19 16:27:32 +02:00 committed by GitHub
commit 6c944eeaa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -198,9 +198,10 @@ Interface GetManyRequest {
* browses the history. It should be noted that it is highly disencouraged to use this * browses the history. It should be noted that it is highly disencouraged to use this
* method because it might return a huge amount of data. * method because it might return a huge amount of data.
* *
* @returns see get_many
* @throws InvalidFormat * @throws InvalidFormat
*/ */
get_all(collection: Collection, mapped_fields?: Field[], get_deleted_models?: DeletedModelsBehaviour): Partial<Model>[]; get_all(collection: Collection, mapped_fields?: Field[], get_deleted_models?: DeletedModelsBehaviour): Map<Id, Partial<Model>>;
/** /**
* Returns all models of one collection that satisfy the filter condition. * Returns all models of one collection that satisfy the filter condition.
@ -208,9 +209,10 @@ get_all(collection: Collection, mapped_fields?: Field[], get_deleted_models?: De
* *
* This method does not take a position and can not be used when browsing the history. * This method does not take a position and can not be used when browsing the history.
* *
* @returns see get_many
* @throws InvalidFormat * @throws InvalidFormat
*/ */
filter(collection: Collection, filter: Filter, mapped_fields?: Field[]): Partial<Model>[] filter(collection: Collection, filter: Filter, mapped_fields?: Field[]): Map<Id, Partial<Model>>
/** /**
* Url: POST to /internal/datastore/reader/exists * Url: POST to /internal/datastore/reader/exists