Skip to content

SelectionQueryImpl should support buildQueryString #960

Description

@kondubhSICKAG

If I want to create a query using dynamic selections, for example say from UI we received a request for aggregate function
List functions; which as max,min for columns "test1". This list of functions can be dynamic. Now I cannot use query build to build a query dynamically. SelectionQueryImpl can be used but this cannot generate a string, Is there a work around? or is there a way that i can build select query dynamically when using aggregate functions?

SelectionQueryImpl selection= select();
selection.column(searchFilter.getName().get(0)).function(searchFilter.getFunctions().get(0).toString());
selection.function("mean", searchFilter.getName().get(0));
selection.function("min", searchFilter.getName().get(0));
selection.from(bucket,(ObjectUtils.isNotEmpty(searchFilter.getType()))? searchFilter.getType().stream().toArray(String[]::new): new String[0]);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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