Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SelectionQueryImpl should support buildQueryString #960

Open
kondubhSICKAG opened this issue Oct 26, 2023 · 0 comments
Open

SelectionQueryImpl should support buildQueryString #960

kondubhSICKAG opened this issue Oct 26, 2023 · 0 comments

Comments

@kondubhSICKAG
Copy link

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]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant