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

After the QueryExpressionDSL query expression is created, how can additional column be dynamically appended to QueryExpressionDSL? #896

Open
qichangleixin opened this issue Jan 15, 2025 · 2 comments

Comments

@qichangleixin
Copy link

qichangleixin commented Jan 15, 2025

List sqlModelList = new ArrayList<>();
....
List sqlColumns = sqlModelList.stream().map(DynamicSqlDto::getColumns).flatMap(List::stream) .collect(Collectors.toList());
QueryExpressionDSL select = SqlBuilder.select(sqlColumns).from(mainSqlDto.getSqlTable());

Select cannot append columns, is there any alternative method?
1111222

@jeffgbutler
Copy link
Member

Immutability is in important design choice in this library, so we don't provide a way to change the column list once it is set. If you can provide a small example of why you want to do this, perhaps we could help with a different approach.

@qichangleixin
Copy link
Author

Immutability is in important design choice in this library, so we don't provide a way to change the column list once it is set. If you can provide a small example of why you want to do this, perhaps we could help with a different approach.

Thank you, I am trying to solve this problem from a business perspective

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

2 participants