Repository navigation
Use helper methods to create IN clauses - #8187
Merged
Merged
Conversation
This was referenced Oct 15, 2026
labkey-matthewb
self-requested a review
October 16, 2026 23:52
labkey-matthewb
approved these changes
Oct 16, 2026
labkey-matthewb
left a comment
Contributor
There was a problem hiding this comment.
Might be worth getting this multi-repo PR merged and then addressing Method.java
labkey-adam
added a commit
to LabKey/onprcEHRModules
that referenced
this pull request
Oct 17, 2026
## Rationale Using helpers to generate SQL IN clauses is more convenient and prevents broken SQL & injection risks ## Related Pull Requests - LabKey/platform#8187
labkey-adam
added a commit
to LabKey/commonAssays
that referenced
this pull request
Oct 17, 2026
## Rationale Using helpers to generate SQL IN clauses is more convenient and prevents broken SQL & injection risks ## Related Pull Requests - LabKey/platform#8187
labkey-adam
added a commit
to LabKey/customModules
that referenced
this pull request
Oct 17, 2026
## Rationale Using helpers to generate SQL IN clauses is more convenient and prevents broken SQL & injection risks ## Related Pull Requests - LabKey/platform#8187
labkey-adam
added a commit
to LabKey/OConnorLabModules
that referenced
this pull request
Oct 17, 2026
## Rationale Using helpers to generate SQL IN clauses is more convenient and prevents broken SQL & injection risks ## Related Pull Requests - LabKey/platform#8187
labkey-adam
added a commit
to LabKey/MacCossLabModules
that referenced
this pull request
Oct 17, 2026
## Rationale Using helpers to generate SQL IN clauses is more convenient and prevents broken SQL & injection risks ## Related Pull Requests - LabKey/platform#8187
labkey-adam
added a commit
to LabKey/targetedms
that referenced
this pull request
Oct 17, 2026
## Rationale Using helpers to generate SQL IN clauses is more convenient and prevents broken SQL & injection risks ## Related Pull Requests - LabKey/platform#8187
labkey-adam
added a commit
to LabKey/DiscvrLabKeyModules
that referenced
this pull request
Oct 17, 2026
## Rationale Using helpers to generate SQL IN clauses is more convenient and prevents broken SQL & injection risks ## Related Pull Requests - LabKey/platform#8187
labkey-adam
added a commit
to LabKey/snprcEHRModules
that referenced
this pull request
Oct 17, 2026
## Rationale Using helpers to generate SQL IN clauses is more convenient and prevents broken SQL & injection risks ## Related Pull Requests - LabKey/platform#8187
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale
Using helpers to generate SQL IN clauses is more convenient and prevents broken SQL & injection risks. It also allows optimizations such as
ANY(?)and temp table IN clauses.Changes
TempTableInClauseGeneratorso it handles collections ofContainer,User, and other classes that implementJdbcParameterValueStringandStringBuilderconcatenation withSQLFragmentSQLFragment.appendInClause()where possibleSQLFragment.appendInClause()variant that takes a column expression. Passing in the column allows us to generate a clause acts as expected when preceded byNOT. AddSQLFragment.appendNotInClause()for convenience.NOTdoesn't precede an IN clause that isn't safe for negatingTasks