-
Notifications
You must be signed in to change notification settings - Fork 100
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
Enhance the cds.ql page with more examples #785
Comments
Hi Nico, Thanks René |
Hi @nocin , All the best |
Hi @renejeglinsky, thanks for getting back on this.
I think that are usual things a developer needs but has to look up, because the syntax is quite different from every other language where you can write SQL queries. Also, I've read somewhere that SQL joins are not possible in cds.ql, but couldn't find this in the docs right now when checking again. I'm really no expert when in comes to writing documentations, but at least I can name a few things that I currently miss when using it. :-) BR, |
Hi @renejeglinsky, In the last few days I have stumbled across three CQL problems for which I could not find much in the Docs.
entity Files : cuid, managed {
thumb: Composition of one Thumb;
} I found out, that this can be done, by creating another view. view MissingFileThumbs as
SELECT FROM Files {ID} WHERE NOT EXISTS thumb; But how can the same be done using node cql? const missingThumbs = await SELECT.from(Files).where({thumb: null}) [cds] - Error: An association can't be used as a value in an expression I hope the examples help to give an idea of what I look for in the documentary "in my everyday life". :-) BR, |
Hi @nocin , |
Hi CAP Team,
when I need to look up a specific cds.ql syntax, I always go through my bookmarks instead of looking in the official CAP docs, because the docs are a bit limited on this topic.
There are already some great collections. Perhaps their content can be integrated in the CAP docs or at least linked to them?
And I guess there are a few more I missed.
The cds.ql page should of course be clear and not too long, but perhaps a larger number of examples can be listed in another subpage? This would also encourage community members to contribute further or missing query examples via pull request. Especially advanced cases like deep reads, deep reads with a filter, etc. could need some more examples.
Thanks!
nico
The text was updated successfully, but these errors were encountered: