From cc975eb6948cf554f5ae83079a0f6343b909154f Mon Sep 17 00:00:00 2001 From: Raschid JF Rafaelly Date: Mon, 12 Apr 2021 01:36:58 -0500 Subject: [PATCH 01/10] feat(AggregateRouter): support stage names starting with '$' --- spec/AggregateRouter.spec.js | 18 ++++++++++++++++++ src/Routers/AggregateRouter.js | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/spec/AggregateRouter.spec.js b/spec/AggregateRouter.spec.js index aaedd11aa7..927727437f 100644 --- a/spec/AggregateRouter.spec.js +++ b/spec/AggregateRouter.spec.js @@ -85,4 +85,22 @@ describe('AggregateRouter', () => { const result = AggregateRouter.getPipeline(body); expect(result).toEqual(expected); }); + + it("support stage name starting with '$'", () => { + const body = { + $match: { someKey: 'whatever' }, + }; + const expected = [{ $match: { someKey: 'whatever' } }]; + const result = AggregateRouter.getPipeline(body); + expect(result).toEqual(expected); + }); + + it("support stage name not starting with '$'", () => { + const body = { + match: { someKey: 'whatever' }, + }; + const expected = [{ $match: { someKey: 'whatever' } }]; + const result = AggregateRouter.getPipeline(body); + expect(result).toEqual(expected); + }); }); diff --git a/src/Routers/AggregateRouter.js b/src/Routers/AggregateRouter.js index 2faa9e4c41..c93819ccad 100644 --- a/src/Routers/AggregateRouter.js +++ b/src/Routers/AggregateRouter.js @@ -106,7 +106,8 @@ export class AggregateRouter extends ClassesRouter { stage[stageName]._id = stage[stageName].objectId; delete stage[stageName].objectId; } - return { [`$${stageName}`]: stage[stageName] }; + const key = stageName[0] === '$' ? stageName : `$${stageName}`; + return { [key]: stage[stageName] }; } mountRoutes() { From 15c3a4e521599a404463f63018d1abd5866d0867 Mon Sep 17 00:00:00 2001 From: Raschid JF Rafaelly Date: Mon, 12 Apr 2021 02:16:08 -0500 Subject: [PATCH 02/10] docs(changelog): add entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4027ef4535..0eb4891b59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -102,6 +102,7 @@ ___ - EXPERIMENTAL: Added custom routes to easily customize flows for password reset, email verification or build entirely new flows (Manuel Trezza) [#7231](https://github.com/parse-community/parse-server/issues/7231) - Added Deprecation Policy to govern the introduction of braking changes in a phased pattern that is more predictable for developers (Manuel Trezza) [#7199](https://github.com/parse-community/parse-server/pull/7199) ### Other Changes +- Support aggregation stage names starting with '$' just like in MongoDB (Raschid JF Rafeally) [#7339](https://github.com/parse-community/parse-server/pull/7339) - Fix error when a not yet inserted job is updated (Antonio Davi Macedo Coelho de Castro) [#7196](https://github.com/parse-community/parse-server/pull/7196) - request.context for afterFind triggers (dblythy) [#7078](https://github.com/parse-community/parse-server/pull/7078) - Winston Logger interpolating stdout to console (dplewis) [#7114](https://github.com/parse-community/parse-server/pull/7114) From 395b929c93d3c9cdc16539f279735d5ac332966a Mon Sep 17 00:00:00 2001 From: Raschid JF Rafaelly Date: Sat, 10 Jul 2021 13:44:45 -0500 Subject: [PATCH 03/10] feat(AggregateRouter): support for _id in stage --- CHANGELOG.md | 2 +- spec/AggregateRouter.spec.js | 6 +++--- src/Routers/AggregateRouter.js | 17 ++++++++--------- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dae1a486b3..9b5c46c8f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -104,7 +104,7 @@ ___ - Add REST API endpoint `/loginAs` to create session of any user with master key; allows to impersonate another user. (GormanFletcher) [#7406](https://github.com/parse-community/parse-server/pull/7406) ### Other Changes -- Support aggregation stage names starting with '$' just like in MongoDB (Raschid JF Rafeally) [#7339](https://github.com/parse-community/parse-server/pull/7339) +- Support aggregation stage names starting with `$` and `$group` stages using `_id` instead of `objectId`, just like in MongoDB (Raschid JF Rafeally) [#7339](https://github.com/parse-community/parse-server/pull/7339) - Fix error when a not yet inserted job is updated (Antonio Davi Macedo Coelho de Castro) [#7196](https://github.com/parse-community/parse-server/pull/7196) - request.context for afterFind triggers (dblythy) [#7078](https://github.com/parse-community/parse-server/pull/7078) - Winston Logger interpolating stdout to console (dplewis) [#7114](https://github.com/parse-community/parse-server/pull/7114) diff --git a/spec/AggregateRouter.spec.js b/spec/AggregateRouter.spec.js index 927727437f..392c1a3b46 100644 --- a/spec/AggregateRouter.spec.js +++ b/spec/AggregateRouter.spec.js @@ -95,11 +95,11 @@ describe('AggregateRouter', () => { expect(result).toEqual(expected); }); - it("support stage name not starting with '$'", () => { + it("support group stage using '_id'", () => { const body = { - match: { someKey: 'whatever' }, + group: { _id: {} }, }; - const expected = [{ $match: { someKey: 'whatever' } }]; + const expected = [{ $group: { _id: {} } }]; const result = AggregateRouter.getPipeline(body); expect(result).toEqual(expected); }); diff --git a/src/Routers/AggregateRouter.js b/src/Routers/AggregateRouter.js index c93819ccad..4b6ed6a095 100644 --- a/src/Routers/AggregateRouter.js +++ b/src/Routers/AggregateRouter.js @@ -91,21 +91,20 @@ export class AggregateRouter extends ClassesRouter { static transformStage(stageName, stage) { if (stageName === 'group') { - if (Object.prototype.hasOwnProperty.call(stage[stageName], '_id')) { - throw new Parse.Error( - Parse.Error.INVALID_QUERY, - `Invalid parameter for query: group. Please use objectId instead of _id` - ); + if (Object.prototype.hasOwnProperty.call(stage[stageName], 'objectId')) { + // TODO: show deprecation warning for `objectId` + stage[stageName]._id = stage[stageName].objectId; + delete stage[stageName].objectId; } - if (!Object.prototype.hasOwnProperty.call(stage[stageName], 'objectId')) { + if (!Object.prototype.hasOwnProperty.call(stage[stageName], '_id')) { throw new Parse.Error( Parse.Error.INVALID_QUERY, - `Invalid parameter for query: group. objectId is required` + `Invalid parameter for query: group. Missing key _id` ); } - stage[stageName]._id = stage[stageName].objectId; - delete stage[stageName].objectId; } + + // TODO: show deprecation warning for missing `$` const key = stageName[0] === '$' ? stageName : `$${stageName}`; return { [key]: stage[stageName] }; } From 91ac97b2f1c11ddd991be986943f1a7c960b538b Mon Sep 17 00:00:00 2001 From: Raschid JF Rafaelly Date: Thu, 15 Jul 2021 19:00:48 -0500 Subject: [PATCH 04/10] feat(AggregateRouter): log deprecation warnings in `transformStage()` --- src/Routers/AggregateRouter.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Routers/AggregateRouter.js b/src/Routers/AggregateRouter.js index 4b6ed6a095..7c587bedec 100644 --- a/src/Routers/AggregateRouter.js +++ b/src/Routers/AggregateRouter.js @@ -3,6 +3,7 @@ import rest from '../rest'; import * as middleware from '../middlewares'; import Parse from 'parse/node'; import UsersRouter from './UsersRouter'; +import Deprecator from '../Deprecator/Deprecator'; export class AggregateRouter extends ClassesRouter { handleFind(req) { @@ -92,7 +93,10 @@ export class AggregateRouter extends ClassesRouter { static transformStage(stageName, stage) { if (stageName === 'group') { if (Object.prototype.hasOwnProperty.call(stage[stageName], 'objectId')) { - // TODO: show deprecation warning for `objectId` + Deprecator.logRuntimeDeprecation({ + usage: 'The use of objectId in aggregation stage $group', + solution: 'Use _id instead.', + }); stage[stageName]._id = stage[stageName].objectId; delete stage[stageName].objectId; } @@ -104,7 +108,12 @@ export class AggregateRouter extends ClassesRouter { } } - // TODO: show deprecation warning for missing `$` + if (stageName[0] !== '$') { + Deprecator.logRuntimeDeprecation({ + usage: "Using aggregation stages without a leading '$'", + solution: `Try $${stageName} instead.`, + }); + } const key = stageName[0] === '$' ? stageName : `$${stageName}`; return { [key]: stage[stageName] }; } From 4fc0d3440d5a9dc842997e45b2a0862910df92b0 Mon Sep 17 00:00:00 2001 From: Raschid JF Rafaelly Date: Sun, 1 Aug 2021 14:38:31 -0500 Subject: [PATCH 05/10] test(AggregateRouter): test for '_id' support --- spec/AggregateRouter.spec.js | 61 +++++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 5 deletions(-) diff --git a/spec/AggregateRouter.spec.js b/spec/AggregateRouter.spec.js index 392c1a3b46..06122faba0 100644 --- a/spec/AggregateRouter.spec.js +++ b/spec/AggregateRouter.spec.js @@ -95,11 +95,62 @@ describe('AggregateRouter', () => { expect(result).toEqual(expected); }); - it("support group stage using '_id'", () => { - const body = { - group: { _id: {} }, - }; - const expected = [{ $group: { _id: {} } }]; + it("support nested stage names starting with '$'", () => { + const body = [ + { + lookup: { + from: 'ACollection', + let: { id: '_id' }, + as: 'results', + pipeline: [ + { + $match: { + $expr: { + $eq: ['$_id', '$$id'], + }, + }, + }, + ], + }, + }, + ]; + const expected = [ + { + $lookup: { + from: 'ACollection', + let: { id: '_id' }, + as: 'results', + pipeline: [ + { + $match: { + $expr: { + $eq: ['$_id', '$$id'], + }, + }, + }, + ], + }, + }, + ]; + const result = AggregateRouter.getPipeline(body); + expect(result).toEqual(expected); + }); + + it("support the use of '_id' in stages", () => { + const body = [ + { match: { _id: 'randomId' } }, + { sort: { _id: -1 } }, + { addFields: { _id: 1 } }, + { group: { _id: {} } }, + { project: { _id: 0 } }, + ]; + const expected = [ + { $match: { _id: 'randomId' } }, + { $sort: { _id: -1 } }, + { $addFields: { _id: 1 } }, + { $group: { _id: {} } }, + { $project: { _id: 0 } }, + ]; const result = AggregateRouter.getPipeline(body); expect(result).toEqual(expected); }); From 70c1067acb1e560263c5e61dc411bbee7c621e13 Mon Sep 17 00:00:00 2001 From: Raschid JF Rafaelly Date: Sun, 1 Aug 2021 14:50:43 -0500 Subject: [PATCH 06/10] docs(changelog): update --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2739e34b6..7f9e4fe894 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -104,7 +104,7 @@ ___ - Add REST API endpoint `/loginAs` to create session of any user with master key; allows to impersonate another user. (GormanFletcher) [#7406](https://github.com/parse-community/parse-server/pull/7406) ### Other Changes -- Support aggregation stage names starting with `$` and `$group` stages using `_id` instead of `objectId`, just like in MongoDB (Raschid JF Rafeally) [#7339](https://github.com/parse-community/parse-server/pull/7339) +- Support native mongodb syntax in aggregation pipelines (Raschid JF Rafeally) [#7339](https://github.com/parse-community/parse-server/pull/7339) - Fix error when a not yet inserted job is updated (Antonio Davi Macedo Coelho de Castro) [#7196](https://github.com/parse-community/parse-server/pull/7196) - request.context for afterFind triggers (dblythy) [#7078](https://github.com/parse-community/parse-server/pull/7078) - Winston Logger interpolating stdout to console (dplewis) [#7114](https://github.com/parse-community/parse-server/pull/7114) From bd02e63a97c5115772472462454eddfcdc125435 Mon Sep 17 00:00:00 2001 From: Raschid JF Rafaelly Date: Sun, 1 Aug 2021 15:45:31 -0500 Subject: [PATCH 07/10] chore(AggregateRouter): add to-do comments --- spec/AggregateRouter.spec.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/spec/AggregateRouter.spec.js b/spec/AggregateRouter.spec.js index 06122faba0..4d038562bb 100644 --- a/spec/AggregateRouter.spec.js +++ b/spec/AggregateRouter.spec.js @@ -1,6 +1,7 @@ const AggregateRouter = require('../lib/Routers/AggregateRouter').AggregateRouter; describe('AggregateRouter', () => { + // TODO: update pipeline syntax. See [#7339](https://bit.ly/3incnWx) it('get pipeline from Array', () => { const body = [ { @@ -12,6 +13,7 @@ describe('AggregateRouter', () => { expect(result).toEqual(expected); }); + // TODO: update pipeline syntax. See [#7339](https://bit.ly/3incnWx) it('get pipeline from Object', () => { const body = { group: { objectId: {} }, @@ -21,6 +23,7 @@ describe('AggregateRouter', () => { expect(result).toEqual(expected); }); + // TODO: update pipeline syntax. See [#7339](https://bit.ly/3incnWx) it('get pipeline from Pipeline Operator (Array)', () => { const body = { pipeline: [ @@ -34,6 +37,7 @@ describe('AggregateRouter', () => { expect(result).toEqual(expected); }); + // TODO: update pipeline syntax. See [#7339](https://bit.ly/3incnWx) it('get pipeline from Pipeline Operator (Object)', () => { const body = { pipeline: { @@ -45,6 +49,7 @@ describe('AggregateRouter', () => { expect(result).toEqual(expected); }); + // TODO: update pipeline syntax. See [#7339](https://bit.ly/3incnWx) it('get pipeline fails multiple keys in Array stage ', () => { const body = [ { @@ -59,6 +64,7 @@ describe('AggregateRouter', () => { } }); + // TODO: update pipeline syntax. See [#7339](https://bit.ly/3incnWx) it('get pipeline fails multiple keys in Pipeline Operator Array stage ', () => { const body = { pipeline: [ @@ -75,6 +81,7 @@ describe('AggregateRouter', () => { } }); + // TODO: update pipeline syntax. See [#7339](https://bit.ly/3incnWx) it('get search pipeline from Pipeline Operator (Array)', () => { const body = { pipeline: { @@ -86,7 +93,7 @@ describe('AggregateRouter', () => { expect(result).toEqual(expected); }); - it("support stage name starting with '$'", () => { + it('support stage name starting with `$`', () => { const body = { $match: { someKey: 'whatever' }, }; @@ -95,7 +102,7 @@ describe('AggregateRouter', () => { expect(result).toEqual(expected); }); - it("support nested stage names starting with '$'", () => { + it('support nested stage names starting with `$`', () => { const body = [ { lookup: { @@ -136,7 +143,7 @@ describe('AggregateRouter', () => { expect(result).toEqual(expected); }); - it("support the use of '_id' in stages", () => { + it('support the use of `_id` in stages', () => { const body = [ { match: { _id: 'randomId' } }, { sort: { _id: -1 } }, From c1ece49637ee5ae280eb15cfbd0496f2a671cfe9 Mon Sep 17 00:00:00 2001 From: Raschid JF Rafaelly Date: Mon, 9 Aug 2021 22:56:08 -0500 Subject: [PATCH 08/10] test(Query.Aggregation): update test cases --- spec/ParseQuery.Aggregate.spec.js | 51 ++++++++++++++++--------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/spec/ParseQuery.Aggregate.spec.js b/spec/ParseQuery.Aggregate.spec.js index fc20edc140..4d6ab59c40 100644 --- a/spec/ParseQuery.Aggregate.spec.js +++ b/spec/ParseQuery.Aggregate.spec.js @@ -23,28 +23,28 @@ const loadTestData = () => { const data1 = { score: 10, name: 'foo', - sender: { group: 'A' }, + sender: { group: 'A' }, // TODO: change to `$group`. See [#7339](https://bit.ly/3incnWx) views: 900, size: ['S', 'M'], }; const data2 = { score: 10, name: 'foo', - sender: { group: 'A' }, + sender: { group: 'A' }, // TODO: change to `$group`. See [#7339](https://bit.ly/3incnWx) views: 800, size: ['M', 'L'], }; const data3 = { score: 10, name: 'bar', - sender: { group: 'B' }, + sender: { group: 'B' }, // TODO: change to `$group`. See [#7339](https://bit.ly/3incnWx) views: 700, size: ['S'], }; const data4 = { score: 20, name: 'dpl', - sender: { group: 'B' }, + sender: { group: 'B' }, // TODO: change to `$group`. See [#7339](https://bit.ly/3incnWx) views: 700, size: ['S'], }; @@ -83,22 +83,10 @@ describe('Parse.Query Aggregate testing', () => { ); }); - it('invalid query group _id', done => { + it('invalid query group _id required', done => { const options = Object.assign({}, masterKeyOptions, { body: { - group: { _id: null }, - }, - }); - get(Parse.serverURL + '/aggregate/TestObject', options).catch(error => { - expect(error.error.code).toEqual(Parse.Error.INVALID_QUERY); - done(); - }); - }); - - it('invalid query group objectId required', done => { - const options = Object.assign({}, masterKeyOptions, { - body: { - group: {}, + group: {}, // TODO: write as `$group`. See [#7339](https://bit.ly/3incnWx) }, }); get(Parse.serverURL + '/aggregate/TestObject', options).catch(error => { @@ -110,7 +98,7 @@ describe('Parse.Query Aggregate testing', () => { it('group by field', done => { const options = Object.assign({}, masterKeyOptions, { body: { - group: { objectId: '$name' }, + group: { objectId: '$name' }, // TODO: write as `$group`. See [#7339](https://bit.ly/3incnWx) }, }); get(Parse.serverURL + '/aggregate/TestObject', options) @@ -131,7 +119,7 @@ describe('Parse.Query Aggregate testing', () => { const options = Object.assign({}, masterKeyOptions, { body: { pipeline: { - group: { objectId: '$name' }, + group: { objectId: '$name' }, // TODO: write as `$group`. See [#7339](https://bit.ly/3incnWx) }, }, }); @@ -149,7 +137,7 @@ describe('Parse.Query Aggregate testing', () => { const obj = new TestObject(); const pipeline = [ { - group: { objectId: {} }, + group: { objectId: {} }, // TODO: write as `$group`. See [#7339](https://bit.ly/3incnWx) }, ]; obj @@ -168,7 +156,7 @@ describe('Parse.Query Aggregate testing', () => { const obj = new TestObject(); const pipeline = [ { - group: { objectId: '' }, + group: { objectId: '' }, // TODO: write as `$group`. See [#7339](https://bit.ly/3incnWx) }, ]; obj @@ -187,7 +175,7 @@ describe('Parse.Query Aggregate testing', () => { const obj = new TestObject(); const pipeline = [ { - group: { objectId: [] }, + group: { objectId: [] }, // TODO: write as `$group`. See [#7339](https://bit.ly/3incnWx) }, ]; obj @@ -208,6 +196,7 @@ describe('Parse.Query Aggregate testing', () => { const obj3 = new TestObject(); const pipeline = [ { + // TODO: update to new syntax. See [#7339](https://bit.ly/3incnWx) group: { objectId: { score: '$score', @@ -234,6 +223,7 @@ describe('Parse.Query Aggregate testing', () => { const obj3 = new TestObject(); const pipeline = [ { + // TODO: update to new syntax. See [#7339](https://bit.ly/3incnWx) group: { objectId: { day: { $dayOfMonth: '$_updated_at' }, @@ -264,6 +254,7 @@ describe('Parse.Query Aggregate testing', () => { const obj3 = new TestObject(); const pipeline = [ { + // TODO: update to new syntax. See [#7339](https://bit.ly/3incnWx) group: { objectId: { day: { $dayOfMonth: '$updatedAt' }, @@ -291,7 +282,7 @@ describe('Parse.Query Aggregate testing', () => { it('group by number', done => { const options = Object.assign({}, masterKeyOptions, { body: { - group: { objectId: '$score' }, + group: { objectId: '$score' }, // TODO: update to new syntax. See [#7339](https://bit.ly/3incnWx) }, }); get(Parse.serverURL + '/aggregate/TestObject', options) @@ -313,6 +304,7 @@ describe('Parse.Query Aggregate testing', () => { const obj2 = new TestObject({ name: 'item b', quantity: 5, price: 5 }); const pipeline = [ { + // TODO: update to new syntax. See [#7339](https://bit.ly/3incnWx) group: { objectId: null, total: { $sum: { $multiply: ['$quantity', '$price'] } }, @@ -372,7 +364,7 @@ describe('Parse.Query Aggregate testing', () => { }, { project: { - objectId: 0, + objectId: 0, // TODO: change to `_id`. See [#7339](https://bit.ly/3incnWx) total: { $multiply: ['$quantity', '$price'] }, }, }, @@ -459,6 +451,7 @@ describe('Parse.Query Aggregate testing', () => { const obj3 = new TestObject({ dateField2019: new Date(1990, 11, 1) }); const pipeline = [ { + // TODO: update to new syntax. See [#7339](https://bit.ly/3incnWx) group: { objectId: { day: { $dayOfMonth: '$dateField2019' }, @@ -508,6 +501,7 @@ describe('Parse.Query Aggregate testing', () => { it('group sum query', done => { const options = Object.assign({}, masterKeyOptions, { body: { + // TODO: update to new syntax. See [#7339](https://bit.ly/3incnWx) group: { objectId: null, total: { $sum: '$score' } }, }, }); @@ -524,6 +518,7 @@ describe('Parse.Query Aggregate testing', () => { it('group count query', done => { const options = Object.assign({}, masterKeyOptions, { body: { + // TODO: update to new syntax. See [#7339](https://bit.ly/3incnWx) group: { objectId: null, total: { $sum: 1 } }, }, }); @@ -540,6 +535,7 @@ describe('Parse.Query Aggregate testing', () => { it('group min query', done => { const options = Object.assign({}, masterKeyOptions, { body: { + // TODO: update to new syntax. See [#7339](https://bit.ly/3incnWx) group: { objectId: null, minScore: { $min: '$score' } }, }, }); @@ -556,6 +552,7 @@ describe('Parse.Query Aggregate testing', () => { it('group max query', done => { const options = Object.assign({}, masterKeyOptions, { body: { + // TODO: update to new syntax. See [#7339](https://bit.ly/3incnWx) group: { objectId: null, maxScore: { $max: '$score' } }, }, }); @@ -572,6 +569,7 @@ describe('Parse.Query Aggregate testing', () => { it('group avg query', done => { const options = Object.assign({}, masterKeyOptions, { body: { + // TODO: update to new syntax. See [#7339](https://bit.ly/3incnWx) group: { objectId: null, avgScore: { $avg: '$score' } }, }, }); @@ -1017,6 +1015,7 @@ describe('Parse.Query Aggregate testing', () => { const options = Object.assign({}, masterKeyOptions, { body: { project: { score: 1 }, + // TODO: update to new syntax. See [#7339](https://bit.ly/3incnWx) group: { objectId: '$score', score: { $sum: '$score' } }, }, }); @@ -1044,6 +1043,7 @@ describe('Parse.Query Aggregate testing', () => { it('class does not exist return empty', done => { const options = Object.assign({}, masterKeyOptions, { body: { + // TODO: update to new syntax. See [#7339](https://bit.ly/3incnWx) group: { objectId: null, total: { $sum: '$score' } }, }, }); @@ -1058,6 +1058,7 @@ describe('Parse.Query Aggregate testing', () => { it('field does not exist return empty', done => { const options = Object.assign({}, masterKeyOptions, { body: { + // TODO: update to new syntax. See [#7339](https://bit.ly/3incnWx) group: { objectId: null, total: { $sum: '$unknownfield' } }, }, }); From 5f92abfa1e7c0f1c7dd079a60bcb79d67a488cad Mon Sep 17 00:00:00 2001 From: Raschid JF Rafaelly Date: Wed, 11 Aug 2021 00:04:54 -0500 Subject: [PATCH 09/10] docs(deprecations): update table --- DEPRECATIONS.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/DEPRECATIONS.md b/DEPRECATIONS.md index 632ae9ca83..70a11b864e 100644 --- a/DEPRECATIONS.md +++ b/DEPRECATIONS.md @@ -4,8 +4,7 @@ The following is a list of deprecations, according to the [Deprecation Policy](h | Feature | Issue | Deprecation [ℹ️][i_deprecation] | Planned Removal [ℹ️][i_removal] | Status [ℹ️][i_status] | Notes | |---------|----|------------------|----------------------|----------|-------| -(none) - +Native MongoDB syntax in aggregation pipeline | [#7338](https://github.com/parse-community/parse-server/pull/7338) | 5.0.0 (2022) | 6.0.0 (2023) | deprecated | - | [i_deprecation]: ## "The version and date of the deprecation." [i_removal]: ## "The version and date of the planned removal." From 3c542cab4dea3ac73b09c969a3d56412495baf1e Mon Sep 17 00:00:00 2001 From: Manuel <5673677+mtrezza@users.noreply.github.com> Date: Wed, 11 Aug 2021 22:40:59 +0200 Subject: [PATCH 10/10] fixed table --- DEPRECATIONS.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DEPRECATIONS.md b/DEPRECATIONS.md index 70a11b864e..637c5beab1 100644 --- a/DEPRECATIONS.md +++ b/DEPRECATIONS.md @@ -2,10 +2,10 @@ The following is a list of deprecations, according to the [Deprecation Policy](https://github.com/parse-community/parse-server/blob/master/CONTRIBUTING.md#deprecation-policy). After a feature becomes deprecated, and giving developers time to adapt to the change, the deprecated feature will eventually be removed, leading to a breaking change. Developer feedback during the deprecation period may postpone the introduction of the breaking change. -| Feature | Issue | Deprecation [ℹ️][i_deprecation] | Planned Removal [ℹ️][i_removal] | Status [ℹ️][i_status] | Notes | -|---------|----|------------------|----------------------|----------|-------| -Native MongoDB syntax in aggregation pipeline | [#7338](https://github.com/parse-community/parse-server/pull/7338) | 5.0.0 (2022) | 6.0.0 (2023) | deprecated | - | +| Feature | Issue | Deprecation [ℹ️][i_deprecation] | Planned Removal [ℹ️][i_removal] | Status [ℹ️][i_status] | Notes | +|-----------------------------------------------|----------------------------------------------------------------------|---------------------------------|---------------------------------|-----------------------|-------| +| Native MongoDB syntax in aggregation pipeline | [#7338](https://github.com/parse-community/parse-server/issues/7338) | 5.0.0 (2022) | 6.0.0 (2023) | deprecated | - | [i_deprecation]: ## "The version and date of the deprecation." [i_removal]: ## "The version and date of the planned removal." -[i_status]: ## "The current status of the deprecation: deprecated (the feature is deprecated and still available), removed (the deprecated feature has been removed and is unavailable), retracted (the deprecation has been retracted and the feature will not be removed." \ No newline at end of file +[i_status]: ## "The current status of the deprecation: deprecated (the feature is deprecated and still available), removed (the deprecated feature has been removed and is unavailable), retracted (the deprecation has been retracted and the feature will not be removed."