Correct, s-strings are the general "escape hatch" to allow pass-through for things that are not yet implemented, like dialect specific functions. See the section in the PRQL Book [0] for more detail. It does make it opaque to the compiler though so the user becomes responsible for ensuring symbol names are valid and accessible in the scope.
I wish they made it more obvious in the docs. S-string is not something I would look at when trying to figure out how to use "NOW()". I spent a reasonable time looking for a way to call functions and then just abandoned the idea of prql since it seemed impossible.
I just tried to do what I would do originally and the steps were:
- look at the "functions" example on the main page (an opportunity to mention s-strings there)
- search for "function" in the prql book (s-strings are about 18th position, I probably bailed out before that)
- search for "prql SQL function" and "prql native function" - neither returns the answer on the first page
The sstring on the front page definitely helps a lot. I think just a bit of SEO and a right phrase here and there mentioning "SQL function" and "native function" could help a lot as well.
[0]: https://prql-lang.org/book/language-features/s-strings.html