docs
docs copied to clipboard
Consider removing or annotating path arguments in the string search examples
Cristian suggests we remove the 'path' lines from the following examples:
- https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#string_contains
- https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#string_starts_with
- https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#string_ends_with
The paths are optional. I personally think they're OK in the examples, because they illustrate a use case. The explanations above the examples explain what this does.
We agreed that it's best to have an example that returns something, rather than nothing; if path was omitted in these examples, they would return nothing.
Cristian suggests an explanation with each example, like: "while the path argument is not required, omitting it would return nothing generally, this is because we force to check the operation in a json object and not in a string"
My suggested rewrite:
Note: Without the optional path
argument in this example, the filter would return nothing. [second part TBW]