on 2024 Oct 30 8:43 AM
Hi,
does anyone have a working example of cds.foreach? I always get error messages that it is a query3 and not query2.
Docu: https://cap.cloud.sap/docs/node.js/core-services#srv-foreach-entity
Request clarification before answering.
The solution:
cds.foreach(cds.parse.cql("SELECT ID FROM db_table"), (each: table) => console.log(each.ID))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
12 | |
9 | |
8 | |
8 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.