-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add req.query.elements #207
Conversation
@mariayord actually, looking at the changelog again, this doesn't seem to be a full CSN entry, but some CSN-esque representation of the selected properties. I was thinking |
export type Query = Partial<SELECT & INSERT & UPDATE & DELETE & CREATE & DROP & UPSERT> | ||
export type Query = { | ||
/** @since 7.4.0 */ | ||
elements: { [key: string]: Definition }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
value of cds.d.ts::EntityElements, but in linked
@@ -82,9 +82,9 @@ await srv.run([query, query]) | |||
await srv.run('SELECT * from Authors where name like ?', ['%Poe%']) | |||
await srv.run('SELECT * from Authors where name like :name', { name: '%Poe%' }) | |||
|
|||
srv.foreach({ SELECT: { from: { ref: ['Foo'] } } }, () => {}) | |||
srv.foreach({ SELECT: { from: { ref: ['Foo'] } }, elements: {} }, () => {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if this test case is relevant, why the elements are defined here ? It is also not documented https://cap.cloud.sap/docs/node.js/events#query
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, this is missing from CAPire. It is mentioned in the relevant changelog. Could you please forward this gap internally to have the maintainer responsible for this change update the docs where you found it to be missing? Thanks!
https://cap.cloud.sap/docs/releases/archive/2023/nov23#inferring-query-elements
See internal issue 15202