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 counts to meshmodel categories #323

Merged
merged 2 commits into from
Jun 24, 2023

Conversation

abdullah1308
Copy link
Contributor

Description

This PR fixes #

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

Signed-off-by: abdullah1308 <abdullahrafi.1308@gmail.com>
Signed-off-by: abdullah1308 <abdullahrafi.1308@gmail.com>
@@ -73,7 +73,7 @@ func GetMeshModelRelationship(db *database.Handler, f RelationshipFilter) (r []R
if f.Greedy {
finder = finder.Where("relationship_definition_dbs.kind LIKE ?", "%"+f.Kind+"%")
} else {
finder = finder.Where("relationship_definition_dbs.kind = ?", "%"+f.Kind+"%")
Copy link
Member

Choose a reason for hiding this comment

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

@abdullah1308 the need for this non-greedy change is not clear to me.

Copy link
Contributor Author

@abdullah1308 abdullah1308 Jun 24, 2023

Choose a reason for hiding this comment

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

@leecalcote Line 74 is for when we want the search to be greedy. Line 76 is for when we want the search to not be greedy.

When using = ?, using "%"+f.Kind+"%" doesn't work since it searches for the string literal %Kind% which is wrong as we want it to search for Kind.

Copy link
Contributor Author

@abdullah1308 abdullah1308 Jun 24, 2023

Choose a reason for hiding this comment

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

@leecalcote leecalcote merged commit 437d6c8 into meshery:master Jun 24, 2023
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