When modelling with CDS and its family of languages we have access to a wide selection of clean and concise declarative syntax. In the expressions area there are expressions (and in particular path expressions) and also a certain style of filter.
These filters can be used in various places and are a great example of how CDS models elevate us from underlying SQL, up to a domain model layer, where intent can be expressed more simply (and less technically).
Here's how this special filter is defined:
And here are some examples of how it's used (and thus also what it "looks like").
In an exists predicate:
SELECT from Authors { name }
where exists books[stock > 100]In a from clause:
SELECT from Books[price > 19.99]
{ author.name as name }There's a path expression in that example too, and talking of path expressions, it can be used between segments of a path in such path expressions:
SELECT from Books
{ title, author[age < 40].name as author }This type of filter has a name denoting where it appears. What is that name (the name is a single word, and let's agree to write it all in lower case)?
This is a question from the June Developer Challenge on CAP Knowledge. And don't forget: always submit your answer as a hash, on its own - read the Taking part section of the intro post for more info. At the end of today, this question will be updated with links to further reading on this topic.
Further info:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 101 | |
| 7 | |
| 5 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |