Skip to content

Move ExecuteSqlCommand into the SelectRowsCommand inheritance hierarchy - #95

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

Move ExecuteSqlCommand into the SelectRowsCommand inheritance hierarchy#95
labkey-adam merged 16 commits into
developfrom
fb_execute_sql_refactor

Conversation

@labkey-adam

@labkey-adam labkey-adam commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Rationale

Client requested that we add missing support for the includeMetadata option on ExecuteSqlCommand. https://github.com/LabKey/internal-issues/issues/1414

Related Pull Requests

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 changed the title ExecuteSqlCommand and SelectRowsCommand into the same inheritance hierarchy Move ExecuteSqlCommand into the SelectRowsCommand inheritance hierarchy Aug 17, 2026
Comment thread gradle/wrapper/gradle-wrapper.properties Outdated
Comment thread src/org/labkey/remoteapi/query/BaseSelectRowsCommand.java
Comment thread src/org/labkey/remoteapi/query/BaseSelectRowsCommand.java
@labkey-adam
labkey-adam merged commit c50321b into develop Aug 20, 2026
3 checks passed
@labkey-adam
labkey-adam deleted the fb_execute_sql_refactor branch August 20, 2026 20:49
labkey-adam added a commit to LabKey/platform that referenced this pull request Aug 20, 2026
## Rationale
Form was conveying this flag, but action wasn't passing it along to
`ApiQueryResponse`.
LabKey/internal-issues#1414

## Related Pull Requests
- LabKey/labkey-api-java#95
labkey-adam added a commit to LabKey/server that referenced this pull request Aug 20, 2026
## Rationale
v8.0.0 was published

## Related Pull Requests
- LabKey/labkey-api-java#95
labkey-adam added a commit to LabKey/testAutomation that referenced this pull request Aug 20, 2026
## Rationale
`RequestType` generic type parameter on `Command` is no longer supported

## Related Pull Requests
- LabKey/labkey-api-java#95
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.

3 participants