Skip to content

Support passing arguments to functions as filters #153

@scottgonzalez

Description

@scottgonzalez

Computed columns support functions and will expose the new field as a filter as long as there are no required arguments. Providing defaults for the arguments will allow the function to be used as a filter, but it is not currently possible to provide a value to use in place of the defaults. Would you be willing to support a new property, alongside the operators, which would take an object containing the arguments to pass to the function?

Given the example in #110, this would allow a filter like:

filter: {
  distance_from: {
    lessThan: 300
    args: {
      origin_lat: 51.111
      origin_lng: -7.123123
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions