-
-
Notifications
You must be signed in to change notification settings - Fork 527
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
[Feature Request] Custom operators #149
Comments
Is there any plan to implement this? This flexibility would nice as I'm now forked and manually adding postgis operators as I need. |
@joeybenenati how do you add postgis operators? Can you share some code? I need to use |
|
@joeybenenati Wow! That was fast! Thank you very much!!! Maybe afterwards I can study the project better and do a PR to add new params. Note for later:
And then just adding to the service something like:
It's a rough draft but maybe it's a start? @joeybenenati if you can, please tell me if this is something that you'd be interested in or maybe just help me guide the code (since I've just discovered this project recently and I haven't tested everything yet). |
@joeybenenati could you help me with testing this feature out? I will also add tests but at the moment I would like to know that it works. (Please see #253 ) |
@rgolea sorry, I've since abandoned using this package for my current project. It's a great set of tools but I need a little more flexibility. I too had some trouble navigating and testing the project. I need to adhere to STAC API spec but would also like to incorporate a json based api query language simlar to loopback 3. |
this validation(see below) is preventing custom operators. But we can reuse the built-in operators to change their behaviors. for example #150 (comment) changes crud/packages/crud-request/src/request-query.validator.ts Lines 68 to 74 in 76dc6c2
|
@Diluka the PR I pushed would have fixed the problem (hopefully) |
If that helps, I was able to implement a custom operator by overriding
This is a bit of a manual work, but it could be generalised. And it makes sense to override the service protected methods to add new functionality. Maybe all that is needed is a "Custom operator" section on the wiki. |
This feature allow developers to define new operators.
For example:
json_contains
templatefilter=roles||json_contains||ROLE_A,ROLE_B
The text was updated successfully, but these errors were encountered: