-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor DB services to use new MongoDB API (#18946)
* Add support for pagination * Add utils to extract inserted id * Add stream utility method * Use stream utility method * Add "byId" convenience methods * Copy tests from PaginatedDbService * Add license * Renaming and JavaDoc * Refactor DBNotificationService * Fix usage of "id" instead of "_id" * Separate helper/utils from client API * Use changed API * add license * Remove TODO * Convert DBJobTriggerService * Support streaming of any mongo iterable * interim support for deprecated mongojack bson objects * Small improvements * Use shorter method names instead of bean conventions * Add fields for utils and pagination helper * Change test to catch type serialization issue The test was previously not covering the issue with polymorphic types of trigger schedules for which the workaround with toDBUpdate was created. * Remove workaround for trigger schedule updates * Remove obsolete test * Remove dispensable interface for utility class * Introduce MongoEntity interface * Add @nullable annotation * Implement MongoEntity * Simplify constraints filter when fetching triggers * Add idEq helper function * Don't return nulls from #insertedId * Use idEq in utils * Add tests * Use idEq * Rename postProcessedPage to page * Make pagination helper immutable * Add collation support to pagination helper * fix compile error after method rename * Change wording Co-authored-by: Bernd Ahlers <[email protected]> * Change wording Co-authored-by: Bernd Ahlers <[email protected]> * wording Co-authored-by: Bernd Ahlers <[email protected]> * Add SortOrder enum * Remove redundant sort method from pagination helper * Use SortOrder in PageListResponse * Use SortOrder in DBNotificationService * Document immutability of pagination helper * Add locale to call of toLowerCase * Add locale to call of toLowerCase * Fix wrong order type used in typescript mock * Use Indexes helper * Use saturated cast to int * Use static import for Filters.gte * More saturated casts to int --------- Co-authored-by: Bernd Ahlers <[email protected]>
- Loading branch information
Showing
17 changed files
with
289 additions
and
418 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.