Skip to content

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

@jon-whit

Description

@jon-whit

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions