Skip to content

Minor refactor to remove RequestType generic type parameter - #3158

Merged
labkey-adam merged 5 commits into
developfrom
fb_execute_sql_refactor
Aug 20, 2026
Merged

Minor refactor to remove RequestType generic type parameter#3158
labkey-adam merged 5 commits into
developfrom
fb_execute_sql_refactor

Conversation

@labkey-adam

Copy link
Copy Markdown
Contributor

Rationale

RequestType generic type parameter on Command is no longer supported

Related Pull Requests

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`
@labkey-adam
labkey-adam merged commit 04783ac into develop Aug 20, 2026
7 checks passed
@labkey-adam
labkey-adam deleted the fb_execute_sql_refactor branch August 20, 2026 22:34
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

Successfully merging this pull request may close these issues.

2 participants