Minor refactor to remove RequestType generic type parameter - #3158
Merged
Conversation
labkey-tchad
approved these changes
Aug 19, 2026
labkey-adam
added a commit
to LabKey/labkey-api-java
that referenced
this pull request
Aug 20, 2026
…hy (#95) #### Rationale Client requested that we add missing support for the `includeMetadata` option on `ExecuteSqlCommand`. LabKey/internal-issues#1414 #### Related Pull Requests * LabKey/testAutomation#3158 * LabKey/limsModules#2406 #### Changes * Instead of adding yet-another property and its handling to ExecuteSqlCommand, I decided to refactor `BaseQueryCommand`, add `BaseSelectRowsCommand`, and fold ExecuteSqlCommand into that hierarchy, so it can share the large number of common properties and handling with `SelectRowCommand`. This adds `includeMetadata` support "for free", eliminates a large amount of redundant code, and ensures future properties can be implemented in both easily. * Eliminate the `RequestType` generic type parameter on `Command`. This was added recently (by me) but it adds little value and makes it more difficult to implement inheritance hierarchies where parents and children might need different HTTP methods. `GetCommand`, `PostCommand`, and subclass methods can continue to return `HttpGet` or `HttpPost` if they wish, so this has very little impact. * Eliminate unnecessary `BaseSelect` interface. This early attempt at keeping ExecuteSqlCommand and SelectRowsCommand in sync is no longer needed since they now share a common base class that implements all shared property handling. * Update `StopImpersonatingCommand` to use `stopImpersonatingApi`. This means that, on success, the command now returns a success status code instead of a redirect. * Remove deprecated methods from `GetContainersResponse` and `GetUsersCommand`
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
RequestTypegeneric type parameter onCommandis no longer supportedRelated Pull Requests