-
Notifications
You must be signed in to change notification settings - Fork 47
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
Allow to define rename fields in $filterFields #65
Comments
Hey @Lakshan-Madushanka. Please inform me of your solution before applying it so we can discuss it. And remember in Purity simplicity and extendibility is a priority. |
Currently, $filterFields = [
'title' => ['$eq'], // title will be limited to the eq operator
'title' => '$eq', // works only for one restricted operator
'title:$eq', // same as above
'title', // this won't be restricted to any operator
]; which itself is |
@abbasudo What we do about this ?. How about something like
We don't need to break any existing functionality. We can check for 'as' keyword existence, if so we can consider right side string as renamed column. |
@abbasudo How should we handle this? |
Currently, if we need to restrict fields and rename fields, we have to define both
$availableFields
and$renamedFields
. It causes code duplication. We can avoid it with this feature.The text was updated successfully, but these errors were encountered: