You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: node.js/events.md
+10-3Lines changed: 10 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -352,9 +352,16 @@ It can be used as input for [cds.ql](cds-ql) as follows:
352
352
353
353
```js
354
354
SELECT.one.from(req.subject) //> returns single object
355
-
SELECT.from(req.subject) //> returns one or many in array
356
-
UPDATE(req.subject) //> updates one or many
357
-
DELETE(req.subject) //> deletes one or many
355
+
SELECT.from(req.subject) //> returns one or all in array
356
+
UPDATE(req.subject) //> updates one or all
357
+
DELETE(req.subject) //> deletes one or all
358
+
```
359
+
It contains the path of the request without the filter condition. To include the filter use:
360
+
```js
361
+
this.before ('UPDATE', Incidents, asyncreq=> {
362
+
let filter =awaitSELECT.from (req.subject).where(req.query.UPDATE.where) //> adds filter from the request
363
+
let customFilter =awaitSELECT.from (req.subject).where(req.query.UPDATE.where).where`status.code = 'C'`//> adds filter from the request and custom filter
0 commit comments