Skip to content

Commit

Permalink
Merge pull request #1167 from griffithlab/substring-feature-match
Browse files Browse the repository at this point in the history
Make Feature browse table name filter substring match rather than left anchored
  • Loading branch information
acoffman authored Dec 5, 2024
2 parents 8759942 + a9e7de3 commit 4c18d52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/app/graphql/resolvers/browse_features.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class Resolvers::BrowseFeatures < GraphQL::Schema::Resolver

scope { MaterializedViews::FeatureBrowseTableRow.all }

option(:feature_name, type: String) { |scope, value| scope.where("name ILIKE ?", "#{value}%") }
option(:feature_full_name, type: String) { |scope, value| scope.where("full_name ILIKE ?", "#{value}%") }
option(:feature_name, type: String) { |scope, value| scope.where("name ILIKE ?", "%#{value}%") }
option(:feature_full_name, type: String) { |scope, value| scope.where("full_name ILIKE ?", "%#{value}%") }
option(:feature_alias, type: String) { |scope, value| scope.where(array_query_for_column('alias_names'), "#{value}%") }
option(:disease_name, type: String) do |scope, value|
scope.where(json_name_query_for_column(scope.table_name, 'diseases'), "%#{value}%")
Expand Down

0 comments on commit 4c18d52

Please sign in to comment.