Skip to content
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

Specify a Filter Name That Differs from the Column Name #21

Open
jon-whit opened this issue Sep 11, 2019 · 3 comments
Open

Specify a Filter Name That Differs from the Column Name #21

jon-whit opened this issue Sep 11, 2019 · 3 comments

Comments

@jon-whit
Copy link

jon-whit commented Sep 11, 2019

I'd like to have a property that is filterable but have the name of the filterable property be different than the name of the column that backs the property. For example

type User struct {
    FirstName string `json:"firstName" rql:"filter,name=firstName,column=first_name"`
}

So a filter like this

{
    "filter": {
        "firstName": "Bob"
    }
}

produces

WHERE first_name="Bob"

I don't see support for this currently. Is that correct? If so, would doing this be that difficult? I don't know the codebase very well, but this could be really useful for my team using this library.

@a8m
Copy link
Owner

a8m commented Sep 12, 2019

Thanks for opening this issue @jon-whit.

There's an ongoing PR for adding this support (#18). I'll try to push it this week.

@jon-whit
Copy link
Author

jon-whit commented Sep 13, 2019

@a8m you're amazing! thanks for the quick response and the work :). If you could let me know when that's been resolved I'll close this guy out.

@jon-whit
Copy link
Author

@a8m any status update on this? I haven't seen any recent progress on #18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants