Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added flags/values global search #40

Merged
merged 4 commits into from
Sep 17, 2024
Merged

added flags/values global search #40

merged 4 commits into from
Sep 17, 2024

Conversation

briefausde
Copy link
Collaborator

No description provided.

@n4mespace
Copy link
Collaborator

quick feature proposal - add focus search field on / input )

@@ -114,6 +115,9 @@ async def root_flags(ctx: dict, options: dict) -> list:
)
)

if flag_name:
expr = expr.where(func.lower(Flag.name).like(f"%{flag_name.lower()}%"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Maybe it makes sence to add separate db index on name column.
  2. I suggest to use ilike instead of like + func.lower because if not, it is very likely that index will not be used. More info here: https://use-the-index-luke.com/sql/where-clause/functions/case-insensitive-search

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sense

@briefausde
Copy link
Collaborator Author

quick feature proposal - add focus search field on / input )

added

@briefausde briefausde merged commit 206dac6 into main Sep 17, 2024
1 check passed
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