Class: ActiveShopifyGraphQL::SearchQuery::HashConditionFormatter
- Inherits:
-
Object
- Object
- ActiveShopifyGraphQL::SearchQuery::HashConditionFormatter
- Defined in:
- lib/active_shopify_graphql/search_query/hash_condition_formatter.rb
Overview
Formats hash-based query conditions with proper sanitization
Class Method Summary collapse
-
.format(conditions) ⇒ String
Formats hash conditions into a Shopify search query string.
Class Method Details
.format(conditions) ⇒ String
Formats hash conditions into a Shopify search query string
12 13 14 15 16 17 18 19 20 |
# File 'lib/active_shopify_graphql/search_query/hash_condition_formatter.rb', line 12 def self.format(conditions) return "" if conditions.empty? query_parts = conditions.map do |key, value| format_condition(key.to_s, value) end query_parts.join(" AND ") end |