rql
rql copied to clipboard
Specify a Filter Name That Differs from the Column Name
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.
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.
@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.
@a8m any status update on this? I haven't seen any recent progress on #18