Conversation
Add subquery-based alias filter methods (by_alias_contains, by_alias_equals, by_alias_starts_with, by_alias_ends_with) to ImageConditions class for filtering images by their aliases using IN subquery pattern against ImageAliasRow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds alias-based string filtering capabilities to the image repository query options, enabling filtering ImageRow results by matching against related ImageAliasRow.alias values.
Changes:
- Added four alias string-match condition factories to
ImageConditions: contains/equals/starts_with/ends_with - Implemented alias filtering via subqueries against
ImageAliasRow.image_id, with support forcase_insensitiveandnegated
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Replace ImageRow.id.in_(subquery) with sa.exists() pattern in all 4 alias filter methods (contains, equals, starts_with, ends_with) to align with codebase conventions and avoid NULL-related edge cases with NOT IN subqueries. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add 12 tests for ImageConditions alias filter methods (by_alias_contains, by_alias_equals, by_alias_starts_with, by_alias_ends_with). Each method is tested for basic matching, case_insensitive flag, and negated flag. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…lias Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
seedspirit
requested changes
Mar 3, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jopemachine
approved these changes
Mar 3, 2026
seedspirit
approved these changes
Mar 3, 2026
jopemachine
pushed a commit
that referenced
this pull request
Mar 3, 2026
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.
Summary
by_alias_contains,by_alias_equals,by_alias_starts_with,by_alias_ends_with) toImageConditionsclassImageRow.id.in_(subquery)pattern againstImageAliasRowto filter images by their aliasescase_insensitive(ilike vs like) andnegated(sa.not_()) flags, consistent with existing name/architecture filtersTest plan
Resolves BA-4819