Skip to content

Dynamic queries using store values #191

Open
@tallenh

Description

@tallenh

Is your feature request related to a problem? Please describe.
Would like to have a way to pass dynamic parameters to a query

Describe the solution you'd like
On "where" and possibly "has", along with a getcell function pass along a getvalue function that will return a reactive value from the store. Would allow something like this:

queries.setQueryDefinition("filtered_items", "items", ({ select, where }) => {
  select("name");
  where((getcell, getvalue) => getcell("name").includes(getvalue("filter_string")));
 });

then if you run:
store.setValue("filter_string", "test")

would cause the query to update with the new value. Reactive dynamic queries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions